of size reduction when compiler optimization is disabled. If MDEPKG_NDEBUG is\r
defined, then debug and assert related macros wrapped by it are the NULL implementations.\r
\r
+Copyright (c) 2019, NVIDIA Corporation. All rights reserved.\r
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under\r
-the terms and conditions of the BSD License that accompanies this distribution.\r
-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
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
#ifndef __UEFI_LIB_H__\r
#define __UEFI_LIB_H__\r
\r
+#include <IndustryStandard/Acpi.h>\r
+\r
#include <Protocol/DriverBinding.h>\r
#include <Protocol/DriverConfiguration.h>\r
#include <Protocol/ComponentName.h>\r
/// Unicode String Table\r
///\r
typedef struct {\r
- CHAR8 *Language;\r
- CHAR16 *UnicodeString;\r
+ CHAR8 *Language;\r
+ CHAR16 *UnicodeString;\r
} EFI_UNICODE_STRING_TABLE;\r
\r
///\r
/// EFI Lock\r
///\r
typedef struct {\r
- EFI_TPL Tpl;\r
- EFI_TPL OwnerTpl;\r
- EFI_LOCK_STATE Lock;\r
+ EFI_TPL Tpl;\r
+ EFI_TPL OwnerTpl;\r
+ EFI_LOCK_STATE Lock;\r
} EFI_LOCK;\r
\r
/**\r
by Microseconds.\r
\r
**/\r
-#define EFI_TIMER_PERIOD_MICROSECONDS(Microseconds) MultU64x32((UINT64)(Microseconds), 10)\r
+#define EFI_TIMER_PERIOD_MICROSECONDS(Microseconds) MultU64x32((UINT64)(Microseconds), 10)\r
\r
/**\r
Macro that returns the number of 100 ns units for a specified number of milliseconds.\r
by Milliseconds.\r
\r
**/\r
-#define EFI_TIMER_PERIOD_MILLISECONDS(Milliseconds) MultU64x32((UINT64)(Milliseconds), 10000)\r
+#define EFI_TIMER_PERIOD_MILLISECONDS(Milliseconds) MultU64x32((UINT64)(Milliseconds), 10000)\r
\r
/**\r
Macro that returns the number of 100 ns units for a specified number of seconds.\r
by Seconds.\r
\r
**/\r
-#define EFI_TIMER_PERIOD_SECONDS(Seconds) MultU64x32((UINT64)(Seconds), 10000000)\r
+#define EFI_TIMER_PERIOD_SECONDS(Seconds) MultU64x32((UINT64)(Seconds), 10000000)\r
\r
/**\r
Macro that returns the a pointer to the next EFI_MEMORY_DESCRIPTOR in an array\r
**/\r
EFI_EVENT\r
EFIAPI\r
-EfiCreateProtocolNotifyEvent(\r
+EfiCreateProtocolNotifyEvent (\r
IN EFI_GUID *ProtocolGuid,\r
IN EFI_TPL NotifyTpl,\r
IN EFI_EVENT_NOTIFY NotifyFunction,\r
- IN VOID *NotifyContext, OPTIONAL\r
+ IN VOID *NotifyContext OPTIONAL,\r
OUT VOID **Registration\r
);\r
\r
IN CONST EFI_GUID *Name,\r
IN EFI_TPL NotifyTpl,\r
IN EFI_EVENT_NOTIFY NotifyFunction,\r
- IN CONST VOID *NotifyContext, OPTIONAL\r
+ IN CONST VOID *NotifyContext OPTIONAL,\r
OUT VOID *Registration OPTIONAL\r
);\r
\r
EFI_STATUS\r
EFIAPI\r
EfiEventGroupSignal (\r
- IN CONST EFI_GUID *EventGroup\r
+ IN CONST EFI_GUID *EventGroup\r
);\r
\r
/**\r
VOID\r
EFIAPI\r
EfiEventEmptyFunction (\r
- IN EFI_EVENT Event,\r
- IN VOID *Context\r
+ IN EFI_EVENT Event,\r
+ IN VOID *Context\r
);\r
\r
/**\r
EFIAPI\r
EfiInitializeLock (\r
IN OUT EFI_LOCK *Lock,\r
- IN EFI_TPL Priority\r
+ IN EFI_TPL Priority\r
);\r
\r
/**\r
#define EFI_INITIALIZE_LOCK_VARIABLE(Priority) \\r
{Priority, TPL_APPLICATION, EfiLockReleased }\r
\r
-\r
/**\r
Macro that calls DebugAssert() if an EFI_LOCK structure is not in the locked state.\r
\r
@param LockParameter A pointer to the lock to acquire.\r
\r
**/\r
-#if !defined(MDEPKG_NDEBUG)\r
- #define ASSERT_LOCKED(LockParameter) \\r
+#if !defined (MDEPKG_NDEBUG)\r
+#define ASSERT_LOCKED(LockParameter) \\r
do { \\r
if (DebugAssertEnabled ()) { \\r
ASSERT (LockParameter != NULL); \\r
} \\r
} while (FALSE)\r
#else\r
- #define ASSERT_LOCKED(LockParameter)\r
+#define ASSERT_LOCKED(LockParameter)\r
#endif\r
\r
-\r
/**\r
Acquires ownership of a lock.\r
\r
EFI_STATUS\r
EFIAPI\r
EfiTestManagedDevice (\r
- IN CONST EFI_HANDLE ControllerHandle,\r
- IN CONST EFI_HANDLE DriverBindingHandle,\r
- IN CONST EFI_GUID *ProtocolGuid\r
+ IN CONST EFI_HANDLE ControllerHandle,\r
+ IN CONST EFI_HANDLE DriverBindingHandle,\r
+ IN CONST EFI_GUID *ProtocolGuid\r
);\r
\r
/**\r
EFI_STATUS\r
EFIAPI\r
EfiTestChildHandle (\r
- IN CONST EFI_HANDLE ControllerHandle,\r
- IN CONST EFI_HANDLE ChildHandle,\r
- IN CONST EFI_GUID *ProtocolGuid\r
+ IN CONST EFI_HANDLE ControllerHandle,\r
+ IN CONST EFI_HANDLE ChildHandle,\r
+ IN CONST EFI_GUID *ProtocolGuid\r
+ );\r
+\r
+/**\r
+ This function checks the supported languages list for a target language,\r
+ This only supports RFC 4646 Languages.\r
+\r
+ @param SupportedLanguages The supported languages\r
+ @param TargetLanguage The target language\r
+\r
+ @retval Returns EFI_SUCCESS if the language is supported,\r
+ EFI_UNSUPPORTED otherwise\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+IsLanguageSupported (\r
+ IN CONST CHAR8 *SupportedLanguages,\r
+ IN CONST CHAR8 *TargetLanguage\r
);\r
\r
/**\r
IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable\r
);\r
\r
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
-\r
/**\r
- [ATTENTION] This function will be deprecated for security reason.\r
-\r
- Returns a pointer to an allocated buffer that contains the contents of a\r
- variable retrieved through the UEFI Runtime Service GetVariable(). The\r
+ Returns the status whether get the variable success. The function retrieves\r
+ variable through the UEFI Runtime Service GetVariable(). The\r
returned buffer is allocated using AllocatePool(). The caller is responsible\r
for freeing this buffer with FreePool().\r
\r
- If Name is NULL, then ASSERT().\r
- If Guid is NULL, then ASSERT().\r
+ If Name is NULL, then ASSERT().\r
+ If Guid is NULL, then ASSERT().\r
+ If Value is NULL, then ASSERT().\r
\r
@param[in] Name The pointer to a Null-terminated Unicode string.\r
- @param[in] Guid The pointer to an EFI_GUID structure.\r
+ @param[in] Guid The pointer to an EFI_GUID structure\r
+ @param[out] Value The buffer point saved the variable info.\r
+ @param[out] Size The buffer size of the variable.\r
\r
- @retval NULL The variable could not be retrieved.\r
- @retval NULL There are not enough resources available for the variable contents.\r
- @retval Other A pointer to allocated buffer containing the variable contents.\r
+ @retval EFI_OUT_OF_RESOURCES Allocate buffer failed.\r
+ @retval EFI_SUCCESS Find the specified variable.\r
+ @retval Others Errors Return errors from call to gRT->GetVariable.\r
\r
**/\r
-VOID *\r
+EFI_STATUS\r
EFIAPI\r
-GetVariable (\r
+GetVariable2 (\r
IN CONST CHAR16 *Name,\r
- IN CONST EFI_GUID *Guid\r
+ IN CONST EFI_GUID *Guid,\r
+ OUT VOID **Value,\r
+ OUT UINTN *Size OPTIONAL\r
);\r
\r
/**\r
- [ATTENTION] This function will be deprecated for security reason.\r
-\r
Returns a pointer to an allocated buffer that contains the contents of a\r
variable retrieved through the UEFI Runtime Service GetVariable(). This\r
function always uses the EFI_GLOBAL_VARIABLE GUID to retrieve variables.\r
The returned buffer is allocated using AllocatePool(). The caller is\r
responsible for freeing this buffer with FreePool().\r
\r
- If Name is NULL, then ASSERT().\r
+ If Name is NULL, then ASSERT().\r
+ If Value is NULL, then ASSERT().\r
\r
@param[in] Name The pointer to a Null-terminated Unicode string.\r
+ @param[out] Value The buffer point saved the variable info.\r
+ @param[out] Size The buffer size of the variable.\r
\r
- @retval NULL The variable could not be retrieved.\r
- @retval NULL There are not enough resources available for the variable contents.\r
- @retval Other A pointer to allocated buffer containing the variable contents.\r
+ @retval EFI_OUT_OF_RESOURCES Allocate buffer failed.\r
+ @retval EFI_SUCCESS Find the specified variable.\r
+ @retval Others Errors Return errors from call to gRT->GetVariable.\r
\r
**/\r
-VOID *\r
+EFI_STATUS\r
EFIAPI\r
-GetEfiGlobalVariable (\r
- IN CONST CHAR16 *Name\r
+GetEfiGlobalVariable2 (\r
+ IN CONST CHAR16 *Name,\r
+ OUT VOID **Value,\r
+ OUT UINTN *Size OPTIONAL\r
);\r
-#endif\r
\r
+/** Return the attributes of the variable.\r
\r
-/**\r
Returns the status whether get the variable success. The function retrieves\r
variable through the UEFI Runtime Service GetVariable(). The\r
returned buffer is allocated using AllocatePool(). The caller is responsible\r
- for freeing this buffer with FreePool().\r
+ for freeing this buffer with FreePool(). The attributes are returned if\r
+ the caller provides a valid Attribute parameter.\r
\r
If Name is NULL, then ASSERT().\r
If Guid is NULL, then ASSERT().\r
@param[in] Guid The pointer to an EFI_GUID structure\r
@param[out] Value The buffer point saved the variable info.\r
@param[out] Size The buffer size of the variable.\r
+ @param[out] Attr The pointer to the variable attributes as found in var store\r
\r
- @return EFI_OUT_OF_RESOURCES Allocate buffer failed.\r
- @return EFI_SUCCESS Find the specified variable.\r
- @return Others Errors Return errors from call to gRT->GetVariable.\r
+ @retval EFI_OUT_OF_RESOURCES Allocate buffer failed.\r
+ @retval EFI_SUCCESS Find the specified variable.\r
+ @retval Others Errors Return errors from call to gRT->GetVariable.\r
\r
**/\r
EFI_STATUS\r
EFIAPI\r
-GetVariable2 (\r
+GetVariable3 (\r
IN CONST CHAR16 *Name,\r
IN CONST EFI_GUID *Guid,\r
OUT VOID **Value,\r
- OUT UINTN *Size OPTIONAL\r
- );\r
-\r
-/**\r
- Returns a pointer to an allocated buffer that contains the contents of a\r
- variable retrieved through the UEFI Runtime Service GetVariable(). This\r
- function always uses the EFI_GLOBAL_VARIABLE GUID to retrieve variables.\r
- The returned buffer is allocated using AllocatePool(). The caller is\r
- responsible for freeing this buffer with FreePool().\r
-\r
- If Name is NULL, then ASSERT().\r
- If Value is NULL, then ASSERT().\r
-\r
- @param[in] Name The pointer to a Null-terminated Unicode string.\r
- @param[out] Value The buffer point saved the variable info.\r
- @param[out] Size The buffer size of the variable.\r
-\r
- @return EFI_OUT_OF_RESOURCES Allocate buffer failed.\r
- @return EFI_SUCCESS Find the specified variable.\r
- @return Others Errors Return errors from call to gRT->GetVariable.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-GetEfiGlobalVariable2 (\r
- IN CONST CHAR16 *Name,\r
- OUT VOID **Value,\r
- OUT UINTN *Size OPTIONAL\r
+ OUT UINTN *Size OPTIONAL,\r
+ OUT UINT32 *Attr OPTIONAL\r
);\r
\r
/**\r
EFIAPI\r
CreatePopUp (\r
IN UINTN Attribute,\r
- OUT EFI_INPUT_KEY *Key, OPTIONAL\r
+ OUT EFI_INPUT_KEY *Key OPTIONAL,\r
...\r
);\r
\r
//\r
// Functions that abstract early Framework contamination of UEFI.\r
//\r
+\r
/**\r
Create, Signal, and Close the Ready to Boot event using EfiSignalEventReadyToBoot().\r
\r
EFIAPI\r
EfiCreateEventLegacyBootEx (\r
IN EFI_TPL NotifyTpl,\r
- IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL\r
- IN VOID *NotifyContext, OPTIONAL\r
+ IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,\r
+ IN VOID *NotifyContext OPTIONAL,\r
OUT EFI_EVENT *LegacyBootEvent\r
);\r
\r
EFIAPI\r
EfiCreateEventReadyToBootEx (\r
IN EFI_TPL NotifyTpl,\r
- IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL\r
- IN VOID *NotifyContext, OPTIONAL\r
+ IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,\r
+ IN VOID *NotifyContext OPTIONAL,\r
OUT EFI_EVENT *ReadyToBootEvent\r
);\r
\r
...\r
);\r
\r
-\r
/**\r
Prints a formatted Unicode string to a graphics console device specified by\r
ConsoleOutputHandle defined in the EFI_SYSTEM_TABLE at the given (X,Y) coordinates.\r
UINTN\r
EFIAPI\r
PrintXY (\r
- IN UINTN PointX,\r
- IN UINTN PointY,\r
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround, OPTIONAL\r
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround, OPTIONAL\r
- IN CONST CHAR16 *Format,\r
+ IN UINTN PointX,\r
+ IN UINTN PointY,\r
+ IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL,\r
+ IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL,\r
+ IN CONST CHAR16 *Format,\r
...\r
);\r
\r
UINTN\r
EFIAPI\r
AsciiPrintXY (\r
- IN UINTN PointX,\r
- IN UINTN PointY,\r
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround, OPTIONAL\r
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround, OPTIONAL\r
- IN CONST CHAR8 *Format,\r
+ IN UINTN PointX,\r
+ IN UINTN PointY,\r
+ IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL,\r
+ IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL,\r
+ IN CONST CHAR8 *Format,\r
...\r
);\r
\r
IN EFI_HANDLE DriverBindingHandle\r
);\r
\r
+/**\r
+ Uninstalls a Driver Binding Protocol instance.\r
+\r
+ If DriverBinding is NULL, then ASSERT().\r
+ If DriverBinding can not be uninstalled, then ASSERT().\r
+\r
+ @param DriverBinding A Driver Binding Protocol instance that this driver produced.\r
+\r
+ @retval EFI_SUCCESS The protocol uninstallation successfully completed.\r
+ @retval Others Status from gBS->UninstallMultipleProtocolInterfaces().\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiLibUninstallDriverBinding (\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding\r
+ );\r
\r
/**\r
Installs and completes the initialization of a Driver Binding Protocol instance and\r
IN CONST EFI_SYSTEM_TABLE *SystemTable,\r
IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r
IN EFI_HANDLE DriverBindingHandle,\r
- IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r
- IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL\r
+ IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,\r
+ IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL,\r
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL\r
);\r
\r
+/**\r
+ Uninstalls a Driver Binding Protocol instance and optionally uninstalls the\r
+ Component Name, Driver Configuration and Driver Diagnostics Protocols.\r
+\r
+ If DriverBinding is NULL, then ASSERT().\r
+ If the uninstallation fails, then ASSERT().\r
+\r
+ @param DriverBinding A Driver Binding Protocol instance that this driver produced.\r
+ @param ComponentName A Component Name Protocol instance that this driver produced.\r
+ @param DriverConfiguration A Driver Configuration Protocol instance that this driver produced.\r
+ @param DriverDiagnostics A Driver Diagnostics Protocol instance that this driver produced.\r
\r
+ @retval EFI_SUCCESS The protocol uninstallation successfully completed.\r
+ @retval Others Status from gBS->UninstallMultipleProtocolInterfaces().\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiLibUninstallAllDriverProtocols (\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r
+ IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,\r
+ IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL,\r
+ IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL\r
+ );\r
\r
/**\r
Installs Driver Binding Protocol with optional Component Name and Component Name 2 Protocols.\r
EFI_STATUS\r
EFIAPI\r
EfiLibInstallDriverBindingComponentName2 (\r
- IN CONST EFI_HANDLE ImageHandle,\r
- IN CONST EFI_SYSTEM_TABLE *SystemTable,\r
- IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r
- IN EFI_HANDLE DriverBindingHandle,\r
- IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r
- IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL\r
+ IN CONST EFI_HANDLE ImageHandle,\r
+ IN CONST EFI_SYSTEM_TABLE *SystemTable,\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r
+ IN EFI_HANDLE DriverBindingHandle,\r
+ IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,\r
+ IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL\r
);\r
\r
+/**\r
+ Uninstalls Driver Binding Protocol with optional Component Name and Component Name 2 Protocols.\r
+\r
+ If DriverBinding is NULL, then ASSERT().\r
+ If the uninstallation fails, then ASSERT().\r
+\r
+ @param DriverBinding A Driver Binding Protocol instance that this driver produced.\r
+ @param ComponentName A Component Name Protocol instance that this driver produced.\r
+ @param ComponentName2 A Component Name 2 Protocol instance that this driver produced.\r
+\r
+ @retval EFI_SUCCESS The protocol installation successfully completed.\r
+ @retval Others Status from gBS->UninstallMultipleProtocolInterfaces().\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiLibUninstallDriverBindingComponentName2 (\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r
+ IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,\r
+ IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL\r
+ );\r
\r
/**\r
Installs Driver Binding Protocol with optional Component Name, Component Name 2, Driver\r
EFI_STATUS\r
EFIAPI\r
EfiLibInstallAllDriverProtocols2 (\r
- IN CONST EFI_HANDLE ImageHandle,\r
- IN CONST EFI_SYSTEM_TABLE *SystemTable,\r
- IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r
- IN EFI_HANDLE DriverBindingHandle,\r
- IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r
- IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2, OPTIONAL\r
- IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL\r
- IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2, OPTIONAL\r
- IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics, OPTIONAL\r
- IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL\r
+ IN CONST EFI_HANDLE ImageHandle,\r
+ IN CONST EFI_SYSTEM_TABLE *SystemTable,\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r
+ IN EFI_HANDLE DriverBindingHandle,\r
+ IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,\r
+ IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL,\r
+ IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL,\r
+ IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL,\r
+ IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL,\r
+ IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL\r
+ );\r
+\r
+/**\r
+ Uninstalls Driver Binding Protocol with optional Component Name, Component Name 2, Driver\r
+ Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols.\r
+\r
+ If DriverBinding is NULL, then ASSERT().\r
+ If the installation fails, then ASSERT().\r
+\r
+\r
+ @param DriverBinding A Driver Binding Protocol instance that this driver produced.\r
+ @param ComponentName A Component Name Protocol instance that this driver produced.\r
+ @param ComponentName2 A Component Name 2 Protocol instance that this driver produced.\r
+ @param DriverConfiguration A Driver Configuration Protocol instance that this driver produced.\r
+ @param DriverConfiguration2 A Driver Configuration Protocol 2 instance that this driver produced.\r
+ @param DriverDiagnostics A Driver Diagnostics Protocol instance that this driver produced.\r
+ @param DriverDiagnostics2 A Driver Diagnostics Protocol 2 instance that this driver produced.\r
+\r
+ @retval EFI_SUCCESS The protocol uninstallation successfully completed.\r
+ @retval Others Status from gBS->UninstallMultipleProtocolInterfaces().\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiLibUninstallAllDriverProtocols2 (\r
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r
+ IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,\r
+ IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL,\r
+ IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL,\r
+ IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL,\r
+ IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL,\r
+ IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL\r
);\r
\r
/**\r
@return Null-terminated Unicode string is that is the formatted\r
string appended to String.\r
**/\r
-CHAR16*\r
+CHAR16 *\r
EFIAPI\r
CatVSPrint (\r
- IN CHAR16 *String, OPTIONAL\r
+ IN CHAR16 *String OPTIONAL,\r
IN CONST CHAR16 *FormatString,\r
IN VA_LIST Marker\r
);\r
CHAR16 *\r
EFIAPI\r
CatSPrint (\r
- IN CHAR16 *String, OPTIONAL\r
+ IN CHAR16 *String OPTIONAL,\r
IN CONST CHAR16 *FormatString,\r
...\r
);\r
\r
On the remaining device path, the longest initial sequence of\r
FILEPATH_DEVICE_PATH nodes is node-wise traversed with\r
- EFI_FILE_PROTOCOL.Open(). For the pathname fragment specified by each\r
- traversed FILEPATH_DEVICE_PATH node, EfiOpenFileByDevicePath() first masks\r
- EFI_FILE_MODE_CREATE out of OpenMode, and passes 0 for Attributes. If\r
- EFI_FILE_PROTOCOL.Open() fails, and OpenMode includes EFI_FILE_MODE_CREATE,\r
- then the operation is retried with the caller's OpenMode and Attributes\r
- unmodified.\r
+ EFI_FILE_PROTOCOL.Open().\r
\r
(As a consequence, if OpenMode includes EFI_FILE_MODE_CREATE, and Attributes\r
includes EFI_FILE_DIRECTORY, and each FILEPATH_DEVICE_PATH specifies a single\r
the last node in FilePath.\r
\r
@param[in] OpenMode The OpenMode parameter to pass to\r
- EFI_FILE_PROTOCOL.Open(). For each\r
- FILEPATH_DEVICE_PATH node in FilePath,\r
- EfiOpenFileByDevicePath() first opens the specified\r
- pathname fragment with EFI_FILE_MODE_CREATE masked\r
- out of OpenMode and with Attributes set to 0, and\r
- only retries the operation with EFI_FILE_MODE_CREATE\r
- unmasked and Attributes propagated if the first open\r
- attempt fails.\r
+ EFI_FILE_PROTOCOL.Open().\r
\r
@param[in] Attributes The Attributes parameter to pass to\r
- EFI_FILE_PROTOCOL.Open(), when EFI_FILE_MODE_CREATE\r
- is propagated unmasked in OpenMode.\r
+ EFI_FILE_PROTOCOL.Open().\r
\r
@retval EFI_SUCCESS The file or directory has been opened or\r
created.\r
IN UINT64 OpenMode,\r
IN UINT64 Attributes\r
);\r
+\r
+/**\r
+ This function locates next ACPI table in XSDT/RSDT based on Signature and\r
+ previous returned Table.\r
+\r
+ If PreviousTable is NULL:\r
+ This function will locate the first ACPI table in XSDT/RSDT based on\r
+ Signature in gEfiAcpi20TableGuid system configuration table first, and then\r
+ gEfiAcpi10TableGuid system configuration table.\r
+ This function will locate in XSDT first, and then RSDT.\r
+ For DSDT, this function will locate XDsdt in FADT first, and then Dsdt in\r
+ FADT.\r
+ For FACS, this function will locate XFirmwareCtrl in FADT first, and then\r
+ FirmwareCtrl in FADT.\r
+\r
+ If PreviousTable is not NULL:\r
+ 1. If it could be located in XSDT in gEfiAcpi20TableGuid system configuration\r
+ table, then this function will just locate next table in XSDT in\r
+ gEfiAcpi20TableGuid system configuration table.\r
+ 2. If it could be located in RSDT in gEfiAcpi20TableGuid system configuration\r
+ table, then this function will just locate next table in RSDT in\r
+ gEfiAcpi20TableGuid system configuration table.\r
+ 3. If it could be located in RSDT in gEfiAcpi10TableGuid system configuration\r
+ table, then this function will just locate next table in RSDT in\r
+ gEfiAcpi10TableGuid system configuration table.\r
+\r
+ It's not supported that PreviousTable is not NULL but PreviousTable->Signature\r
+ is not same with Signature, NULL will be returned.\r
+\r
+ @param Signature ACPI table signature.\r
+ @param PreviousTable Pointer to previous returned table to locate next\r
+ table, or NULL to locate first table.\r
+\r
+ @return Next ACPI table or NULL if not found.\r
+\r
+**/\r
+EFI_ACPI_COMMON_HEADER *\r
+EFIAPI\r
+EfiLocateNextAcpiTable (\r
+ IN UINT32 Signature,\r
+ IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL\r
+ );\r
+\r
+/**\r
+ This function locates first ACPI table in XSDT/RSDT based on Signature.\r
+\r
+ This function will locate the first ACPI table in XSDT/RSDT based on\r
+ Signature in gEfiAcpi20TableGuid system configuration table first, and then\r
+ gEfiAcpi10TableGuid system configuration table.\r
+ This function will locate in XSDT first, and then RSDT.\r
+ For DSDT, this function will locate XDsdt in FADT first, and then Dsdt in\r
+ FADT.\r
+ For FACS, this function will locate XFirmwareCtrl in FADT first, and then\r
+ FirmwareCtrl in FADT.\r
+\r
+ @param Signature ACPI table signature.\r
+\r
+ @return First ACPI table or NULL if not found.\r
+\r
+**/\r
+EFI_ACPI_COMMON_HEADER *\r
+EFIAPI\r
+EfiLocateFirstAcpiTable (\r
+ IN UINT32 Signature\r
+ );\r
+\r
#endif\r