/** @file\r
Header file for Console Platfrom DXE Driver.\r
\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
-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
#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
//\r
// Driver Binding Externs\r
//\r
-extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding;\r
-extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;\r
-extern EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2;\r
-extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding;\r
-extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;\r
-extern EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2;\r
-\r
+extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding;\r
+extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;\r
+extern EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2;\r
+extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding;\r
+extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;\r
+extern EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2;\r
\r
typedef enum {\r
Check,\r
} 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
);\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
);\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
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
EFI_STATUS\r
EFIAPI\r
ConPlatformTextInDriverBindingStart (\r
- IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
- IN EFI_HANDLE Handle,\r
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
+ IN EFI_HANDLE Handle,\r
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
);\r
\r
/**\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
EFI_STATUS\r
EFIAPI\r
ConPlatformTextOutDriverBindingStart (\r
- IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
- IN EFI_HANDLE Handle,\r
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
+ IN EFI_HANDLE Handle,\r
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
);\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
);\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
@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
VOID *\r
ConPlatformGetVariable (\r
- IN CHAR16 *Name\r
+ IN CHAR16 *Name\r
);\r
\r
/**\r
**/\r
EFI_STATUS\r
ConPlatformUpdateDeviceVariable (\r
- IN CHAR16 *VariableName,\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
- 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
+ IN CHAR16 *VariableName,\r
+ IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
+ IN CONPLATFORM_VAR_OPERATION Operation\r
);\r
\r
//\r
// EFI Component Name Functions\r
//\r
+\r
/**\r
Retrieves a Unicode string that is the user readable name of the driver.\r
\r
OUT CHAR16 **DriverName\r
);\r
\r
-\r
/**\r
Retrieves a Unicode string that is the user readable name of the controller\r
that is being managed by a driver.\r
EFI_STATUS\r
EFIAPI\r
ConPlatformComponentNameGetControllerName (\r
- IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
- IN EFI_HANDLE ControllerHandle,\r
- IN EFI_HANDLE ChildHandle OPTIONAL,\r
- IN CHAR8 *Language,\r
- OUT CHAR16 **ControllerName\r
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
+ IN EFI_HANDLE ControllerHandle,\r
+ IN EFI_HANDLE ChildHandle OPTIONAL,\r
+ IN CHAR8 *Language,\r
+ OUT CHAR16 **ControllerName\r
);\r
\r
/**\r
**/\r
BOOLEAN\r
ConPlatformUpdateGopCandidate (\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
+ IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
);\r
\r
#endif\r