微知-如何查看PCIe设备插入在哪个插槽以及对应的busid?(biosdecode)

背景

以前对于PCIe设备插入到服务器上,有几个slot(slot就是服务器硬件上的插槽)以及哪些插入了设备可用ipmitool查看(具体参考兄弟篇:https://blog.youkuaiyun.com/essencelite/article/details/139051451,但是无法知道某个slot插入的是什么设备?那有什么方法可以查看吗?本文主要介绍biosdecode命令以及查看PCIe slot,以及在该slot上的BUS ID等BDF信息。

命令

biosdecode

效果:
可以看到在PCI Interrupt Routing中显示PCIe的bus,以及后面有打印对应的slot,比如

Device: 05:00, slot 6
Device: 06:00, slot 7

这两个设备平时文章经常出现的设备,实际也是插入在slot6和7的:
在这里插入图片描述

[root@localhost ~]# biosdecode 
# biosdecode 3.5
ACPI 2.0 present.
        OEM Identifier: DELL  
        RSD Table 32-bit Address: 0x000F0E44
        XSD Table 64-bit Address: 0x00000000000F0F28
BIOS32 Service Directory present.
        Revision: 0
        Calling Interface Address: 0x000F15C0
PCI Interrupt Routing 1.0 present.
        Router Device: 00:1f.0
        Exclusive IRQs: None
        Compatible Router: 8086:1d40
        Device: 00:00, on-board
        Device: 00:01, on-board
        Device: 00:02, on-board
        Device: 00:03, on-board
        Device: 00:04, on-board
        Device: 00:11, on-board
        Device: 00:1a, on-board
        Device: 00:1c, on-board
        Device: 00:1d, on-board
        Device: 00:1f, on-board
        Device: 40:01, on-board
        Device: 40:02, on-board
        Device: 40:03, on-board
        Device: 40:04, on-board
        Device: 01:00, on-board
        Device: 02:00, on-board
        Device: 04:00, slot 5
        Device: 03:00, on-board
        Device: 05:00, slot 6
        Device: 06:00, slot 7
        Device: 41:00, slot 1
        Device: 42:00, slot 4
        Device: 44:00, slot 2
        Device: 43:00, slot 3
        Device: 0a:00, on-board
        Device: 0c:00, on-board
        Device: 0d:00, on-board
SYSID present.
        Revision: 0
        Structure Table Address: 0x000FCF91
        Number Of Structures: 1
SMBIOS 2.7 present.
        Structure Table Length: 6483 bytes
        Structure Table Address: 0xBF42C000
        Number Of Structures: 99
        Maximum Structure Size: 502 bytes
PNP BIOS 1.0 present.
        Event Notification: Not Supported
        Real Mode 16-bit Code Address: F000:E2F1
        Real Mode 16-bit Data Address: 0040:0000
        16-bit Protected Mode Code Address: 0x000FE2F4
        16-bit Protected Mode Data Address: 0x00000040
Intel Multiprocessor present.
        Specification Revision: 1.4
        Configuration Table Address: 0x000F0000
        Mode: Virtual Wire

其他

biosdecode所在的rpm包:dmidecode-3.5-1.0.1.an8.x86_64
在这里插入图片描述

综述

biosdecode的命令会列出BIOS期间的PCIe信息,这些信息是放在ACPI(Advanced Configuration and Power Interface,即高级配置和电源接口)的DSDT表中,通过biosdecode能够查看到。并且这些信息对于定位PCIe热插拔等场景的信息帮助比较大。比如知道插在哪个slot,可以得到对应的busid。比如知道busid可以找到对应slot信息。以及正常PCIe设备调试中一些信息显示不对,这里可以辅助查看信息

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值