mirror of https://github.com/acidanthera/audk.git
Print PCI Interrupt Line/Interrupt Pin registers before booting legacy OS.
Signed-off-by: niruiyu Reviewed-by: li-elvin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12088 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
8db6a82c50
commit
7dad86fc60
|
@ -135,6 +135,72 @@ PrintHddInfo (
|
|||
return ;
|
||||
}
|
||||
|
||||
/**
|
||||
Print the PCI Interrupt Line and Interrupt Pin registers.
|
||||
**/
|
||||
VOID
|
||||
PrintPciInterruptRegister (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINTN Index;
|
||||
EFI_HANDLE *Handles;
|
||||
UINTN HandleNum;
|
||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||
UINT8 Interrupt[2];
|
||||
UINTN Segment;
|
||||
UINTN Bus;
|
||||
UINTN Device;
|
||||
UINTN Function;
|
||||
|
||||
gBS->LocateHandleBuffer (
|
||||
ByProtocol,
|
||||
&gEfiPciIoProtocolGuid,
|
||||
NULL,
|
||||
&HandleNum,
|
||||
&Handles
|
||||
);
|
||||
|
||||
Bus = 0;
|
||||
Device = 0;
|
||||
Function = 0;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "\n"));
|
||||
DEBUG ((EFI_D_INFO, " bb/dd/ff interrupt line interrupt pin\n"));
|
||||
DEBUG ((EFI_D_INFO, "======================================\n"));
|
||||
for (Index = 0; Index < HandleNum; Index++) {
|
||||
Status = gBS->HandleProtocol (Handles[Index], &gEfiPciIoProtocolGuid, (VOID **) &PciIo);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = PciIo->Pci.Read (
|
||||
PciIo,
|
||||
EfiPciIoWidthUint8,
|
||||
PCI_INT_LINE_OFFSET,
|
||||
2,
|
||||
Interrupt
|
||||
);
|
||||
}
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = PciIo->GetLocation (
|
||||
PciIo,
|
||||
&Segment,
|
||||
&Bus,
|
||||
&Device,
|
||||
&Function
|
||||
);
|
||||
}
|
||||
if (!EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_INFO, " %02x/%02x/%02x 0x%02x 0x%02x\n",
|
||||
Bus, Device, Function, Interrupt[0], Interrupt[1]));
|
||||
}
|
||||
}
|
||||
DEBUG ((EFI_D_INFO, "\n"));
|
||||
|
||||
if (Handles != NULL) {
|
||||
FreePool (Handles);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Identify drive data must be updated to actual parameters before boot.
|
||||
|
||||
|
@ -1031,9 +1097,11 @@ GenericLegacyBoot (
|
|||
&LocalBbsTable
|
||||
);
|
||||
|
||||
PrintBbsTable (LocalBbsTable);
|
||||
PrintHddInfo (LocalHddInfo);
|
||||
|
||||
DEBUG_CODE (
|
||||
PrintPciInterruptRegister ();
|
||||
PrintBbsTable (LocalBbsTable);
|
||||
PrintHddInfo (LocalHddInfo);
|
||||
);
|
||||
//
|
||||
// If drive wasn't spun up then BuildIdeData may have found new drives.
|
||||
// Need to update BBS boot priority.
|
||||
|
|
Loading…
Reference in New Issue