`
lobin
  • 浏览: 378321 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
阅读更多

PCI

即Peripheral Component Interconnect, 外设部件互联

 

ISA

 

MCA(Micro Channel Architecture)

 

EISA

 

PCI

PCI设备结构

这里有个Header type字段

 

Header Type为0x00时的设备结构:

registeroffsetbits 31-24bits 23-16bits 15-8bits 7-0

0000Device IDVendor ID

0104StatusCommand

0208Class codeSubclassProg IFRevision ID

030CBISTHeader typeLatency TimerCache Line Size

0410Base address #0 (BAR0)

0514Base address #1 (BAR1)

0618Base address #2 (BAR2)

071CBase address #3 (BAR3)

0820Base address #4 (BAR4)

0924Base address #5 (BAR5)

0A28Cardbus CIS Pointer

0B2CSubsystem IDSubsystem Vendor ID

0C30Expansion ROM base address

0D34ReservedCapabilities Pointer

0E38Reserved

0F3CMax latencyMin GrantInterrupt PINInterrupt Line

 

Header Type为0x01时的设备结构:

registeroffsetbits 31-24bits 23-16bits 15-8bits 7-0

0000Device IDVendor ID

0104StatusCommand

0208Class codeSubclassProg IFRevision ID

030CBISTHeader typeLatency TimerCache Line Size

0410Base address #0 (BAR0)

0514Base address #1 (BAR1)

0618Secondary Latency TimerSubordinate Bus NumberSecondary Bus NumberPrimary Bus Number

071CSecondary StatusI/O LimitI/O Base

0820Memory LimitMemory Base

0924Prefetchable Memory LimitPrefetchable Memory Base

0A28Prefetchable Base Upper 32 Bits

0B2CPrefetchable Limit Upper 32 Bits

0C30I/O Limit Upper 16 BitsI/O Base Upper 16 Bits

0D34ReservedCapability Pointer

0E38Expansion ROM base address

0F3CBridge ControlInterrupt PINInterrupt Line

 

Vendor ID字段

Vendor ID由PCI-SIG分配。可以从https://pcisig.com/membership/member-companies上查询各相关厂商分配的Vendor ID。如果该字段读出来为0xFFFF,表示是一个无效的Vendor ID。

例如Realtek的Vendor ID为4332 (0x10EC)

Realtek Semiconductor Corporation4332 (10EC Hex)

 

配置空间访问机制#1

这里涉及到两个IO端口:0xCF8和0xCFC。

0xCF8端口为CONFIG_ADDRESS端口,也就是配置地址端口,它被映射到一个32位的寄存器,也叫配置地址寄存器。

0xCFC端口为CONFIG_DATA端口,也就是配置数据端口,它也被映射到一个32为的寄存器,也叫配置数据寄存器。

 

配置地址寄存器

31 30 - 24 23 - 16 15 - 11 10 - 8 7 - 0

Enable Bit Reserved Bus Number Device Number Function Number Register Offset

 

可以看到Bus Number只有8位,也就是最多只能分配256(0~255)个Bus。Device Number只有5位,也就是最多32(0~31)个Device,Function Number只有3位,也就是最多8(0~7)个Function。这对于我们后面遍历出连接到电脑计算机上的所有PCI外设提供了一种遍历思路。

 

配置空间访问机制#2

这种访问机制在PCI 2.0版本中已经废弃。

这种访问机制也涉及到很多个IO端口:其中有两个端口0x0CF8和0x0CFA, 以及端口范围0xC000~0xCFFF(这其中有4096个端口)。

0xCF8端口为CONFIG_ADDRESS端口,也就是配置地址端口,但它被映射到一个8位的寄存器,也叫配置地址寄存器。

0x0CFA端口为跳转端口,它也被映射到一个8位的寄存器,也叫Forwarding Register(跳转寄存器)。

 

配置地址寄存器

7 - 43 - 10

Key (0 = access mechanism disabled, non-zero = access mechanism enabled)Function numberSpecial cycle enabled if set

 

0xC000~0xCFFF端口

15 - 1211 - 87 - 21 - 0

Must be 1100bDevice numberRegister indexMust be zero

 

遍历所有PCI外设

 

PCI-X

 

PCI-X 1.0

 

PCI-X 2.0

 

PCI-E(即PCI-Express)

 

基于内存映射PCI(Memory Mapped PCI)的配置空间访问机制

 

 

PCI-E 1.0

 

PCI-E 2.0

 

PCI-E 3.0

 

 

 

PCI

CPU

 

 

0
0
分享到:
评论

相关推荐

    PCI、PCI-X和PCIExpress的原理及体系结构

    PCI、PCIX和PCIExpress 的原理及体系结构 马鸣锦 朱剑冰 何红旗 杜 威 编著 PCIExpress是第三代高性能IO总线,在总线结构上采取了根本性的变革,主要体 现在两个方面:一是由...

    MindShare__PCI_Express_System_Architecture.pdf

    认识PCIE,不能丢掉最初的PCI ,其中PCI 优点还需keep it。 PCIE 继承携带了之前的PCI 总线的优点,又发展了新开发的优点在计算机系统架构中。 当前地PCI 发送和接受 比特率是 2.5Gb/s 1.PCI Express 总线实现...

    PCIe规范各版本合集,包括PCI_Express_Base 1.0a、2.0、2.1、3.0、4.0、5.0 六个版本.zip

    PCIe规范各版本合集,包括PCI_Express_Base 1.0a、2.0、2.1、3.0、4.0、5.0 六个版本 PCIE接口开发调试必备资料: PCI_Express_Base_4.0r1.0.pdf PCI_Express_Base_5.0r1.0.pdf PCI_Express_Base_Specification_...

    PCI Express for the 7 Series FPGAs

    Since the introduction of the PCI Express® protocol, Xilinx has been the market leader in FPGA-based PCI Express solutions—from the soft IP FPGA logic-based solutions in the Virtex®-II Pro family, ...

    PCI_Express_CEM_r3.0.zip_PCI CEM 3.0_PCI cem_PCI express_PCI_Exp

    PCI Express card electromechanical specification

    pci60806A驱动 PCI-并口卡

    PCISETUP.exe是PCI卡的驱动安装工具,您可以用这个工具来安装卡的驱动. 相关文件说明 -DRV_1P CH352(PCI转一并口)驱动文件目录. -LINUX linux驱动文件目录 -WINDOWS windows 98\2000\me\NT4.0\vista\xp\64位xp\64...

    研华PCI-1730/PCI-1730U快速入门中文手册

    研华PCI-1730/PCI-1730U快速入门中文手册 研华PCI-1730/PCI-1730U快速入门中文手册 研华PCI-1730/PCI-1730U快速入门中文手册

    PHY Interface for the PCI ExpressTM Architecture

    The PHY Interface for the PCI Express Architecture (PIPE) is intended to enable the development of functionally equivalent PCI Express PHY's. Such PHY's can be delivered as discrete IC's or as ...

    PCI9054笔记 PCI9054 PCI9054笔记 PCI9054

    PCI9054笔记 PCI9054 PCI9054笔记 PCI9054 PCI9054笔记 PCI9054

    PCI 3.0 SPEC

    PCI Local Bus 3.0 Specification PCI规范的3.0版。 和我们目前使用的PCI规范2.0相比较,3.0中接口电压调整到了3.3V,而不是2.3版中的5.0V。同时新版PCI规范还会支持通用PCI设备卡,也就是兼容5.0和3.3V两个工作...

    PCI串行口驱动 PCI串行口驱动

    PCI串行口驱动 PCI串行口驱动 PCI串行口驱动 PCI串行口驱动 PCI串行口驱动 PCI串行口驱动 PCI串行口驱动 PCI串行口驱动 PCI串行口驱动 PCI串行口驱动

    The PCI ID Repository V2.2(显卡型号十六进制代码列表)

    PCI ID(显卡型号十六进制代码列表),linux下查看显卡型号,有时会返回十六进制代码,这个列表是The PCI ID Repository网站的列表,可以根据十六进制代码查询到相应显卡型号。 2.2版本,官方更新日期:2022-05-18 ...

    NetMos 9835/9805 PCI并口卡

    MosChip公司【VEN_9710】出的PCI转并口/串口卡驱动。 支持多种芯片,如下。 NetMos 9705 PCI Parallel Port NetMos 9735 PCI Serial Port NetMos 9745 PCI Serial Port NetMos 9805 PCI Parallel Port NetMos 9815 ...

    PCI9052 在ISA 与 PCI 总线接口中的应用

    PCI9052 是PLX 公司推出的PCI 总线接口芯片,能够实现ISA 总线与PCI 总线的无缝连接,可方便地将原有的ISA 插卡移植到PCI 总线。文中主要介绍了该芯片的ISA 接口模式,并给出了一个实际应用PCI9052 的系统。

    PCI Express体系结构导读

    《PCI Express 体系结构导读》讲述了与PCI及PCI Express总线相关的最为基础的内容,并介绍了一些必要的、与PCI总线相关的处理器体系结构知识,这也是《PCI Express 体系结构导读》的重点所在。深入理解处理器体系...

    PCI总线接口芯片9054

    pci9054是由美国plx公司生产的先进的pci i/o加速器,采用了先进的plx数据流水线结构技术,是32位、33mhz的pci总线主i/o加速器;符合pci本地总线规范2.2版,突发传输速率达到132mb/s,本地总线支持复用/非复用的32位地址/...

    用PCI9052开发PCI板卡的整套资料

    The PCI 9052RDK-LITE (RDK-LITE) is a flexible Rapid Development Kit for designs using the PLX PCI 9052 bus target device. It features 1 BGA and 28 surface-mount QFP/PLCC/SSOP/SOIC prototyping ...

    PCI总线规范简介

    PCI(Peripheral Component Interconnect),中文意思是“外围器件互联”,一种由英特尔(Intel)公司 1991 年推出的局部并行总线标准。此标准允许在计算机内安装多达10 个遵从PCI 标准的扩展卡。最早提出的 PCI 总线...

    PCI9052板卡的开发中文资料 PCI9052 板卡的开发中文资料

    PCI9052板卡的开发中文资料 PCI9052板卡的开发中文资料

Global site tag (gtag.js) - Google Analytics