return ;\r
}\r
\r
+/**\r
+ Print the PCI Interrupt Line and Interrupt Pin registers.\r
+**/\r
+VOID\r
+PrintPciInterruptRegister (\r
+ VOID\r
+ )\r
+{\r
+ EFI_STATUS Status;\r
+ UINTN Index;\r
+ EFI_HANDLE *Handles;\r
+ UINTN HandleNum;\r
+ EFI_PCI_IO_PROTOCOL *PciIo;\r
+ UINT8 Interrupt[2];\r
+ UINTN Segment;\r
+ UINTN Bus;\r
+ UINTN Device;\r
+ UINTN Function;\r
+\r
+ gBS->LocateHandleBuffer (\r
+ ByProtocol,\r
+ &gEfiPciIoProtocolGuid,\r
+ NULL,\r
+ &HandleNum,\r
+ &Handles\r
+ );\r
+\r
+ Bus = 0;\r
+ Device = 0;\r
+ Function = 0;\r
+\r
+ DEBUG ((EFI_D_INFO, "\n"));\r
+ DEBUG ((EFI_D_INFO, " bb/dd/ff interrupt line interrupt pin\n"));\r
+ DEBUG ((EFI_D_INFO, "======================================\n"));\r
+ for (Index = 0; Index < HandleNum; Index++) {\r
+ Status = gBS->HandleProtocol (Handles[Index], &gEfiPciIoProtocolGuid, (VOID **) &PciIo);\r
+ if (!EFI_ERROR (Status)) {\r
+ Status = PciIo->Pci.Read (\r
+ PciIo,\r
+ EfiPciIoWidthUint8,\r
+ PCI_INT_LINE_OFFSET,\r
+ 2,\r
+ Interrupt\r
+ );\r
+ }\r
+ if (!EFI_ERROR (Status)) {\r
+ Status = PciIo->GetLocation (\r
+ PciIo,\r
+ &Segment,\r
+ &Bus,\r
+ &Device,\r
+ &Function\r
+ );\r
+ }\r
+ if (!EFI_ERROR (Status)) {\r
+ DEBUG ((EFI_D_INFO, " %02x/%02x/%02x 0x%02x 0x%02x\n",\r
+ Bus, Device, Function, Interrupt[0], Interrupt[1]));\r
+ }\r
+ }\r
+ DEBUG ((EFI_D_INFO, "\n"));\r
+\r
+ if (Handles != NULL) {\r
+ FreePool (Handles);\r
+ }\r
+}\r
+\r
/**\r
Identify drive data must be updated to actual parameters before boot.\r
\r
&LocalBbsTable\r
);\r
\r
- PrintBbsTable (LocalBbsTable);\r
- PrintHddInfo (LocalHddInfo);\r
-\r
+ DEBUG_CODE (\r
+ PrintPciInterruptRegister ();\r
+ PrintBbsTable (LocalBbsTable);\r
+ PrintHddInfo (LocalHddInfo);\r
+ );\r
//\r
// If drive wasn't spun up then BuildIdeData may have found new drives.\r
// Need to update BBS boot priority.\r