X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FLibrary%2FUefiLib.h;h=45373e4fa138f5a7ac2bfccee5aeaf11b5fe39e3;hb=ed300ce2a68ba42b7e140af9e7e71c706518c9f1;hp=73b761f790660df617fe0b49d9feb574343bbec4;hpb=878ddf1fc3540a715f63594ed22b6929e881afb4;p=mirror_edk2.git diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h index 73b761f790..45373e4fa1 100644 --- a/MdePkg/Include/Library/UefiLib.h +++ b/MdePkg/Include/Library/UefiLib.h @@ -1,7 +1,7 @@ /** @file MDE UEFI library functions and macros - Copyright (c) 2006, Intel Corporation + Copyright (c) 2006 - 2007, 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 @@ -15,26 +15,33 @@ #ifndef __UEFI_LIB_H__ #define __UEFI_LIB_H__ -// -// Unicode String Table -// +#include +#include +#include +#include +#include +#include + +/// +/// Unicode String Table +/// typedef struct { CHAR8 *Language; CHAR16 *UnicodeString; } EFI_UNICODE_STRING_TABLE; -// -// EFI Lock Status -// +/// +/// EFI Lock Status +/// typedef enum { EfiLockUninitialized = 0, EfiLockReleased = 1, EfiLockAcquired = 2 } EFI_LOCK_STATE; -// -// EFI Lock -// +/// +/// EFI Lock +/// typedef struct { EFI_TPL Tpl; EFI_TPL OwnerTpl; @@ -84,7 +91,7 @@ EfiCreateProtocolNotifyEvent( IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, IN VOID *NotifyContext, OPTIONAL - OUT VOID *Registration + OUT VOID **Registration ); /** @@ -109,7 +116,7 @@ EfiNamedEventListen ( IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, IN CONST VOID *NotifyContext, OPTIONAL - OUT VOID *Registration OPTIONAL + OUT VOID *Registration OPTIONAL ); /** @@ -128,6 +135,24 @@ EfiNamedEventSignal ( IN CONST EFI_GUID *Name ); +/** + Returns the current TPL. + + This function returns the current TPL. There is no EFI service to directly + retrieve the current TPL. Instead, the RaiseTPL() function is used to raise + the TPL to TPL_HIGH_LEVEL. This will return the current TPL. The TPL level + can then immediately be restored back to the current TPL level with a call + to RestoreTPL(). + + @return The current TPL. + +**/ +EFI_TPL +EFIAPI +EfiGetCurrentTpl ( + VOID + ); + /** This function initializes a basic mutual exclusion lock to the released state and returns the lock. Each lock provides mutual exclusion access at its task @@ -153,14 +178,13 @@ EfiInitializeLock ( priority level. Since there is no preemption or multiprocessor support in EFI, acquiring the lock only consists of raising to the locks TPL. - @param Lock A pointer to the lock data structure to initialize. @param Priority The task priority level of the lock. @return The lock. **/ #define EFI_INITIALIZE_LOCK_VARIABLE(Priority) \ - {Priority, EFI_TPL_APPLICATION, EfiLockReleased } + {Priority, TPL_APPLICATION, EfiLockReleased } /** @@ -189,11 +213,11 @@ EfiInitializeLock ( /** - This function raises the system¡¯s current task priority level to the task + This function raises the system's current task priority level to the task priority level of the mutual exclusion lock. Then, it places the lock in the acquired state. - @param Priority The task priority level of the lock. + @param Lock A pointer to the lock to acquire. **/ VOID @@ -203,7 +227,7 @@ EfiAcquireLock ( ); /** - This function raises the system¡¯s current task priority level to the task + This function raises the system's current task priority level to the task priority level of the mutual exclusion lock. Then, it attempts to place the lock in the acquired state. @@ -221,7 +245,7 @@ EfiAcquireLockOrFail ( /** This function transitions a mutual exclusion lock from the acquired state to - the released state, and restores the system¡¯s task priority level to its + the released state, and restores the system's task priority level to its previous level. @param Lock A pointer to the lock to release. @@ -233,6 +257,64 @@ EfiReleaseLock ( IN EFI_LOCK *Lock ); +/** + Tests whether a controller handle is being managed by a specific driver. + + This function tests whether the driver specified by DriverBindingHandle is + currently managing the controller specified by ControllerHandle. This test + is performed by evaluating if the the protocol specified by ProtocolGuid is + present on ControllerHandle and is was opened by DriverBindingHandle with an + attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. + If ProtocolGuid is NULL, then ASSERT(). + + @param ControllerHandle A handle for a controller to test. + @param DriverBindingHandle Specifies the driver binding handle for the + driver. + @param ProtocolGuid Specifies the protocol that the driver specified + by DriverBindingHandle opens in its Start() + function. + + @retval EFI_SUCCESS ControllerHandle is managed by the driver + specifed by DriverBindingHandle. + @retval EFI_UNSUPPORTED ControllerHandle is not managed by the driver + specifed by DriverBindingHandle. + +**/ +EFI_STATUS +EFIAPI +EfiTestManagedDevice ( + IN CONST EFI_HANDLE ControllerHandle, + IN CONST EFI_HANDLE DriverBindingHandle, + IN CONST EFI_GUID *ProtocolGuid + ); + +/** + Tests whether a child handle is a child device of the controller. + + This function tests whether ChildHandle is one of the children of + ControllerHandle. This test is performed by checking to see if the protocol + specified by ProtocolGuid is present on ControllerHandle and opened by + ChildHandle with an attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. + If ProtocolGuid is NULL, then ASSERT(). + + @param ControllerHandle A handle for a (parent) controller to test. + @param ChildHandle A child handle to test. + @param ProtocolGuid Supplies the protocol that the child controller + opens on its parent controller. + + @retval EFI_SUCCESS ChildHandle is a child of the ControllerHandle. + @retval EFI_UNSUPPORTED ChildHandle is not a child of the + ControllerHandle. + +**/ +EFI_STATUS +EFIAPI +EfiTestChildHandle ( + IN CONST EFI_HANDLE ControllerHandle, + IN CONST EFI_HANDLE ChildHandle, + IN CONST EFI_GUID *ProtocolGuid + ); + /** This function looks up a Unicode string in UnicodeStringTable. If Language is a member of SupportedLanguages and a Unicode string is found in UnicodeStringTable @@ -271,6 +353,73 @@ LookupUnicodeString ( OUT CHAR16 **UnicodeString ); +/** + This function looks up a Unicode string in UnicodeStringTable. + If Language is a member of SupportedLanguages and a Unicode + string is found in UnicodeStringTable that matches the + language code specified by Language, then it is returned in + UnicodeString. + + @param Language A pointer to the ISO 639-2 or + RFC 3066 language code for the + Unicode string to look up and + return. + + @param SupportedLanguages A pointer to the set of ISO + 639-2 or RFC 3066 language + codes that the Unicode string + table supports. Language must + be a member of this set. + + @param UnicodeStringTable A pointer to the table of + Unicode strings. + + @param UnicodeString A pointer to the Unicode + string from UnicodeStringTable + that matches the language + specified by Language. + + @param Iso639Language Specify the language code + format supported. If true, + then the format follow ISO + 639-2. If false, then it + follows RFC3066. + + @retval EFI_SUCCESS The Unicode string that + matches the language specified + by Language was found in the + table of Unicoide strings + UnicodeStringTable, and it was + returned in UnicodeString. + + @retval EFI_INVALID_PARAMETER Language is NULL. + + @retval EFI_INVALID_PARAMETER UnicodeString is NULL. + + @retval EFI_UNSUPPORTED SupportedLanguages is NULL. + + @retval EFI_UNSUPPORTED UnicodeStringTable is NULL. + + @retval EFI_UNSUPPORTED The language specified by + Language is not a member + ofSupportedLanguages. + + @retval EFI_UNSUPPORTED The language specified by + Language is not supported by + UnicodeStringTable. + +**/ +EFI_STATUS +EFIAPI +LookupUnicodeString2 ( + IN CONST CHAR8 *Language, + IN CONST CHAR8 *SupportedLanguages, + IN CONST EFI_UNICODE_STRING_TABLE *UnicodeStringTable, + OUT CHAR16 **UnicodeString, + IN BOOLEAN Iso639Language + ) +; + /** This function adds a Unicode string to UnicodeStringTable. If Language is a member of SupportedLanguages then UnicodeString is added to @@ -312,6 +461,77 @@ AddUnicodeString ( IN CONST CHAR16 *UnicodeString ); +/** + + This function adds a Unicode string to UnicodeStringTable. + If Language is a member of SupportedLanguages then + UnicodeString is added to UnicodeStringTable. New buffers are + allocated for both Language and UnicodeString. The contents + of Language and UnicodeString are copied into these new + buffers. These buffers are automatically freed when + FreeUnicodeStringTable() is called. + + @param Language A pointer to the ISO 639-2 or + RFC 3066 language code for the + Unicode string to add. + + @param SupportedLanguages A pointer to the set of ISO + 639-2 or RFC 3066 language + codes that the Unicode string + table supports. Language must + be a member of this set. + + @param UnicodeStringTable A pointer to the table of + Unicode strings. + + @param UnicodeString A pointer to the Unicode + string to add. + + @param Iso639Language Specify the language code + format supported. If true, + then the format follow ISO + 639-2. If false, then it + follows RFC3066. + + @retval EFI_SUCCESS The Unicode string that + matches the language specified + by Language was found in the + table of Unicode strings + UnicodeStringTable, and it was + returned in UnicodeString. + + @retval EFI_INVALID_PARAMETER Language is NULL. + + @retval EFI_INVALID_PARAMETER UnicodeString is NULL. + + @retval EFI_INVALID_PARAMETER UnicodeString is an empty string. + + @retval EFI_UNSUPPORTED SupportedLanguages is NULL. + + @retval EFI_ALREADY_STARTED A Unicode string with language + Language is already present in + UnicodeStringTable. + + @retval EFI_OUT_OF_RESOURCES There is not enough memory to + add another Unicode string to + UnicodeStringTable. + + @retval EFI_UNSUPPORTED The language specified by + Language is not a member of + SupportedLanguages. + +**/ +EFI_STATUS +EFIAPI +AddUnicodeString2 ( + IN CONST CHAR8 *Language, + IN CONST CHAR8 *SupportedLanguages, + IN EFI_UNICODE_STRING_TABLE **UnicodeStringTable, + IN CONST CHAR16 *UnicodeString, + IN BOOLEAN Iso639Language + ) +; + /** This function frees the table of Unicode strings in UnicodeStringTable. If UnicodeStringTable is NULL, then EFI_SUCCESS is returned. @@ -400,7 +620,7 @@ EfiSignalEventLegacyBoot ( This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was added and now it's possible to not voilate the UEFI specification by declaring a GUID for the legacy boot event class. This library supports - the R8.5/EFI 1.10 form and R9/UEFI 2.0 form and allows common code to + the EDK/EFI 1.10 form and EDK II/UEFI 2.0 form and allows common code to work both ways. @param LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex). @@ -412,7 +632,35 @@ EfiSignalEventLegacyBoot ( EFI_STATUS EFIAPI EfiCreateEventLegacyBoot ( - OUT EFI_EVENT *LegacyBootEvent + OUT EFI_EVENT *LegacyBootEvent + ); + +/** + Create an EFI event in the Legacy Boot Event Group and allows + the caller to specify a notification function. + + This function abstracts the creation of the Legacy Boot Event. + The Framework moved from a proprietary to UEFI 2.0 based mechanism. + This library abstracts the caller from how this event is created to prevent + to code form having to change with the version of the specification supported. + If LegacyBootEvent is NULL, then ASSERT(). + + @param NotifyTpl The task priority level of the event. + @param NotifyFunction The notification function to call when the event is signaled. + @param NotifyContext The content to pass to NotifyFunction when the event is signaled. + @param LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex). + + @retval EFI_SUCCESS Event was created. + @retval Other Event was not created. + +**/ +EFI_STATUS +EFIAPI +EfiCreateEventLegacyBootEx ( + IN EFI_TPL NotifyTpl, + IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL + IN VOID *NotifyContext, OPTIONAL + OUT EFI_EVENT *LegacyBootEvent ); /** @@ -422,10 +670,10 @@ EfiCreateEventLegacyBoot ( This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was added and now it's possible to not voilate the UEFI specification and use the ready to boot event class defined in UEFI 2.0. This library supports - the R8.5/EFI 1.10 form and R9/UEFI 2.0 form and allows common code to + the EDK/EFI 1.10 form and EDKII/UEFI 2.0 form and allows common code to work both ways. - @param LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex). + @param ReadyToBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex). @retval EFI_SUCCESS Event was created. @retval Other Event was not created. @@ -434,7 +682,35 @@ EfiCreateEventLegacyBoot ( EFI_STATUS EFIAPI EfiCreateEventReadyToBoot ( - OUT EFI_EVENT *ReadyToBootEvent + OUT EFI_EVENT *ReadyToBootEvent + ); + +/** + Create an EFI event in the Ready To Boot Event Group and allows + the caller to specify a notification function. + + This function abstracts the creation of the Ready to Boot Event. + The Framework moved from a proprietary to UEFI 2.0 based mechanism. + This library abstracts the caller from how this event is created to prevent + to code form having to change with the version of the specification supported. + If ReadyToBootEvent is NULL, then ASSERT(). + + @param NotifyTpl The task priority level of the event. + @param NotifyFunction The notification function to call when the event is signaled. + @param NotifyContext The content to pass to NotifyFunction when the event is signaled. + @param ReadyToBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex). + + @retval EFI_SUCCESS Event was created. + @retval Other Event was not created. + +**/ +EFI_STATUS +EFIAPI +EfiCreateEventReadyToBootEx ( + IN EFI_TPL NotifyTpl, + IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL + IN VOID *NotifyContext, OPTIONAL + OUT EFI_EVENT *ReadyToBootEvent ); /** @@ -443,7 +719,7 @@ EfiCreateEventReadyToBoot ( Tiano extended the EFI 1.10 device path nodes. Tiano does not own this enum so as we move to UEFI 2.0 support we must use a mechanism that conforms with the UEFI 2.0 specification to define the FV device path. An UEFI GUIDed - device path is defined for PIWG extensions of device path. If the code + device path is defined for Tiano extensions of device path. If the code is compiled to conform with the UEFI 2.0 specification use the new device path else use the old form for backwards compatability. @@ -454,8 +730,8 @@ EfiCreateEventReadyToBoot ( VOID EFIAPI EfiInitializeFwVolDevicepathNode ( - IN MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode, - IN EFI_GUID *NameGuid + IN OUT MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode, + IN CONST EFI_GUID *NameGuid ); /** @@ -464,7 +740,7 @@ EfiInitializeFwVolDevicepathNode ( Tiano extended the EFI 1.10 device path nodes. Tiano does not own this enum so as we move to UEFI 2.0 support we must use a mechanism that conforms with the UEFI 2.0 specification to define the FV device path. An UEFI GUIDed - device path is defined for PIWG extensions of device path. If the code + device path is defined for Tiano extensions of device path. If the code is compiled to conform with the UEFI 2.0 specification use the new device path else use the old form for backwards compatability. The return value to this function points to a location in FvDevicePathNode and it does not allocate @@ -479,8 +755,237 @@ EfiInitializeFwVolDevicepathNode ( EFI_GUID * EFIAPI EfiGetNameGuidFromFwVolDevicePathNode ( - IN MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode + IN CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode + ); + +/** + Prints a formatted Unicode string to the console output device specified by + ConOut defined in the EFI_SYSTEM_TABLE. + + This function prints a formatted Unicode string to the console output device + specified by ConOut in EFI_SYSTEM_TABLE and returns the number of Unicode + characters that printed to ConOut. If the length of the formatted Unicode + string is greater than PcdUefiLibMaxPrintBufferSize, then only the first + PcdUefiLibMaxPrintBufferSize characters are sent to ConOut. + + @param Format Null-terminated Unicode format string. + @param ... VARARG list consumed to process Format. + If Format is NULL, then ASSERT(). + If Format is not aligned on a 16-bit boundary, then ASSERT(). + + @return Number of Unicode characters printed to ConOut. + +**/ +UINTN +EFIAPI +Print ( + IN CONST CHAR16 *Format, + ... ); +/** + Prints a formatted Unicode string to the console output device specified by + StdErr defined in the EFI_SYSTEM_TABLE. + + This function prints a formatted Unicode string to the console output device + specified by StdErr in EFI_SYSTEM_TABLE and returns the number of Unicode + characters that printed to StdErr. If the length of the formatted Unicode + string is greater than PcdUefiLibMaxPrintBufferSize, then only the first + PcdUefiLibMaxPrintBufferSize characters are sent to StdErr. + + @param Format Null-terminated Unicode format string. + @param ... VARARG list consumed to process Format. + If Format is NULL, then ASSERT(). + If Format is not aligned on a 16-bit boundary, then ASSERT(). + + @return Number of Unicode characters printed to StdErr. + +**/ +UINTN +EFIAPI +ErrorPrint ( + IN CONST CHAR16 *Format, + ... + ); + +/** + Prints a formatted ASCII string to the console output device specified by + ConOut defined in the EFI_SYSTEM_TABLE. + + This function prints a formatted ASCII string to the console output device + specified by ConOut in EFI_SYSTEM_TABLE and returns the number of ASCII + characters that printed to ConOut. If the length of the formatted ASCII + string is greater than PcdUefiLibMaxPrintBufferSize, then only the first + PcdUefiLibMaxPrintBufferSize characters are sent to ConOut. + + @param Format Null-terminated ASCII format string. + @param ... VARARG list consumed to process Format. + If Format is NULL, then ASSERT(). + If Format is not aligned on a 16-bit boundary, then ASSERT(). + + @return Number of ASCII characters printed to ConOut. + +**/ +UINTN +EFIAPI +AsciiPrint ( + IN CONST CHAR8 *Format, + ... + ); + +/** + Prints a formatted ASCII string to the console output device specified by + StdErr defined in the EFI_SYSTEM_TABLE. + + This function prints a formatted ASCII string to the console output device + specified by StdErr in EFI_SYSTEM_TABLE and returns the number of ASCII + characters that printed to StdErr. If the length of the formatted ASCII + string is greater than PcdUefiLibMaxPrintBufferSize, then only the first + PcdUefiLibMaxPrintBufferSize characters are sent to StdErr. + + @param Format Null-terminated ASCII format string. + @param ... VARARG list consumed to process Format. + If Format is NULL, then ASSERT(). + If Format is not aligned on a 16-bit boundary, then ASSERT(). + + @return Number of ASCII characters printed to ConErr. + +**/ +UINTN +EFIAPI +AsciiErrorPrint ( + IN CONST CHAR8 *Format, + ... + ); + +/** + Initializes a driver by installing the Driver Binding Protocol onto the driver's + DriverBindingHandle. This is typically the same as the driver's ImageHandle, but + it can be different if the driver produces multiple DriverBinding Protocols. + If the Driver Binding Protocol interface is NULL, then ASSERT (). + If the installation fails, then ASSERT (). + + @param ImageHandle The image handle of the driver. + @param SystemTable The EFI System Table that was passed to the driver's entry point. + @param DriverBinding A Driver Binding Protocol instance that this driver is producing. + @param DriverBindingHandle The handle that DriverBinding is to be installed onto. If this + parameter is NULL, then a new handle is created. + + @retval EFI_SUCCESS The protocol installation is completed successfully. + @retval Others Status from gBS->InstallMultipleProtocolInterfaces(). + +**/ +EFI_STATUS +EFIAPI +EfiLibInstallDriverBinding ( + IN CONST EFI_HANDLE ImageHandle, + IN CONST EFI_SYSTEM_TABLE *SystemTable, + IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, + IN EFI_HANDLE DriverBindingHandle + ); + + +/** + Initializes a driver by installing the Driver Binding Protocol together with the optional Component Name, + Driver Configure and Driver Diagnostic Protocols onto the driver's DriverBindingHandle. This is + typically the same as the driver's ImageHandle, but it can be different if the driver produces multiple + DriverBinding Protocols. + If the Driver Binding Protocol interface is NULL, then ASSERT (). + If the installation fails, then ASSERT (). + + @param ImageHandle The image handle of the driver. + @param SystemTable The EFI System Table that was passed to the driver's entry point. + @param DriverBinding A Driver Binding Protocol instance that this driver is producing. + @param DriverBindingHandle The handle that DriverBinding is to be installed onto. If this + parameter is NULL, then a new handle is created. + @param ComponentName A Component Name Protocol instance that this driver is producing. + @param DriverConfiguration A Driver Configuration Protocol instance that this driver is producing. + @param DriverDiagnostics A Driver Diagnostics Protocol instance that this driver is producing. + + @retval EFI_SUCCESS The protocol installation is completed successfully. + @retval Others Status from gBS->InstallMultipleProtocolInterfaces(). + +**/ +EFI_STATUS +EFIAPI +EfiLibInstallAllDriverProtocols ( + IN CONST EFI_HANDLE ImageHandle, + IN CONST EFI_SYSTEM_TABLE *SystemTable, + IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, + IN EFI_HANDLE DriverBindingHandle, + IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL + IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL + IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL + ); + + + +/** + Initializes a driver by installing the Driver Binding Protocol together with the optional Component Name, + Component Name 2 onto the driver's DriverBindingHandle. This is typically the same as the driver's + ImageHandle, but it can be different if the driver produces multiple DriverBinding Protocols. + If the Driver Binding Protocol interface is NULL, then ASSERT (). + If the installation fails, then ASSERT (). + + @param ImageHandle The image handle of the driver. + @param SystemTable The EFI System Table that was passed to the driver's entry point. + @param DriverBinding A Driver Binding Protocol instance that this driver is producing. + @param DriverBindingHandle The handle that DriverBinding is to be installed onto. If this + parameter is NULL, then a new handle is created. + @param ComponentName A Component Name Protocol instance that this driver is producing. + @param ComponentName2 A Component Name 2 Protocol instance that this driver is producing. + + @retval EFI_SUCCESS The protocol installation is completed successfully. + @retval Others Status from gBS->InstallMultipleProtocolInterfaces(). + +**/ +EFI_STATUS +EFIAPI +EfiLibInstallDriverBindingComponentName2 ( + IN CONST EFI_HANDLE ImageHandle, + IN CONST EFI_SYSTEM_TABLE *SystemTable, + IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, + IN EFI_HANDLE DriverBindingHandle, + IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL + IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL + ); + + +/** + Initializes a driver by installing the Driver Binding Protocol together with the optional Component Name, + Component Name 2, Driver Configure, Driver Diagnostic and Driver Diagnostic 2 Protocols onto the driver's + DriverBindingHandle. This is typically the same as the driver's ImageHandle, but it can be different if + the driver produces multiple DriverBinding Protocols. + If the Driver Binding Protocol interface is NULL, then ASSERT (). + If the installation fails, then ASSERT (). + + @param ImageHandle The image handle of the driver. + @param SystemTable The EFI System Table that was passed to the driver's entry point. + @param DriverBinding A Driver Binding Protocol instance that this driver is producing. + @param DriverBindingHandle The handle that DriverBinding is to be installed onto. If this + parameter is NULL, then a new handle is created. + @param ComponentName A Component Name Protocol instance that this driver is producing. + @param ComponentName2 A Component Name 2 Protocol instance that this driver is producing. + @param DriverConfiguration A Driver Configuration Protocol instance that this driver is producing. + @param DriverDiagnostics A Driver Diagnostics Protocol instance that this driver is producing. + @param DriverDiagnostics2 A Driver Diagnostics Protocol 2 instance that this driver is producing. + + @retval EFI_SUCCESS The protocol installation is completed successfully. + @retval Others Status from gBS->InstallMultipleProtocolInterfaces(). + +**/ +EFI_STATUS +EFIAPI +EfiLibInstallAllDriverProtocols2 ( + IN CONST EFI_HANDLE ImageHandle, + IN CONST EFI_SYSTEM_TABLE *SystemTable, + IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, + IN EFI_HANDLE DriverBindingHandle, + IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL + IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2, OPTIONAL + IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL + IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics, OPTIONAL + IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL + ); #endif