From 216cadbbd86ecfc210720af3b36d2d5e3da829bb Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Wed, 9 Jul 2008 10:24:16 +0000 Subject: [PATCH] Add protocol several UEFI 2.1 protocol definitions so that some EDK 1.05 drivers can be built. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5439 6f19259b-4bc3-4df7-8a09-765794883524 --- .../AuthenticationInfo/AuthenticationInfo.c | 30 +++ .../AuthenticationInfo/AuthenticationInfo.h | 106 +++++++++++ .../DriverSupportedEfiVersion.c | 30 +++ .../DriverSupportedEfiVersion.h | 47 +++++ .../Efi/Protocol/EfiProtocolLib.inf | 8 + .../LoadedImageDevicePath.c | 32 ++++ .../LoadedImageDevicePath.h | 44 +++++ .../PlatformToDriverConfiguration.c | 31 ++++ .../PlatformToDriverConfiguration.h | 173 ++++++++++++++++++ 9 files changed, 501 insertions(+) create mode 100644 EdkCompatibilityPkg/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.c create mode 100644 EdkCompatibilityPkg/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.h create mode 100644 EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.c create mode 100644 EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.h create mode 100644 EdkCompatibilityPkg/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.c create mode 100644 EdkCompatibilityPkg/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.h create mode 100644 EdkCompatibilityPkg/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.c create mode 100644 EdkCompatibilityPkg/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.h diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.c new file mode 100644 index 0000000000..38393fa93b --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.c @@ -0,0 +1,30 @@ +/*++ + +Copyright (c) 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. + +Module Name: + + AuthenticationInfo.c + +Abstract: + + UEFI Authentication Info Protocol. + +Revision History: + +--*/ + +#include "EfiSpec.h" +#include EFI_PROTOCOL_DEFINITION (AuthenticationInfo) + +EFI_GUID gEfiAuthenticationInfoProtocolGuid = EFI_AUTHENTICATION_INFO_PROTOCOL_GUID; + +EFI_GUID_STRING + (&gEfiAuthenticationInfoProtocolGuid, "Authentication Info Protocol", "UEFI 2.1 Authentication Info Protocol"); diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.h new file mode 100644 index 0000000000..b85f4a44fb --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/AuthenticationInfo/AuthenticationInfo.h @@ -0,0 +1,106 @@ +/*++ + +Copyright (c) 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. + +Module Name: + + PlatformToDriverConfiguration.h + +Abstract: + + UEFI Authentication Info Protocol. + +Revision History: + +--*/ + +#ifndef _EFI_AUTHENTICATION_INFO_H_ +#define _EFI_AUTHENTICATION_INFO_H_ + +// +// Global ID for the Authentication Info Protocol +// +#define EFI_AUTHENTICATION_INFO_PROTOCOL_GUID \ + { \ + 0x7671d9d0, 0x53db, 0x4173, {0xaa, 0x69, 0x23, 0x27, 0xf2, 0x1f, 0x0b, 0xc7} \ + } + +EFI_FORWARD_DECLARATION (EFI_AUTHENTICATION_INFO_PROTOCOL); + +typedef +EFI_STATUS +(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_GET) ( + IN EFI_AUTHENTICATION_INFO_PROTOCOL *This, + IN EFI_HANDLE *ControllerHandle, + OUT VOID *Buffer + ); +/*++ + + Routine Description: + Retrieves the Authentication information associated with a particular + controller handle. + + Arguments: + This - Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL instance. + ControllerHandle - Handle to the Controller. + Buffer - Pointer to the authentication information. This function + is responsible for allocating the buffer and it is the + caller's responsibility to free buffer when the caller + is finished with buffer. + + Returns: + EFI_SUCCESS - Successfully retrieved Authentication information + for the given ControllerHandle. + EFI_NOT_FOUND - No matching Authentication information found for the + given ControllerHandle. + EFI_DEVICE_ERROR - The Authentication information could not be retrieved + due to a hardware error. + +--*/ + +typedef +EFI_STATUS +(EFIAPI *EFI_AUTHENTICATION_INFO_PROTOCOL_SET) ( + IN EFI_AUTHENTICATION_INFO_PROTOCOL *This, + IN EFI_HANDLE *ControllerHandle, + IN VOID *Buffer + ); +/*++ + + Routine Description: + Set the Authentication information for a given controller handle. + + Arguments: + This - Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL instance. + ControllerHandle - Handle to the Controller. + Buffer - Pointer to the authentication information. + + Returns: + EFI_SUCCESS - Successfully set the Authentication node information + for the given ControllerHandle. + EFI_UNSUPPORTED - If the platform policies do not allow setting of the + Authentication information. + EFI_DEVICE_ERROR - The authentication node information could not be configured + due to a hardware error. + EFI_OUT_OF_RESOURCES - Not enough storage is available to hold the data. + +--*/ + +// +// Interface structure for the Authentication Info Protocol +// +typedef struct _EFI_AUTHENTICATION_INFO_PROTOCOL { + EFI_AUTHENTICATION_INFO_PROTOCOL_GET Get; + EFI_AUTHENTICATION_INFO_PROTOCOL_SET Set; +} EFI_AUTHENTICATION_INFO_PROTOCOL; + +extern EFI_GUID gEfiAuthenticationInfoProtocolGuid; + +#endif diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.c new file mode 100644 index 0000000000..287c59a395 --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.c @@ -0,0 +1,30 @@ +/*++ + +Copyright (c) 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. + +Module Name: + + DriverSupportedEfiVersion.c + +Abstract: + + Driver Supported EFI Version Protocol + +Revision History: + +--*/ + +#include "EfiSpec.h" +#include EFI_PROTOCOL_DEFINITION (DriverSupportedEfiVersion) + +EFI_GUID gEfiDriverSupportedEfiVersionProtocolGuid = EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL_GUID; + +EFI_GUID_STRING + (&gEfiDriverSupportedEfiVersionProtocolGuid, "Driver Supported EFI Version Protocol", "UEFI 2.1 Driver Supported EFI Version Protocol"); diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.h new file mode 100644 index 0000000000..c0702918d7 --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/DriverSupportedEfiVersion/DriverSupportedEfiVersion.h @@ -0,0 +1,47 @@ +/*++ + +Copyright (c) 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. + +Module Name: + + DriverSupportedEfiVersion.h + +Abstract: + + Driver Supported EFI Version Protocol + +Revision History: + +--*/ + +#ifndef _EFI_DRIVER_SUPPORTED_EFI_VERSION_H_ +#define _EFI_DRIVER_SUPPORTED_EFI_VERSION_H_ + +// +// Global ID for the Driver Supported EFI Version Protocol +// +#define EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL_GUID \ + { \ + 0x5c198761, 0x16a8, 0x4e69, {0x97, 0x2c, 0x89, 0xd6, 0x79, 0x54, 0xf8, 0x1d} \ + } + +EFI_FORWARD_DECLARATION (EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL); + +// +// Interface structure for the Driver Supported EFI Version Protocol +// +typedef struct _EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL { + UINT32 Length; + UINT32 FirmwareVersion; +} EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL; + +extern EFI_GUID gEfiDriverSupportedEfiVersionProtocolGuid; + +#endif diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf b/EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf index c075675ed7..568efa3a86 100644 --- a/EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf +++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf @@ -43,6 +43,8 @@ COMPONENT_TYPE= LIBRARY AcpiTable/AcpiTable.c Arp/Arp.h Arp/Arp.c + AuthenticationInfo/AuthenticationInfo.h + AuthenticationInfo/AuthenticationInfo.c Bis/Bis.h Bis/Bis.c BlockIo/BlockIo.h @@ -83,6 +85,8 @@ COMPONENT_TYPE= LIBRARY DriverDiagnostics/DriverDiagnostics.c DriverDiagnostics2/DriverDiagnostics2.h DriverDiagnostics2/DriverDiagnostics2.c + DriverSupportedEfiVersion/DriverSupportedEfiVersion.h + DriverSupportedEfiVersion/DriverSupportedEfiVersion.c Ebc/Ebc.h Ebc/Ebc.c EdidActive/EdidActive.h @@ -121,6 +125,8 @@ COMPONENT_TYPE= LIBRARY Ip4Config/Ip4Config.c LoadedImage/LoadedImage.h LoadedImage/LoadedImage.c + LoadedImageDevicePath\LoadedImageDevicePath.h + LoadedImageDevicePath\LoadedImageDevicePath.c LoadFile/LoadFile.h LoadFile/LoadFile.c ManagedNetwork/ManagedNetwork.h @@ -133,6 +139,8 @@ COMPONENT_TYPE= LIBRARY PciRootBridgeIo/PciRootBridgeIo.c PlatformDriverOverride/PlatformDriverOverride.h PlatformDriverOverride/PlatformDriverOverride.c + PlatformToDriverConfiguration/PlatformToDriverConfiguration.h + PlatformToDriverConfiguration/PlatformToDriverConfiguration.c PxeBaseCode/PxeBaseCode.h PxeBaseCode/PxeBaseCode.c PxeBaseCodeCallBack/PxeBaseCodeCallBack.h diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.c new file mode 100644 index 0000000000..7b52b8e6ab --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.c @@ -0,0 +1,32 @@ +/*++ + +Copyright (c) 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. + +Module Name: + + LoadedImageDevicePath.c + +Abstract: + + The Loaded Image Device Path Protocol as defined in UEFI 2.1. + + When installed, the Loaded Image Device Path Protocol specifies the device + path that was used when a PE/COFF image was loaded through the EFI Boot + Service LoadImage(). + + +--*/ + +#include "EfiSpec.h" +#include EFI_PROTOCOL_DEFINITION (LoadedImageDevicePath) + +EFI_GUID gEfiLoadedImageDevicePathProtocolGuid = EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID; + +EFI_GUID_STRING(&gEfiLoadedImageDevicePathProtocolGuid, "Loaded Image Device Path Protocol", "UEFI 2.1 Loaded Image Device Path protocol"); diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.h new file mode 100644 index 0000000000..528afb38d9 --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/LoadedImageDevicePath/LoadedImageDevicePath.h @@ -0,0 +1,44 @@ +/*++ + +Copyright (c) 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. + +Module Name: + + LoadedImageDevicePath.h + +Abstract: + + The Loaded Image Device Path Protocol as defined in UEFI 2.1. + + When installed, the Loaded Image Device Path Protocol specifies the device + path that was used when a PE/COFF image was loaded through the EFI Boot + Service LoadImage(). + + +--*/ + +#ifndef _LOADED_IMAGE_DEVICE_PATH_H_ +#define _LOADED_IMAGE_DEVICE_PATH_H_ + +#include EFI_PROTOCOL_DEFINITION (DevicePath) + +// +// Loaded Image Device Path protocol +// +#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \ + { \ + 0xbc62157e, 0x3e33, 0x4fec, {0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf} \ + } + +typedef EFI_DEVICE_PATH_PROTOCOL EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL; + +extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid; + +#endif diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.c new file mode 100644 index 0000000000..6e1a9316d1 --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.c @@ -0,0 +1,31 @@ +/*++ + +Copyright (c) 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. + +Module Name: + + PlatformToDriverConfiguration.c + +Abstract: + + UEFI Platform to Driver Configuration Protocol + +Revision History: + +--*/ + +#include "EfiSpec.h" +#include EFI_PROTOCOL_DEFINITION (PlatformToDriverConfiguration) + +EFI_GUID gEfiPlatformToDriverConfigurationProtocolGuid = EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL_GUID; +EFI_GUID gEfiPlatformToDriverConfigurationClpGuid = EFI_PLATFORM_TO_DRIVER_CONFIGURATION_CLP_GUID; + +EFI_GUID_STRING + (&gEfiPlatformToDriverConfigurationProtocolGuid, "Platform to Driver Configuration Protocol", "UEFI 2.1 Platform to Driver Configuration Protocol"); diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.h new file mode 100644 index 0000000000..89b936c113 --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/PlatformToDriverConfiguration/PlatformToDriverConfiguration.h @@ -0,0 +1,173 @@ +/*++ + +Copyright (c) 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. + +Module Name: + + PlatformToDriverConfiguration.h + +Abstract: + + UEFI Platform to Driver Configuration Protocol + +Revision History: + +--*/ + +#ifndef _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_H_ +#define _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_H_ + +// +// Global ID for the Platform to Driver Configuration Protocol +// +#define EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL_GUID \ + { \ + 0x642cd590, 0x8059, 0x4c0a, {0xa9, 0x58, 0xc5, 0xec, 0x07, 0xd2, 0x3c, 0x4b} \ + } + +#define EFI_PLATFORM_TO_DRIVER_CONFIGURATION_CLP_GUID \ + { \ + 0x345ecc0e, 0x0cb6, 0x4b75, {0xbb, 0x57, 0x1b, 0x12, 0x9c, 0x47, 0x33, 0x3e} \ + } + +EFI_FORWARD_DECLARATION (EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL); + +typedef enum { + EfiPlatformConfigurationActionNone = 0, + EfiPlatformConfigurationActionStopController = 1, + EfiPlatformConfigurationActionRestartController = 2, + EfiPlatformConfigurationActionRestartPlatform = 3, + EfiPlatformConfigurationActionNvramFailed = 4, + EfiPlatformConfigurationActionMaximum +} EFI_PLATFORM_CONFIGURATION_ACTION; + +typedef struct { + CHAR8 *CLPCommand; + UINT32 CLPCommandLength; + CHAR8 *CLPReturnString; + UINT32 CLPReturnStringLength; + UINT8 CLPCmdStatus; + UINT8 CLPErrorValue; + UINT16 CLPMsgCode; +} EFI_CONFIGURE_CLP_PARAMETER_BLK; + +typedef +EFI_STATUS +(EFIAPI *EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY) ( + IN EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_HANDLE ChildHandle, OPTIONAL + IN UINTN *Instance, + OUT EFI_GUID **ParameterTypeGuid, + OUT VOID **ParameterBlock, + OUT UINTN *ParameterBlockSize + ); +/*++ + + Routine Description: + Allows the UEFI driver to query the platform for configuration information + needed to complete the drivers Start() operation. + + Arguments: + This - A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance. + ControllerHandle - The handle the platform will return configuration + information about. + ChildHandle - The handle of the child controller to set options on. + This is an optional parameter that may be NULL. It will + be NULL for device drivers, and for a bus drivers that + wish to set options for the bus controller. It will not + be NULL for a bus driver that wishes to set options for + one of its child controllers. + Instance - Pointer to the Instance value. Zero means return the first + query data. The caller should increment this value by one + each time to retrieve successive data. + ParameterTypeGuid - An EFI_GUID that defines the contents of ParameterBlock. + UEFI drivers must use the ParameterTypeGuid to determine + how to parse the ParameterBlock. The caller should not + attempt to free ParameterTypeGuid. + ParameterBlock - The platform returns a pointer to the ParameterBlock + structure which contains details about the configuration + parameters specific to the ParameterTypeGuid. This structure + is defined based on the protocol and may be different for + different protocols. UEFI driver decodes this structure + and its contents based on ProtocolGuid. ParameterBlock + is allocated by the platform and the platform is responsible + for freeing the ParameterBlock after Response is called. + ParameterBlockSize - The platform returns the size of the ParameterBlock in bytes. + + Returns: + EFI_SUCCESS - The platform return parameter information for ControllerHandle. + EFI_NOT_FOUND - No more unread Instance exists. + EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE. + EFI_INVALID_PARAMETER - Instance is NULL. + EFI_DEVICE_ERROR - A device error occurred while attempting to return + parameter block information for the controller specified + by ControllerHandle and ChildHandle. + EFI_OUT_RESOURCES - There are not enough resources available to set the + configuration options for the controller specified + by ControllerHandle and ChildHandle. + +--*/ + +typedef +EFI_STATUS +(EFIAPI *EFI_PLATFORM_TO_DRIVER_CONFIGURATION_RESPONSE) ( + IN EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_HANDLE ChildHandle OPTIONAL, + IN UINTN *Instance, + IN EFI_GUID *ParameterTypeGuid, + IN VOID *ParameterBlock, + IN UINTN ParameterBlockSize , + IN EFI_PLATFORM_CONFIGURATION_ACTION ConfigurationAction + ); +/*++ + + Routine Description: + Tell the platform what actions where taken by the driver after processing + the data returned from Query. + + Arguments: + This - A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance. + ControllerHandle - The handle the platform will return configuration + information about. + ChildHandle - The handle of the child controller to set options on. + This is an optional parameter that may be NULL. It will + be NULL for device drivers, and for a bus drivers that + wish to set options for the bus controller. It will not + be NULL for a bus driver that wishes to set options for + one of its child controllers. + Instance - Instance data returned from Query. + ParameterTypeGuid - ParameterTypeGuid returned from Query. + ParameterBlock - ParameterBlock returned from Query. + ParameterBlockSize - The ParameterBlock size returned from Query. + ConfigurationAction- The driver tells the platform what action is required + for ParameterBlock to take effect. + + Returns: + EFI_SUCCESS - The platform return parameter information for ControllerHandle. + EFI_NOT_FOUND - Instance was not found. + EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE. + EFI_INVALID_PARAMETER - Instance is zero. + +--*/ + +// +// Interface structure for the Platform to Driver Configuration Protocol +// +typedef struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL { + EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY Query; + EFI_PLATFORM_TO_DRIVER_CONFIGURATION_RESPONSE Response; +} EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL; + +extern EFI_GUID gEfiPlatformToDriverConfigurationProtocolGuid; +extern EFI_GUID gEfiPlatformToDriverConfigurationClpGuid; + +#endif -- 2.39.2