13#define PCI_DEVICE_PATH_NODE(Func, Dev) \
16 HARDWARE_DEVICE_PATH, \
19 (UINT8) (sizeof (PCI_DEVICE_PATH)), \
20 (UINT8) ((sizeof (PCI_DEVICE_PATH)) >> 8) \
27#define PNPID_DEVICE_PATH_NODE(PnpId) \
33 (UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), \
34 (UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) \
37 EISA_PNP_ID((PnpId)), \
41#define gPnp16550ComPort \
42 PNPID_DEVICE_PATH_NODE(0x0501)
44#define gPnpPs2Keyboard \
45 PNPID_DEVICE_PATH_NODE(0x0303)
47#define gPcAnsiTerminal \
50 MESSAGING_DEVICE_PATH, \
53 (UINT8) (sizeof (VENDOR_DEVICE_PATH)), \
54 (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \
57 DEVICE_PATH_MESSAGING_PC_ANSI \
64BOOLEAN mDetectDisplayOnly;
84 Status =
gBS->HandleProtocol (
86 &gEfiDevicePathProtocolGuid,
89 if (EFI_ERROR (Status)) {
122 UINTN GopHandleCount;
125 if ((PciDevicePath ==
NULL) || (GopDevicePath ==
NULL)) {
126 return EFI_INVALID_PARAMETER;
132 *GopDevicePath = PciDevicePath;
133 TempPciDevicePath = PciDevicePath;
135 Status =
gBS->LocateDevicePath (
136 &gEfiDevicePathProtocolGuid,
140 if (EFI_ERROR (Status)) {
146 Status =
gBS->LocateHandleBuffer (
148 &gEfiGraphicsOutputProtocolGuid,
153 if (!EFI_ERROR (Status)) {
157 for (Index = 0; Index < GopHandleCount; Index++) {
158 Status =
gBS->HandleProtocol (GopHandleBuffer[Index], &gEfiDevicePathProtocolGuid, (VOID *)&TempDevicePath);
159 if (EFI_ERROR (Status)) {
175 *GopDevicePath = TempDevicePath;
186 gBS->FreePool (GopHandleBuffer);
211 Status =
gBS->HandleProtocol (
213 &gEfiDevicePathProtocolGuid,
216 if (EFI_ERROR (Status)) {
221 DevicePath = GopDevicePath;
241 IN SIMPLE_PROTOCOL_INSTANCE_CALLBACK CallBackFunction
255 Status =
gBS->LocateHandleBuffer (
262 if (EFI_ERROR (Status)) {
266 for (Index = 0; Index < HandleCount; Index++) {
267 Status =
gBS->HandleProtocol (HandleBuffer[Index], Id, &Instance);
268 if (EFI_ERROR (Status)) {
272 Status = (*CallBackFunction)(
278 gBS->FreePool (HandleBuffer);
310 Status = PciIo->Pci.
Read (
314 sizeof (Pci) /
sizeof (UINT32),
317 if (EFI_ERROR (Status)) {
321 Status = PciIo->Attributes (
324 EFI_PCI_DEVICE_ENABLE,
329 if (!mDetectDisplayOnly) {
334 ((IS_PCI_ISA_PDECODE (&Pci)) &&
335 (Pci.Hdr.VendorId == 0x8086)
343 DEBUG ((DEBUG_INFO,
"Found LPC Bridge device\n"));
356 DEBUG ((DEBUG_INFO,
"Found PCI Display device\n"));
384 Status =
gBS->HandleProtocol (
386 &gEfiDevicePathProtocolGuid,
408 BOOLEAN DetectDisplayOnly
413 mDetectDisplayOnly = DetectDisplayOnly;
422 &gEfiSerialIoProtocolGuid,
427 &gEfiPciIoProtocolGuid,
452 if (EFI_ERROR (Status)) {
471 &gEfiPciRootBridgeIoProtocolGuid,
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
UINTN EFIAPI GetDevicePathSize(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
@ EfiPciIoAttributeOperationEnable
#define IS_PCI_DISPLAY(_p)
EFI_STATUS EFIAPI EfiBootManagerConnectVideoController(EFI_HANDLE VideoController OPTIONAL)
EFI_STATUS EFIAPI EfiBootManagerUpdateConsoleVariable(IN CONSOLE_TYPE ConsoleType, IN EFI_DEVICE_PATH_PROTOCOL *CustomizedConDevicePath, IN EFI_DEVICE_PATH_PROTOCOL *ExclusiveDevicePath)
EFI_PCI_IO_PROTOCOL_CONFIG Read