日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

PCI_Express规范第七章解读-Software Initialization and configuration

發(fā)布時間:2025/3/8 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 PCI_Express规范第七章解读-Software Initialization and configuration 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

7.Software Initialization and configuration

PCI EXPRESS Configuration model 支持兩種配置空間的訪問機(jī)制:

-PCI 兼容配置機(jī)制:100%的二進(jìn)制兼容PCI 2.3中定義的,以及兼容早期的OS或類似的總線枚舉和配置軟件。

-PCI Express增強(qiáng)配置機(jī)制:提供了更大有效的配置空間,以及更有效的訪問機(jī)制。

7.1 Configuration Topology

-PCI Express Link:A Link represents a dual-simplex communications channel between two components。

-Root Complex: RC的主要功能與PCI總線中的HOST主橋類似,但是在HOST主橋的基礎(chǔ)上增加了許多功能。

7.2 PCI Express Configuration Mechanisms

PCI Express 配置空間圖:


-1.PCI Express把PCI SPEC 2.3中規(guī)定的配置空間從256byte擴(kuò)展了至4096 byte。

-2.PCI Express configuration space分為兩部分:

--1.PCI 2.3兼容部分,它包含每一個邏輯設(shè)備的配置空間的第一個256bytes。
--2.PCI Express擴(kuò)展部分,包括剩下的區(qū)域。

-3.PCI 2.3兼容部分可以用任何一種在PCI 2.3中定義的訪問機(jī)制訪問,也可以用PCI EXPRESS定義的配置訪問方式 訪問(后面介紹)。

-4.PCI Express擴(kuò)展空間部分只能用PCI Express configuration access mechanism。

對于PCI 2.3兼容部分的訪問方式如下:

1.每一個PCI device都有其 unique PFA(PCI Function Address). PFA由 bus number,device number & function number所組成.例如. USB device PFA is (0,6,0) <- USB is a PCI device and its bus/dev/function is 0/6/0。


?? -- 有了PFA,就可以存取其 PCI configuration registers.

Ex. write USB PCI register 43h bit1 = 1


mov eax, 80003040h
mov dx, 0cf8h
out dx, eax

mov dx, 0cffh
in al, dx
or al, 00000010b
out dx, al

對于.PCI Express擴(kuò)展空間部分的訪問:
Ex. mov ax, [50400000h] <- read device (4,0,0)'s register 0;2 bytes
Note: PCIe extended base address 要 reserve and report to OS. Size is 256MByte. 這是BIOS需要做的. (當(dāng)然,BIOS也要將此 base address寫入 chipset register,讓 chipset 知道:有這樣的 cycle時,是給PCIe device的 ! )-繁體字部分來自網(wǎng)絡(luò)

here 50000000h: PCIe extended base address. 可以從 chipset register得知
???? bit[27:20]: Bus information
???? [19:15]: Device information
???? [14:12]: Function information
???? [11: 8]: Extended Register
???? [7:2]: DW number
???? [1:0]: Byte enable

因此,只要知道 PCIe extended base address,就可以像以前一樣,可以任意存取 PCIe config registers, 即可以訪問 0FFh

NOTE:實際上,pcie device可以由其PCI 2.3兼容部分里的Capabilities Pointer Register識別,因為在眾多的 capabilities中,會有一個 PCIe capability;其 ID value = 10h.



ID

Description

00h

Reserved.

01h

PCI Power Management Interface. Refer to "The PM Capability Register Set" on page 585.

02h

AGP. Refer to "AGP Capability" on page 845. Also refer to the MindShare book entitled AGP System Architecture, Second Edition (published by Addison-Wesley).

03h

VPD. Refer to "Vital Product Data (VPD) Capability" on page 848.

04h

Slot Identification. This capability identifies a bridge that provides external expansion capabilities (i.e., an expansion chassis containing add-in card slots). Full documentation of this feature can be found in the revision 1.1 PCI-to-PCI Bridge Architecture Specification. For a detailed, Express-oriented description, refer to "Introduction To Chassis/Slot Numbering Registers" on page 859 and "Chassis and Slot Number Assignment" on page 861.

05h

Message Signaled Interrupts. Refer to "The MSI Capability Register Set" on page 332.

06h

CompactPCI Hot Swap. Refer to the chapter entitled Compact PCI and PMC in the MindShare book entitled PCI System Architecture, Fourth Edition (published by Addison-Wesley).

07h

PCI-X device. For a detailed description, refer to the MindShare book entitled PCI-X System Architecture (published by Addison-Wesley).

08h

Reserved for AMD.

09h

Vendor Specific capability register set. The layout of the register set is vendor specific, except that the byte immediately following the "Next" pointer indicates the number of bytes in the capability structure (including the ID and Next pointer bytes). An example vendor specific usage is a function that is configured in the final manufacturing steps as either a 32-bit or 64-bit PCI agent and the Vendor Specific capability structure tells the device driver which features the device supports.

0Ah

Debug port.

0Bh

CompactPCI central resource control. A full definition of this capability can be found in the PICMG 2.13 Specification (http://www.picmg.com).

0Ch

PCI Hot-Plug. This ID indicates that the associated device conforms to the Standard Hot-Plug Controller model.

0Dh-0Fh

Reserved.

10h

PCI Express Capability register set (aka PCI Express Capability Structure). For a detailed explanation, refer to "PCI Express Capability Register Set" on page 896.

11h-FFh

Reserve

3.8.2.12 HECBASE - PCI Express Extended Configuration Base Address Register
This register defines the base address of the enhanced PCI Express configuration
memory.

Device: 16
Function: 0
Offset: 64h
Version: Intel 5000P Chipset, Intel 5000V Chipset, Intel 5000Z Chipset
Bit??????? Attr????? Default???? Description
31:24 RV?????? 0h????????????? Reserved

23:12 RW????? 001h?????????? HECBASE: PCI Express Extended Configuration Base This register?? contains???? the address that corresponds to bits 39 to 28 of the base address for PCI Express extended?? configuration space. Configuration software will read this register to determine where the 256MB range of addresses resides for this particular host bridg e. This register defaults to the same address as the default value for TOLM.
11:0 RV???????????????? 0h??? Reserved

閱讀全文
類別:Bios?查看評論

轉(zhuǎn)載于:https://www.cnblogs.com/kuwoyidai/archive/2010/07/14/1777529.html

總結(jié)

以上是生活随笔為你收集整理的PCI_Express规范第七章解读-Software Initialization and configuration的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。