请教各位高手一个PCI的问题
我们知道,PCI设备有三个空间——内存地址空间、IO地址空间和配置空间。由于PCI支持即插即用,所以PCI设备不是占用固定的内存地址空间或I/O地址空间,而是可以由操作系统决定其映射的基址。怎么配置呢?这就是配置空间的作用。
DW | Byte3 | Byte2 | Byte1 | Byte0 | Addr
---+---------------------+-----
0 | Device ID | Vendor ID | 00
---+---------------------+-----
1 | Status | Command | 04
---+---------------------+-----
2 | Class Code | Revision ID | 08
---+---------------------+-----
3 | BIST | Header Type | Latency Timer | Cache Line | 0C
---+---------------------+-----
4 | Base Address 0 | 10
---+---------------------+-----
5 | Base Address 1 | 14
---+---------------------+-----
6 | Base Address 2 | 18
---+---------------------+-----
7 | Base Address 3 | 1C
---+---------------------+-----
8 | Base Address 4 | 20
---+---------------------+-----
9 | Base Address 5 | 24
---+---------------------+-----
10 | CardBus CIS pointer | 28
---+---------------------+-----
11 | Subsystem Device ID | Subsystem Vendor ID | 2C
---+---------------------+-----
12 | Expansion ROM Base Address | 30
---+---------------------+-----
13 | Reserved(Capability List) | 34
---+---------------------+-----
14 | Reserved | 38
---+---------------------+-----
15 | Max_Lat | Min_Gnt | IRQ Pin | IRQ Line | 3C
-------------------------------
我现在的问题是,如何从这些信息中判断一个PCI设备是PCI桥还是AGP桥,由于他们的CLass都是0x060400,请各位高手指教。
[解决办法]
同问,如何 "写 "Base Address 0 ?