Console Platform DXE Driver, install Console Device Guids and update Console\r
Environment Variables.\r
\r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
EFI_STATUS Status;\r
EFI_HANDLE PciHandle;\r
EFI_HANDLE GopHandle;\r
- EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *OpenInfoBuffer;\r
- UINTN EntryCount;\r
- UINTN Index;\r
- EFI_DEVICE_PATH_PROTOCOL *ChildDevicePath;\r
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;\r
\r
//\r
if (EFI_ERROR (Status)) {\r
return FALSE;\r
}\r
-\r
- Status = gBS->OpenProtocolInformation (\r
- PciHandle,\r
- &gEfiPciIoProtocolGuid,\r
- &OpenInfoBuffer,\r
- &EntryCount\r
- );\r
- if (EFI_ERROR (Status)) {\r
- return FALSE;\r
- }\r
-\r
- for (Index = 0; Index < EntryCount; Index++) {\r
- //\r
- // Query all the children created by the GOP driver\r
- //\r
- if ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) != 0) {\r
- Status = gBS->OpenProtocol (\r
- OpenInfoBuffer[Index].ControllerHandle,\r
- &gEfiDevicePathProtocolGuid,\r
- (VOID **) &ChildDevicePath,\r
- NULL,\r
- NULL,\r
- EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
- );\r
- if (!EFI_ERROR (Status)) {\r
- //\r
- // Append the device path to ConOutDev and ErrOutDev\r
- //\r
- ConPlatformUpdateDeviceVariable (L"ConOutDev", ChildDevicePath, Append);\r
- ConPlatformUpdateDeviceVariable (L"ErrOutDev", ChildDevicePath, Append);\r
- }\r
- }\r
+ TempDevicePath = EfiBootManagerGetGopDevicePath (PciHandle);\r
+ if (TempDevicePath != NULL) {\r
+ ConPlatformUpdateDeviceVariable (L"ConOutDev", TempDevicePath, Append);\r
+ ConPlatformUpdateDeviceVariable (L"ErrOutDev", TempDevicePath, Append);\r
}\r
- FreePool (OpenInfoBuffer);\r
-\r
return TRUE;\r
}\r