mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-22 15:23:23 +00:00
🆕 按照class来读取对应的pci设备的接口
This commit is contained in:
@ -1,3 +1,19 @@
|
||||
#include "ahci.h"
|
||||
#include "../../../common/kprint.h"
|
||||
|
||||
struct pci_device_structure_header_t *ahci_devices[100];
|
||||
uint32_t count_ahci_devices = 0;
|
||||
|
||||
/**
|
||||
* @brief 初始化ahci模块
|
||||
*
|
||||
*/
|
||||
void ahci_init()
|
||||
{
|
||||
pci_get_device_structure(0x1, 0x6, ahci_devices, &count_ahci_devices);
|
||||
|
||||
for(int i=0;i<count_ahci_devices;++i)
|
||||
{
|
||||
kdebug("[%d] class_code=%d, sub_class=%d, progIF=%d", i, ahci_devices[i]->Class_code, ahci_devices[i]->SubClass, ahci_devices[i]->ProgIF);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user