]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Universal / Console / ConPlatformDxe / ConPlatform.h
index 28261730ab04f9bf94a67582c1c12096389a1ef7..f11af2192d84411f80fad4786496772293d2cf18 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   Header file for Console Platfrom DXE Driver.\r
 \r
-Copyright (c) 2006 - 2010, 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
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -20,6 +14,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/SimpleTextOut.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/SimpleTextIn.h>\r
+#include <Protocol/PciIo.h>\r
+#include <Protocol/UsbIo.h>\r
+#include <Protocol/GraphicsOutput.h>\r
 \r
 #include <Guid/GlobalVariable.h>\r
 #include <Guid/ConsoleInDevice.h>\r
@@ -34,6 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/UefiRuntimeServicesTableLib.h>\r
 #include <Library/DevicePathLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
+#include <Library/UefiBootManagerLib.h>\r
 \r
 //\r
 // Driver Binding Externs\r
@@ -53,7 +51,7 @@ typedef enum {
 } CONPLATFORM_VAR_OPERATION;\r
 \r
 /**\r
-  Test to see if specific protocol could be supported on the ControllerHandle. \r
+  Test to see if specific protocol could be supported on the ControllerHandle.\r
 \r
   @param  This                Protocol instance pointer.\r
   @param  ControllerHandle    Handle of device to test.\r
@@ -71,7 +69,7 @@ ConPlatformDriverBindingSupported (
   );\r
 \r
 /**\r
-  Test to see if EFI_SIMPLE_TEXT_INPUT_PROTOCOL is supported on ControllerHandle. \r
+  Test to see if EFI_SIMPLE_TEXT_INPUT_PROTOCOL is supported on ControllerHandle.\r
 \r
   @param  This                Protocol instance pointer.\r
   @param  ControllerHandle    Handle of device to test.\r
@@ -91,7 +89,7 @@ ConPlatformTextInDriverBindingSupported (
   );\r
 \r
 /**\r
-  Test to see if EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is supported on ControllerHandle. \r
+  Test to see if EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is supported on ControllerHandle.\r
 \r
   @param  This                Protocol instance pointer.\r
   @param  ControllerHandle    Handle of device to test.\r
@@ -116,9 +114,8 @@ ConPlatformTextOutDriverBindingSupported (
   Start this driver on ControllerHandle by opening Simple Text Input Protocol,\r
   reading Device Path, and installing Console In Devcice GUID on ControllerHandle.\r
 \r
-  If this devcie is not one hot-plug devce, append its device path into the \r
-  console environment variables ConInDev.\r
-  \r
+  Append its device path into the console environment variables ConInDev.\r
+\r
   @param  This                 Protocol instance pointer.\r
   @param  ControllerHandle     Handle of device to bind driver to\r
   @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
@@ -138,15 +135,14 @@ ConPlatformTextInDriverBindingStart (
   );\r
 \r
 /**\r
-  Start this driver on the device for console output and stardard error output.\r
+  Start this driver on the device for console output and standard error output.\r
 \r
   Start this driver on ControllerHandle by opening Simple Text Output Protocol,\r
   reading Device Path, and installing Console Out Devcic GUID, Standard Error\r
   Device GUID on ControllerHandle.\r
 \r
-  If this devcie is not one hot-plug devce, append its device path into the \r
-  console environment variables ConOutDev, StdErrDev.\r
-  \r
+  Append its device path into the console environment variables ConOutDev, ErrOutDev.\r
+\r
   @param  This                 Protocol instance pointer.\r
   @param  ControllerHandle     Handle of device to bind driver to\r
   @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
@@ -166,7 +162,7 @@ ConPlatformTextOutDriverBindingStart (
   );\r
 \r
 /**\r
-  Stop this driver on ControllerHandle by removing Console In Devcice GUID \r
+  Stop this driver on ControllerHandle by removing Console In Devcice GUID\r
   and closing the Simple Text Input protocol on ControllerHandle.\r
 \r
   @param  This              Protocol instance pointer.\r
@@ -189,7 +185,7 @@ ConPlatformTextInDriverBindingStop (
   );\r
 \r
 /**\r
-  Stop this driver on ControllerHandle by removing Console Out Devcice GUID \r
+  Stop this driver on ControllerHandle by removing Console Out Devcice GUID\r
   and closing the Simple Text Output protocol on ControllerHandle.\r
 \r
   @param  This              Protocol instance pointer.\r
@@ -233,7 +229,7 @@ ConPlatformUnInstallProtocol (
   @param  Name             String part of EFI variable name\r
 \r
   @return Dynamically allocated memory that contains a copy of the EFI variable.\r
-          Caller is repsoncible freeing the buffer. Return NULL means Variable \r
+          Caller is repsoncible freeing the buffer. Return NULL means Variable\r
           was not read.\r
 \r
 **/\r
@@ -291,23 +287,6 @@ ConPlatformUpdateDeviceVariable (
   IN  CONPLATFORM_VAR_OPERATION Operation\r
   );\r
 \r
-/**\r
-  Check if the device supports hot-plug through its device path.\r
-\r
-  This function could be updated to check more types of Hot Plug devices.\r
-  Currently, it checks USB and PCCard device.\r
-\r
-  @param  DevicePath            Pointer to device's device path.\r
-\r
-  @retval TRUE                  The devcie is a hot-plug device\r
-  @retval FALSE                 The devcie is not a hot-plug device.\r
-\r
-**/\r
-BOOLEAN\r
-IsHotPlugDevice (\r
-  IN  EFI_DEVICE_PATH_PROTOCOL    *DevicePath\r
-  );\r
-\r
 //\r
 // EFI Component Name Functions\r
 //\r
@@ -400,7 +379,7 @@ ConPlatformComponentNameGetDriverName (
                                 the language specified by Language for the\r
                                 driver specified by This was returned in\r
                                 DriverName.\r
-  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
   @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
                                 EFI_HANDLE.\r
   @retval EFI_INVALID_PARAMETER Language is NULL.\r
@@ -422,5 +401,19 @@ ConPlatformComponentNameGetControllerName (
   OUT CHAR16                                          **ControllerName\r
   );\r
 \r
+/**\r
+  Update ConOutDev and ErrOutDev variables to add the device path of\r
+  GOP controller itself and the sibling controllers.\r
+\r
+  @param  DevicePath            Pointer to device's device path.\r
+\r
+  @retval TRUE                  The devcie is a GOP device.\r
+  @retval FALSE                 The devcie is not a GOP device.\r
+\r
+**/\r
+BOOLEAN\r
+ConPlatformUpdateGopCandidate (\r
+  IN  EFI_DEVICE_PATH_PROTOCOL    *DevicePath\r
+  );\r
 \r
 #endif\r