/** @file\r
Library functions which contain all the code to connect console device.\r
\r
-Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
}\r
}\r
FreePool (RootBridgeHandleBuffer);\r
- \r
+\r
return VideoController;\r
}\r
\r
/**\r
- Query all the children of VideoController and return the device paths of all the \r
+ Query all the children of VideoController and return the device paths of all the\r
children that support GraphicsOutput protocol.\r
\r
@param VideoController PCI handle of video controller.\r
)\r
{\r
EFI_DEVICE_PATH_PROTOCOL *Gop;\r
- \r
+\r
if (VideoController == NULL) {\r
//\r
// Get the platform vga device\r
//\r
VideoController = BmGetVideoController ();\r
}\r
- \r
+\r
if (VideoController == NULL) {\r
return EFI_NOT_FOUND;\r
}\r
//\r
// Try to connect the PCI device path, so that GOP driver could start on this\r
// device and create child handles with GraphicsOutput Protocol installed\r
- // on them, then we get device paths of these child handles and select \r
+ // on them, then we get device paths of these child handles and select\r
// them as possible console device.\r
//\r
gBS->ConnectController (VideoController, NULL, NULL, FALSE);\r
Fill console handle in System Table if there are no valid console handle in.\r
\r
Firstly, check the validation of console handle in System Table. If it is invalid,\r
- update it by the first console device handle from EFI console variable. \r
+ update it by the first console device handle from EFI console variable.\r
\r
@param VarName The name of the EFI console variable.\r
@param ConsoleGuid Specified Console protocol GUID.\r
- @param ConsoleHandle On IN, console handle in System Table to be checked. \r
+ @param ConsoleHandle On IN, console handle in System Table to be checked.\r
On OUT, new console handle in system table.\r
- @param ProtocolInterface On IN, console protocol on console handle in System Table to be checked. \r
+ @param ProtocolInterface On IN, console protocol on console handle in System Table to be checked.\r
On OUT, new console protocol on new console handle in system table.\r
\r
@retval TRUE System Table has been updated.\r
@retval FALSE System Table hasn't been updated.\r
\r
**/\r
-BOOLEAN \r
+BOOLEAN\r
BmUpdateSystemTableConsole (\r
IN CHAR16 *VarName,\r
IN EFI_GUID *ConsoleGuid,\r
return FALSE;\r
}\r
}\r
- \r
+\r
//\r
// Get all possible consoles device path from EFI variable\r
//\r
FreePool (FullDevicePath);\r
return FALSE;\r
}\r
- \r
+\r
//\r
// Find console device handle by device path instance\r
//\r
FreePool (StartDevicePath);\r
return EFI_UNSUPPORTED;\r
}\r
- \r
+\r
Next = Instance;\r
while (!IsDevicePathEndType (Next)) {\r
Next = NextDevicePathNode (Next);\r
SetDevicePathEndNode (Next);\r
//\r
// Connect the USB console\r
- // USB console device path is a short-form device path that \r
+ // USB console device path is a short-form device path that\r
// starts with the first element being a USB WWID\r
// or a USB Class device path\r
//\r
for (Next = Instance; !IsDevicePathEnd (Next); Next = NextDevicePathNode (Next)) {\r
if (DevicePathType (Next) == ACPI_DEVICE_PATH && DevicePathSubType (Next) == ACPI_ADR_DP) {\r
break;\r
- } else if (DevicePathType (Next) == HARDWARE_DEVICE_PATH && \r
+ } else if (DevicePathType (Next) == HARDWARE_DEVICE_PATH &&\r
DevicePathSubType (Next) == HW_CONTROLLER_DP &&\r
DevicePathType (NextDevicePathNode (Next)) == ACPI_DEVICE_PATH &&\r
DevicePathSubType (NextDevicePathNode (Next)) == ACPI_ADR_DP\r
}\r
PERF_EVENT ("ConOutReady");\r
\r
- \r
+\r
Status = EfiBootManagerConnectConsoleVariable (ConIn);\r
if (!EFI_ERROR (Status)) {\r
OneConnected = TRUE;\r