当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 函数周期表丨筛选丨值丨SELECTEDVALUE - 知乎
- Swiper window width changes, page width height changes lead to automatic sliding solution
- 5g + Ar out of the circle, China Mobile Migu becomes the whole process strategic partner of the 33rd China Film Golden Rooster Award
- 游戏优化性能杂谈(十一) - 知乎
- 哔哩哔哩常用api
- Unparseable date: 'Mon Aug 15 11:24:39 CST 2016',时间格式转换异常
- sed之查找替换
- The difference between vivoy 73s and glory 30 Youth Edition
- Windows下子系统Ubuntu安装
- ts流中的pcr与pts计算与逆运算
猜你喜欢
Daily challenges of search engines_ 4_ External heterogeneous resources - Zhihu
c# 表达式树(一)
Brief history of computer
Rust:命令行参数与环境变量操作
游戏优化性能杂谈(十一) - 知乎
2020-11-07:已知一个正整数数组,两个数相加等于N并且一定存在,如何找到两个数相乘最小的两个数?
Six key points of data science interview
ASP.NET MVC下基于异常处理的完整解决方案
scala 中 Future 的简单使用
vivoY73s和vivoY70s的区别 vivoY73s和vivoY70s哪个值得入手
随机推荐
What? Your computer is too bad? You can handle these moves! (win10 optimization tutorial)
Test requirements for MIC certification of Bluetooth 2.4G products in Japan
python学习 day1——基础学习
0.计算机简史
PerconaXtraDBCluster8.0 最详尽用法指南
python_ scrapy_ Fang Tianxia
计算机网络基本概念(五)局域网基本原理
Daily challenges of search engines_ 4_ External heterogeneous resources - Zhihu
Solve the problem of rabbitmq message loss and repeated consumption
Astra: the future of Apache Cassandra is cloud native
高并发,你真的理解透彻了吗?
More than 50 object detection datasets from different industries
VC6兼容性及打开文件崩溃问题解决
i5 1135g7和i5 1035g1参数对比区别大吗? 哪个好
5g/4g工业无线路由器
Oschina plays on Sunday - before that, I always thought I was a
Cloud Alibabab笔记问世,全网详解仅此一份手慢无
golang 匿名结构体成员,具名结构体成员,继承,组合
Template linked list learning
【原创】关于高版本poi autoSizeColumn方法异常的情况