红联Linux门户
Linux帮助

pci IO内存和配置空间的概念理解

发布时间:2011-01-27 11:40:14来源:红联作者:wucongdonglai
pci IO内存和配置空间其实是不是对应着同一个寄存器空间,是不同阶段的不同称呼?
配置空间是指在识别设备时候寄存器所存储的值,而当pci_request_region、ioremap后就成了IO内存?
还是说配置空间就是配置空间,里面存储了pci设备信息,而IO内存对应的是设备上的另一段寄存器?
文章评论

共有 5 条评论

  1. wuren110 于 2011-01-28 14:06:59发表:

    非常的不错

  2. wucongdonglai 于 2011-01-28 08:56:40发表:

    4# deepwhite
    这篇文章写得不错的,前面那段好像哪里见过,看着特别眼熟

  3. deepwhite 于 2011-01-27 15:09:18发表:

    http://dlc.sun.com/osol/docs/content/DRIVER/hwovr-25520.html

  4. deepwhite 于 2011-01-27 15:08:48发表:

    PCI Configuration Address Space

    Configuration space is defined geographically. The location of a peripheral device is determined by its physical location within an interconnected tree of PCI bus bridges. A device is located by its bus number and device (slot) number. Each peripheral device contains a set of well-defined configuration registers in its PCI configuration space. The registers are used not only to identify devices but also to supply device configuration information to the configuration framework. For example, base address registers in the device configuration space must be mapped before a device can respond to data access.

    The method for generating configuration cycles is host dependent. In x86 machines, special I/O ports are used. On other platforms, the PCI configuration space can be memory-mapped to certain address locations corresponding to the PCI host bridge in the host address domain. When a device configuration register is accessed by the processor, the request is routed to the PCI host bridge. The bridge then translates the access into proper configuration cycles on the bus.
    PCI Configuration Base Address Registers

    The PCI configuration space [color=Blue]consists of up to six 32-bit base address registers for each device.[/color] These registers provide both size and data type information. System firmware assigns base addresses in the PCI address domain to these registers.

    Each addressable region can be either memory or I/O space. The value contained in bit 0 of the base address register identifies the type. A value of 0 in bit 0 indicates a memory space and a value of 1 indicates an I/O space. The following figure shows two base address registers: one for memory and the other for I/O types.

  5. orumdi 于 2011-01-27 14:57:21发表:

    不懂,帮顶