EFI_STATUS Status;
UINTN HandleCount;
EFI_HANDLE *HandleBuffer=NULL;
UINTN Index;
EFI_PCI_IO_PROTOCOL *PciIo = NULL;
UINTN Seg,Bus,Dev,Fun;
UINT8 MacAddr[6];
PCI_TYPE00 PciData;
Status = gBS->LocateHandleBuffer (
ByProtocol,
&gEfiPciIoProtocolGuid,
NULL,
&HandleCount,
&HandleBuffer
);
if(HandleCount == 0){
return Status;
}
for(Index = 0; Index < HandleCount;Index++){
Status = gBS->HandleProtocol (
HandleBuffer[Index],
&gEfiPciIoProtocolGuid,
(VOID **) &PciIo
);
if(EFI_ERROR(Status)){
continue;
}
PciIo->GetLocation(PciIo,&Seg,&Bus,&Dev,&Fun);
uefi遍历pcie设备
最新推荐文章于 2024-09-12 16:37:12 发布