当前位置:网站首页>PCIe enumeration process
PCIe enumeration process
2020-11-08 09:00:00 【osc_o44vh5qb】
1. The discovery of equipment and bdf number The determination of
The first process of enumeration is rc End to end bus The configuration space access is initiated to obtain the device information of the whole bus topology .
To put it simply, it's going to traverse each bus, as well as bus Next device The configuration space of . If you read valid device ID value ( Incomplete F) We think we've found something available .
1.1 bdf number The distribution of
bus device function this 3 individual number It's an interesting thing . For each pcie For equipment , There are no registers in the configuration space to configure or modify bdf number. So this 3 How are the values determined .
The classic saying is ,bdf number By pcie Bus hardware topology to determine . This statement is based on pcie There's no problem with the specification , But the precondition is that the entire bus must be enumerated according to the specification . Before enumeration , In fact, for each device bdf number It's uncertain .[ notes 1]
1.1.1 function number The determination of
function number It's for more function The device is used to distinguish which one of the devices is specifically accessed function Of . So for most single function In terms of equipment ,function number It's fixed to 0; For multiple function Of device Or support virtual function Of device,function number Also by device Internal to manage and differentiate , You don't need to enumerate the bus to determine .
1.1.2 device and bus number The determination of
For support ID route , Every PCIE equipment ( Endpoints and switches ) A register for storing device bus number and device number shall be set in , Reset time , The register is clear 0, Every time a device detects a Type0 Of config transaction Transaction package , It should be TLP In the header 8~9 byte “ Capture ” Bus number and device As its own bus and device Number , And stored in the above bus number and device number register . So it's receiving at least one Type0 Before configuring access to transaction packages , The device will not respond to any transaction other than the configuration cycle .PCIE Association The configuration space unit for storing bus number and device number information is not defined in the protocol , It's just that it has to do it .
Two docking PCIE equipment , The main device is RC End , The slave device is EP End , After power on and reset ,EP How to get yourself bus number What about ?
In such a PCIE In structure , After power on reset ,RC The end initiates a pair of EP Configuration access transaction ,EP Will resolve the configuration request bus number, And save it , As one's own bus number Number . And then you can do something else TLP Business . in other words , After power on reset ,EP You must first receive a configuration request , And then you can respond to other TLP Business .
@【 notes 1】, Here's a point , If the device is not enumerated according to the specification . about rc Go straight to the next ep device The situation of , In a bare metal environment, in fact rc Of driver It can be the opposite end ep To assign arbitrary bus and device number. because pcie It's a point-to-point connection , The first stroke Type0 Of config transaction The transaction bus and device number Whatever the value , It's going to be opposite ep Received , And keep it as your own bus and device number. Follow up with this bus and device number You can access the opposite end of ep equipment , until ep Device reset .
1.2 enumeration
The previous content has already explained a device's bdf number The determination of , Then the process of enumeration is rc The system software uses configuration space access to determine and scan the entire bus topology .
版权声明
本文为[osc_o44vh5qb]所创,转载请带上原文链接,感谢
边栏推荐
- print( 'Hello,NumPy!' )
- 2020-11-05
- Japan PSE certification
- 成功解决An error ocurred while starting the kernel
- Qt混合Python开发技术:Python介绍、混合过程和Demo
- Distributed consensus mechanism
- AMD Zen3首发评测:频率超5GHz,IPC提升不止19%,这次真的Yes了 - 知乎
- 什么你的电脑太渣?这几招包你搞定! (Win10优化教程)
- Wechat nickname Emoji expression, special expression causes the list not to be displayed, export excel error report and other problems solved!
- 进程、线程和协程的区别
猜你喜欢
双向LSTM在时间序列异常值检测的应用
Rust:命令行参数与环境变量操作
QT hybrid Python development technology: Python introduction, hybrid process and demo
Experience the latest version of erofs on Ubuntu
How can a technician take over a complex system?
“智能5G”引领世界,数位智能网优+5G能带来什么?
IOS learning note 2 [problems and solutions encountered during the installation and use of cocopods] [update 20160725]
NOIP 2012 提高组 复赛 第一天 第二题 国王游戏 game 数学推导 AC代码(高精度 低精度 乘 除 比较)+60代码(long long)+20分代码(全排列+深搜dfs)
Python loop distinction (while loop and for loop)
Basic concepts of computer network (5) basic principles of local area network
随机推荐
Fgagt: flow guided adaptive graph tracking
模板链表类学习
Deeplight Technology Bluetooth protocol SRRC certification services
C / C + + Programming Notes: what are the advantages of C compared with other programming languages?
ASP.NET MVC下基于异常处理的完整解决方案
什么你的电脑太渣?这几招包你搞定! (Win10优化教程)
ulab 1.0.0发布
归纳一些比较好用的函数
【原创】关于高版本poi autoSizeColumn方法异常的情况
SQL Server 2008R2 18456 error resolution
Qt混合Python开发技术:Python介绍、混合过程和Demo
Littlest JupyterHub| 02 使用nbgitpuller分发共享文件
[summary series] technical system of Internet server: high performance database index
iOS 学习笔记二【cocopods安装使用和安装过程中遇到的问题及解决办法】【20160725更新】
How can a technician take over a complex system?
PX4添加新的应用
python_scrapy_房天下
ubuntu实时显示cpu、内存占用率
Qt混合Python开发技术:Python介绍、混合过程和Demo
接口