X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FConsole%2FConPlatformDxe%2FConPlatform.h;h=f63b25c465f85cffe366d96ad1b57071dfa1eb4c;hb=1436aea4d5707e672672a11bda72be2c63c936c3;hp=4787fc098de011510b287434ea3e8684efbb844d;hpb=0254efc01e461445240512ae1a1c2fc48ed2f70e;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h index 4787fc098d..f63b25c465 100644 --- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h +++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h @@ -1,14 +1,8 @@ /** @file Header file for Console Platfrom DXE Driver. -Copyright (c) 2006 - 2008, Intel Corporation.
-All rights reserved. This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -20,6 +14,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include +#include +#include +#include #include #include @@ -34,26 +31,26 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include +#include // // Driver Binding Externs // -extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding; -extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName; -extern EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2; -extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding; -extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName; -extern EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2; - +extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding; +extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName; +extern EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2; +extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding; +extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName; +extern EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2; typedef enum { - CHECK, - APPEND, - DELETE + Check, + Append, + Delete } CONPLATFORM_VAR_OPERATION; /** - Test to see if specific protocol could be supported on the ControllerHandle. + Test to see if specific protocol could be supported on the ControllerHandle. @param This Protocol instance pointer. @param ControllerHandle Handle of device to test. @@ -71,7 +68,7 @@ ConPlatformDriverBindingSupported ( ); /** - Test to see if EFI_SIMPLE_TEXT_INPUT_PROTOCOL is supported on ControllerHandle. + Test to see if EFI_SIMPLE_TEXT_INPUT_PROTOCOL is supported on ControllerHandle. @param This Protocol instance pointer. @param ControllerHandle Handle of device to test. @@ -91,7 +88,7 @@ ConPlatformTextInDriverBindingSupported ( ); /** - Test to see if EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is supported on ControllerHandle. + Test to see if EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is supported on ControllerHandle. @param This Protocol instance pointer. @param ControllerHandle Handle of device to test. @@ -116,9 +113,8 @@ ConPlatformTextOutDriverBindingSupported ( Start this driver on ControllerHandle by opening Simple Text Input Protocol, reading Device Path, and installing Console In Devcice GUID on ControllerHandle. - If this devcie is not one hot-plug devce, append its device path into the - console environment variables ConInDev. - + Append its device path into the console environment variables ConInDev. + @param This Protocol instance pointer. @param ControllerHandle Handle of device to bind driver to @param RemainingDevicePath Optional parameter use to pick a specific child @@ -132,21 +128,20 @@ ConPlatformTextOutDriverBindingSupported ( EFI_STATUS EFIAPI ConPlatformTextInDriverBindingStart ( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE Handle, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Handle, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath ); /** - Start this driver on the device for console output and stardard error output. + Start this driver on the device for console output and standard error output. Start this driver on ControllerHandle by opening Simple Text Output Protocol, reading Device Path, and installing Console Out Devcic GUID, Standard Error Device GUID on ControllerHandle. - If this devcie is not one hot-plug devce, append its device path into the - console environment variables ConOutDev, StdErrDev. - + Append its device path into the console environment variables ConOutDev, ErrOutDev. + @param This Protocol instance pointer. @param ControllerHandle Handle of device to bind driver to @param RemainingDevicePath Optional parameter use to pick a specific child @@ -160,13 +155,13 @@ ConPlatformTextInDriverBindingStart ( EFI_STATUS EFIAPI ConPlatformTextOutDriverBindingStart ( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE Handle, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath + IN EFI_DRIVER_BINDING_PROTOCOL *This, + IN EFI_HANDLE Handle, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath ); /** - Stop this driver on ControllerHandle by removing Console In Devcice GUID + Stop this driver on ControllerHandle by removing Console In Devcice GUID and closing the Simple Text Input protocol on ControllerHandle. @param This Protocol instance pointer. @@ -189,7 +184,7 @@ ConPlatformTextInDriverBindingStop ( ); /** - Stop this driver on ControllerHandle by removing Console Out Devcice GUID + Stop this driver on ControllerHandle by removing Console Out Devcice GUID and closing the Simple Text Output protocol on ControllerHandle. @param This Protocol instance pointer. @@ -233,13 +228,13 @@ ConPlatformUnInstallProtocol ( @param Name String part of EFI variable name @return Dynamically allocated memory that contains a copy of the EFI variable. - Caller is repsoncible freeing the buffer. Return NULL means Variable + Caller is repsoncible freeing the buffer. Return NULL means Variable was not read. **/ VOID * ConPlatformGetVariable ( - IN CHAR16 *Name + IN CHAR16 *Name ); /** @@ -286,31 +281,15 @@ ConPlatformMatchDevicePaths ( **/ EFI_STATUS ConPlatformUpdateDeviceVariable ( - IN CHAR16 *VariableName, - IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN CONPLATFORM_VAR_OPERATION Operation - ); - -/** - Check if the device supports hot-plug through its device path. - - This function could be updated to check more types of Hot Plug devices. - Currently, it checks USB and PCCard device. - - @param DevicePath Pointer to device's device path. - - @retval TRUE The devcie is a hot-plug device - @retval FALSE The devcie is not a hot-plug device. - -**/ -BOOLEAN -IsHotPlugDevice ( - IN EFI_DEVICE_PATH_PROTOCOL *DevicePath + IN CHAR16 *VariableName, + IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN CONPLATFORM_VAR_OPERATION Operation ); // // EFI Component Name Functions // + /** Retrieves a Unicode string that is the user readable name of the driver. @@ -353,7 +332,6 @@ ConPlatformComponentNameGetDriverName ( OUT CHAR16 **DriverName ); - /** Retrieves a Unicode string that is the user readable name of the controller that is being managed by a driver. @@ -400,7 +378,7 @@ ConPlatformComponentNameGetDriverName ( the language specified by Language for the driver specified by This was returned in DriverName. - @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. + @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. @retval EFI_INVALID_PARAMETER Language is NULL. @@ -415,12 +393,26 @@ ConPlatformComponentNameGetDriverName ( EFI_STATUS EFIAPI ConPlatformComponentNameGetControllerName ( - IN EFI_COMPONENT_NAME_PROTOCOL *This, - IN EFI_HANDLE ControllerHandle, - IN EFI_HANDLE ChildHandle OPTIONAL, - IN CHAR8 *Language, - OUT CHAR16 **ControllerName + IN EFI_COMPONENT_NAME_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_HANDLE ChildHandle OPTIONAL, + IN CHAR8 *Language, + OUT CHAR16 **ControllerName ); +/** + Update ConOutDev and ErrOutDev variables to add the device path of + GOP controller itself and the sibling controllers. + + @param DevicePath Pointer to device's device path. + + @retval TRUE The devcie is a GOP device. + @retval FALSE The devcie is not a GOP device. + +**/ +BOOLEAN +ConPlatformUpdateGopCandidate ( + IN EFI_DEVICE_PATH_PROTOCOL *DevicePath + ); #endif