]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiDriverLib.h
EdkCompatibilityPkg: Remove EdkCompatibilityPkg
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Dxe / Include / EfiDriverLib.h
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiDriverLib.h b/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiDriverLib.h
deleted file mode 100644 (file)
index f28f209..0000000
+++ /dev/null
@@ -1,1282 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2004 - 2011, 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
-\r
-Module Name:\r
-\r
-  EfiDriverLib.h\r
-\r
-Abstract:\r
-\r
-  Light weight lib to support EFI drivers.\r
-\r
---*/\r
-\r
-#ifndef _EFI_DRIVER_LIB_H_\r
-#define _EFI_DRIVER_LIB_H_\r
-\r
-#include "EfiStatusCode.h"\r
-#include "EfiCommonLib.h"\r
-#include "EfiPerf.h"\r
-#include "LinkedList.h"\r
-#include "GetImage.h"\r
-#include "EfiImageFormat.h"\r
-#include "EfiCompNameSupport.h"\r
-\r
-#include EFI_GUID_DEFINITION (DxeServices)\r
-#include EFI_GUID_DEFINITION (EventGroup)\r
-#include EFI_GUID_DEFINITION (EventLegacyBios)\r
-#include EFI_GUID_DEFINITION (FrameworkDevicePath)\r
-#include EFI_PROTOCOL_DEFINITION (FirmwareVolume)\r
-#include EFI_PROTOCOL_DEFINITION (FirmwareVolume2)\r
-#include EFI_PROTOCOL_DEFINITION (DataHub)\r
-#include EFI_PROTOCOL_DEFINITION (DriverBinding)\r
-#include EFI_PROTOCOL_DEFINITION (ComponentName)\r
-#include EFI_PROTOCOL_DEFINITION (ComponentName2)\r
-#include EFI_PROTOCOL_DEFINITION (DriverConfiguration)\r
-#include EFI_PROTOCOL_DEFINITION (DriverConfiguration2)\r
-#include EFI_PROTOCOL_DEFINITION (DriverDiagnostics)\r
-#include EFI_PROTOCOL_DEFINITION (DriverDiagnostics2)\r
-\r
-#include EFI_PROTOCOL_DEFINITION (DebugMask)\r
-\r
-#if defined(__GNUC__) && defined(ECP_CPU_IPF)\r
-\r
-VOID\r
-EFIAPI\r
-EcpEfiBreakPoint (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Generates a breakpoint on the CPU.\r
-\r
-  Generates a breakpoint on the CPU. The breakpoint must be implemented such\r
-  that code can resume normal execution after the breakpoint.\r
-\r
-Arguments:\r
-\r
-  VOID\r
-\r
-Returns: \r
-\r
-  VOID\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-EFIAPI\r
-EcpMemoryFence (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Used to serialize load and store operations.\r
-\r
-  All loads and stores that proceed calls to this function are guaranteed to be\r
-  globally visible when this function returns.\r
-\r
-Arguments:\r
-\r
-  VOID\r
-\r
-Returns: \r
-\r
-  VOID\r
-\r
---*/\r
-;\r
-\r
-#endif\r
-\r
-typedef struct {\r
-  CHAR8   *Language;\r
-  CHAR16  *UnicodeString;\r
-} EFI_UNICODE_STRING_TABLE;\r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
-#define LANGUAGE_CODE_ENGLISH    "en-US"\r
-#else\r
-#define LANGUAGE_CODE_ENGLISH    "eng"\r
-#endif\r
-\r
-//\r
-// Macros for EFI Driver Library Functions that are really EFI Boot Services\r
-//\r
-#define EfiCopyMem(_Destination, _Source, _Length)  gBS->CopyMem ((_Destination), (_Source), (_Length))\r
-#define EfiSetMem(_Destination, _Length, _Value)    gBS->SetMem ((_Destination), (_Length), (_Value))\r
-#define EfiZeroMem(_Destination, _Length)           gBS->SetMem ((_Destination), (_Length), 0)\r
-\r
-//\r
-// Driver Lib Globals.\r
-//\r
-extern EFI_BOOT_SERVICES        *gBS;\r
-extern EFI_DXE_SERVICES         *gDS;\r
-extern EFI_RUNTIME_SERVICES     *gRT;\r
-extern EFI_SYSTEM_TABLE         *gST;\r
-extern UINTN                    gErrorLevel;\r
-extern EFI_GUID                 gEfiCallerIdGuid;\r
-extern EFI_DEBUG_MASK_PROTOCOL  *gDebugMaskInterface;\r
-\r
-EFI_STATUS\r
-EfiInitializeDriverLib (\r
-  IN EFI_HANDLE           ImageHandle,\r
-  IN EFI_SYSTEM_TABLE     *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Intialize Driver Lib if it has not yet been initialized. \r
-\r
-Arguments:\r
-\r
-  ImageHandle     - The firmware allocated handle for the EFI image.\r
-  \r
-  SystemTable     - A pointer to the EFI System Table.\r
-\r
-\r
-Returns: \r
-\r
-  EFI_STATUS always returns EFI_SUCCESS\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-DxeInitializeDriverLib (\r
-  IN EFI_HANDLE           ImageHandle,\r
-  IN EFI_SYSTEM_TABLE     *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Intialize Driver Lib if it has not yet been initialized. \r
-\r
-Arguments:\r
-\r
-  ImageHandle     - The firmware allocated handle for the EFI image.\r
-  \r
-  SystemTable     - A pointer to the EFI System Table.\r
-\r
-Returns: \r
-\r
-  EFI_STATUS always returns EFI_SUCCESS\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiLibInstallDriverBinding (\r
-  IN EFI_HANDLE                   ImageHandle,\r
-  IN EFI_SYSTEM_TABLE             *SystemTable,\r
-  IN EFI_DRIVER_BINDING_PROTOCOL  *DriverBinding,\r
-  IN EFI_HANDLE                   DriverBindingHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Intialize a driver by installing the Driver Binding Protocol onto the \r
-  driver's DriverBindingHandle.  This is typically the same as the driver's\r
-  ImageHandle, but it can be different if the driver produces multiple\r
-  DriverBinding Protocols.  This function also initializes the EFI Driver\r
-  Library that initializes the global variables gST, gBS, gRT.\r
-\r
-Arguments:\r
-\r
-  ImageHandle         - The image handle of the driver\r
-\r
-  SystemTable         - The EFI System Table that was passed to the driver's entry point\r
-\r
-  DriverBinding       - A Driver Binding Protocol instance that this driver is producing\r
-\r
-  DriverBindingHandle - The handle that DriverBinding is to be installe onto.  If this\r
-                        parameter is NULL, then a new handle is created.\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS is DriverBinding is installed onto DriverBindingHandle\r
-\r
-  Otherwise, then return status from gBS->InstallProtocolInterface()\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiLibInstallAllDriverProtocols (\r
-  IN EFI_HANDLE                         ImageHandle,\r
-  IN EFI_SYSTEM_TABLE                   *SystemTable,\r
-  IN EFI_DRIVER_BINDING_PROTOCOL        *DriverBinding,\r
-  IN EFI_HANDLE                         DriverBindingHandle,\r
-  IN EFI_COMPONENT_NAME_PROTOCOL        *ComponentName, OPTIONAL\r
-  IN EFI_DRIVER_CONFIGURATION_PROTOCOL  *DriverConfiguration, OPTIONAL\r
-  IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL    *DriverDiagnostics OPTIONAL\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Intialize a driver by installing the Driver Binding Protocol onto the \r
-  driver's DriverBindingHandle.  This is typically the same as the driver's\r
-  ImageHandle, but it can be different if the driver produces multiple\r
-  DriverBinding Protocols.  This function also initializes the EFI Driver\r
-  Library that initializes the global variables gST, gBS, gRT.\r
-\r
-Arguments:\r
-\r
-  ImageHandle         - The image handle of the driver\r
-\r
-  SystemTable         - The EFI System Table that was passed to the driver's entry point\r
-\r
-  DriverBinding       - A Driver Binding Protocol instance that this driver is producing\r
-\r
-  DriverBindingHandle - The handle that DriverBinding is to be installe onto.  If this\r
-                        parameter is NULL, then a new handle is created.\r
-\r
-  ComponentName       - A Component Name Protocol instance that this driver is producing\r
-\r
-  DriverConfiguration - A Driver Configuration Protocol instance that this driver is producing\r
-  \r
-  DriverDiagnostics   - A Driver Diagnostics Protocol instance that this driver is producing\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS if all the protocols were installed onto DriverBindingHandle\r
-\r
-  Otherwise, then return status from gBS->InstallProtocolInterface()\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiLibInstallAllDriverProtocols2 (\r
-  IN EFI_HANDLE                         ImageHandle,\r
-  IN EFI_SYSTEM_TABLE                   *SystemTable,\r
-  IN EFI_DRIVER_BINDING_PROTOCOL        *DriverBinding,\r
-  IN EFI_HANDLE                         DriverBindingHandle,\r
-  IN EFI_COMPONENT_NAME2_PROTOCOL       *ComponentName2, OPTIONAL\r
-  IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2, OPTIONAL\r
-  IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL   *DriverDiagnostics2 OPTIONAL\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Intialize a driver by installing the Driver Binding Protocol onto the \r
-  driver's DriverBindingHandle.  This is typically the same as the driver's\r
-  ImageHandle, but it can be different if the driver produces multiple\r
-  DriverBinding Protocols.  This function also initializes the EFI Driver\r
-  Library that initializes the global variables gST, gBS, gRT.\r
-\r
-Arguments:\r
-\r
-  ImageHandle         - The image handle of the driver\r
-\r
-  SystemTable         - The EFI System Table that was passed to the driver's entry point\r
-\r
-  DriverBinding       - A Driver Binding Protocol instance that this driver is producing\r
-\r
-  DriverBindingHandle - The handle that DriverBinding is to be installe onto.  If this\r
-                        parameter is NULL, then a new handle is created.\r
-\r
-  ComponentName2      - A Component Name2 Protocol instance that this driver is producing\r
-\r
-  DriverConfiguration2- A Driver Configuration2 Protocol instance that this driver is producing\r
-  \r
-  DriverDiagnostics2  - A Driver Diagnostics2 Protocol instance that this driver is producing\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS if all the protocols were installed onto DriverBindingHandle\r
-\r
-  Otherwise, then return status from gBS->InstallProtocolInterface()\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiLibGetSystemConfigurationTable (\r
-  IN EFI_GUID *TableGuid,\r
-  OUT VOID **Table\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  \r
-  Return the EFI 1.0 System Tabl entry with TableGuid\r
-\r
-Arguments:\r
-\r
-  TableGuid - Name of entry to return in the system table\r
-  Table     - Pointer in EFI system table associated with TableGuid\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS - Table returned;\r
-  EFI_NOT_FOUND - TableGuid not in EFI system table\r
-\r
---*/\r
-;\r
-\r
-BOOLEAN\r
-EfiLibCompareLanguage (\r
-  CHAR8  *Language1,\r
-  CHAR8  *Language2\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Compare two languages to say whether they are identical.\r
-\r
-Arguments:\r
-\r
-  Language1 - first language\r
-  Language2 - second language\r
-\r
-Returns:\r
-\r
-  TRUE      - identical\r
-  FALSE     - not identical\r
-\r
---*/\r
-;\r
-\r
-//\r
-// DevicePath.c\r
-//\r
-BOOLEAN\r
-EfiIsDevicePathMultiInstance (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Return TRUE is this is a multi instance device path.\r
-\r
-Arguments:\r
-  DevicePath  - A pointer to a device path data structure.\r
-\r
-\r
-Returns:\r
-  TRUE - If DevicePath is multi instance. \r
-  FALSE - If DevicePath is not multi instance.\r
-\r
---*/\r
-;\r
-\r
-EFI_DEVICE_PATH_PROTOCOL        *\r
-EfiDevicePathInstance (\r
-  IN OUT EFI_DEVICE_PATH_PROTOCOL   **DevicePath,\r
-  OUT UINTN                         *Size\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Function retrieves the next device path instance from a device path data structure.\r
-\r
-Arguments:\r
-  DevicePath           - A pointer to a device path data structure.\r
-\r
-  Size                 - A pointer to the size of a device path instance in bytes.\r
-\r
-Returns:\r
-\r
-  This function returns a pointer to the current device path instance.\r
-  In addition, it returns the size in bytes of the current device path instance in Size,\r
-  and a pointer to the next device path instance in DevicePath.\r
-  If there are no more device path instances in DevicePath, then DevicePath will be set to NULL.\r
-\r
---*/\r
-;\r
-\r
-UINTN\r
-EfiDevicePathSize (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevPath\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Calculate the size of a whole device path.    \r
-    \r
-Arguments:\r
-\r
-  DevPath - The pointer to the device path data.\r
-    \r
-Returns:\r
-\r
-  Size of device path data structure..\r
-\r
---*/\r
-;\r
-\r
-EFI_DEVICE_PATH_PROTOCOL        *\r
-EfiAppendDevicePath (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Src1,\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Src2\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Function is used to append a Src1 and Src2 together.\r
-\r
-Arguments:\r
-  Src1  - A pointer to a device path data structure.\r
-\r
-  Src2  - A pointer to a device path data structure.\r
-\r
-Returns:\r
-\r
-  A pointer to the new device path is returned.\r
-  NULL is returned if space for the new device path could not be allocated from pool.\r
-  It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.\r
-\r
---*/\r
-;\r
-\r
-EFI_DEVICE_PATH_PROTOCOL        *\r
-EfiDevicePathFromHandle (\r
-  IN EFI_HANDLE       Handle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Locate device path protocol interface on a device handle.\r
-\r
-Arguments:\r
-\r
-  Handle  - The device handle\r
-\r
-Returns:\r
-\r
-  Device path protocol interface located.\r
-\r
---*/\r
-;\r
-\r
-EFI_DEVICE_PATH_PROTOCOL        *\r
-EfiDuplicateDevicePath (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevPath\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Duplicate a new device path data structure from the old one.\r
-\r
-Arguments:\r
-  DevPath  - A pointer to a device path data structure.\r
-\r
-Returns:\r
-  A pointer to the new allocated device path data.\r
-  Caller must free the memory used by DevicePath if it is no longer needed.\r
-\r
---*/\r
-;\r
-\r
-EFI_DEVICE_PATH_PROTOCOL        *\r
-EfiAppendDevicePathNode (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Src1,\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Src2\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Function is used to append a device path node to the end of another device path.\r
-\r
-Arguments:\r
-  Src1  - A pointer to a device path data structure.\r
-\r
-  Src2 - A pointer to a device path data structure.\r
-\r
-Returns:\r
-  This function returns a pointer to the new device path.\r
-  If there is not enough temporary pool memory available to complete this function,\r
-  then NULL is returned.\r
-\r
-\r
---*/\r
-;\r
-\r
-EFI_DEVICE_PATH_PROTOCOL        *\r
-EfiFileDevicePath (\r
-  IN EFI_HANDLE               Device  OPTIONAL,\r
-  IN CHAR16                   *FileName\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Create a device path that appends a MEDIA_DEVICE_PATH with\r
-  FileNameGuid to the device path of DeviceHandle.\r
-\r
-Arguments:\r
-  Device   - Optional Device Handle to use as Root of the Device Path\r
-\r
-  FileName - FileName\r
-\r
-Returns:\r
-  EFI_DEVICE_PATH_PROTOCOL that was allocated from dynamic memory\r
-  or NULL pointer.\r
-\r
---*/\r
-;\r
-\r
-EFI_DEVICE_PATH_PROTOCOL        *\r
-EfiAppendDevicePathInstance (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Src,\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Instance\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Append a device path instance to another.\r
-\r
-Arguments:\r
-\r
-  Src       - The device path instance to be appended with.\r
-  Instance  - The device path instance appending the other.\r
-\r
-Returns:\r
-\r
-  The contaction of these two.\r
-\r
---*/\r
-;\r
-\r
-//\r
-// Lock.c\r
-//\r
-typedef struct {\r
-  EFI_TPL Tpl;\r
-  EFI_TPL OwnerTpl;\r
-  UINTN   Lock;\r
-} EFI_LOCK;\r
-\r
-VOID\r
-EfiInitializeLock (\r
-  IN OUT EFI_LOCK *Lock,\r
-  IN EFI_TPL      Priority\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize a basic mutual exclusion lock.   Each lock\r
-  provides mutual exclusion access at it's task priority\r
-  level.  Since there is no-premption (at any TPL) or\r
-  multiprocessor support, acquiring the lock only consists\r
-  of raising to the locks TPL.\r
-\r
-  Note on a check build ASSERT()s are used to ensure proper\r
-  lock usage.\r
-    \r
-Arguments:\r
-\r
-  Lock        - The EFI_LOCK structure to initialize\r
-\r
-  Priority    - The task priority level of the lock\r
-\r
-    \r
-Returns:\r
-\r
-  An initialized Efi Lock structure.\r
-\r
---*/\r
-;\r
-\r
-//\r
-// Macro to initialize the state of a lock when a lock variable is declared\r
-//\r
-#define EFI_INITIALIZE_LOCK_VARIABLE(Tpl) {Tpl,0,0}\r
-\r
-VOID\r
-EfiAcquireLock (\r
-  IN EFI_LOCK *Lock\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Raising to the task priority level of the mutual exclusion\r
-  lock, and then acquires ownership of the lock.\r
-    \r
-Arguments:\r
-\r
-  Lock - The lock to acquire\r
-    \r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiAcquireLockOrFail (\r
-  IN EFI_LOCK  *Lock\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize a basic mutual exclusion lock.   Each lock\r
-  provides mutual exclusion access at it's task priority\r
-  level.  Since there is no-premption (at any TPL) or\r
-  multiprocessor support, acquiring the lock only consists\r
-  of raising to the locks TPL.\r
-    \r
-Arguments:\r
-\r
-  Lock        - The EFI_LOCK structure to initialize\r
-   \r
-Returns:\r
-\r
-  EFI_SUCCESS       - Lock Owned.\r
-  EFI_ACCESS_DENIED - Reentrant Lock Acquisition, Lock not Owned.\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-EfiReleaseLock (\r
-  IN EFI_LOCK *Lock\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-    Releases ownership of the mutual exclusion lock, and\r
-    restores the previous task priority level.\r
-    \r
-Arguments:\r
-\r
-    Lock - The lock to release\r
-    \r
-Returns:\r
-\r
-    None\r
-\r
---*/\r
-;\r
-\r
-VOID *\r
-EfiLibAllocatePool (\r
-  IN  UINTN   AllocationSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate EfiBootServicesData pool of size AllocationSize\r
-\r
-Arguments:\r
-\r
-  AllocationSize  - Pool size\r
-\r
-Returns:\r
-\r
-  Pointer to the pool allocated\r
-\r
---*/\r
-;\r
-\r
-VOID *\r
-EfiLibAllocateRuntimePool (\r
-  IN  UINTN   AllocationSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate EfiRuntimeServicesData pool of size AllocationSize\r
-\r
-Arguments:\r
-\r
-  AllocationSize  - Pool size\r
-\r
-Returns:\r
-\r
-  Pointer to the pool allocated\r
-\r
---*/\r
-;\r
-\r
-VOID *\r
-EfiLibAllocateZeroPool (\r
-  IN  UINTN   AllocationSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate EfiBootServicesData pool of size AllocationSize and set memory to zero.\r
-\r
-Arguments:\r
-\r
-  AllocationSize  - Pool size\r
-\r
-Returns:\r
-\r
-  Pointer to the pool allocated\r
-\r
---*/\r
-;\r
-\r
-VOID *\r
-EfiLibAllocateRuntimeZeroPool (\r
-  IN  UINTN   AllocationSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate EfiRuntimeServicesData pool of size AllocationSize and set memory to zero.\r
-\r
-Arguments:\r
-\r
-  AllocationSize  - Pool size\r
-\r
-Returns:\r
-\r
-  Pointer to the pool allocated\r
-\r
---*/\r
-;\r
-\r
-VOID *\r
-EfiLibAllocateCopyPool (\r
-  IN  UINTN   AllocationSize,\r
-  IN  VOID    *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate BootServicesData pool and use a buffer provided by \r
-  caller to fill it.\r
-\r
-Arguments:\r
-\r
-  AllocationSize  - The size to allocate\r
-  \r
-  Buffer          - Buffer that will be filled into the buffer allocated\r
-\r
-Returns:\r
-\r
-  Pointer of the buffer allocated.\r
-\r
---*/\r
-;\r
-\r
-VOID *\r
-EfiLibAllocateRuntimeCopyPool (\r
-  IN  UINTN            AllocationSize,\r
-  IN  VOID             *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate RuntimeServicesData pool and use a buffer provided by \r
-  caller to fill it.\r
-\r
-Arguments:\r
-\r
-  AllocationSize  - The size to allocate\r
-  \r
-  Buffer          - Buffer that will be filled into the buffer allocated\r
-\r
-Returns:\r
-\r
-  Pointer of the buffer allocated.\r
-\r
---*/\r
-;\r
-\r
-//\r
-// Event.c\r
-//\r
-EFI_EVENT\r
-EfiLibCreateProtocolNotifyEvent (\r
-  IN EFI_GUID             *ProtocolGuid,\r
-  IN EFI_TPL              NotifyTpl,\r
-  IN EFI_EVENT_NOTIFY     NotifyFunction,\r
-  IN VOID                 *NotifyContext,\r
-  OUT VOID                **Registration\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Create a protocol notification event and return it.\r
-\r
-Arguments:\r
-\r
-  ProtocolGuid    - Protocol to register notification event on.\r
-\r
-  NotifyTpl       - Maximum TPL to single the NotifyFunction.\r
-\r
-  NotifyFunction  - EFI notification routine.\r
-\r
-  NotifyContext   - Context passed into Event when it is created.\r
-\r
-  Registration    - Registration key returned from RegisterProtocolNotify().\r
-\r
-Returns:\r
-\r
-  The EFI_EVENT that has been registered to be signaled when a ProtocolGuid\r
-  is added to the system.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiLibNamedEventSignal (\r
-  IN EFI_GUID            *Name\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Signals a named event. All registered listeners will run.\r
-  The listeners should register using EfiLibNamedEventListen() function.\r
-\r
-  NOTE: For now, the named listening/signalling is implemented\r
-  on a protocol interface being installed and uninstalled.\r
-  In the future, this maybe implemented based on a dedicated mechanism.\r
-\r
-Arguments:\r
-  Name - Name to perform the signaling on. The name is a GUID.\r
-\r
-Returns:\r
-  EFI_SUCCESS if successfull.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiLibNamedEventListen (\r
-  IN EFI_GUID             * Name,\r
-  IN EFI_TPL              NotifyTpl,\r
-  IN EFI_EVENT_NOTIFY     NotifyFunction,\r
-  IN VOID                 *NotifyContext\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Listenes to signals on the name.\r
-  EfiLibNamedEventSignal() signals the event.\r
-\r
-  NOTE: For now, the named listening/signalling is implemented\r
-  on a protocol interface being installed and uninstalled.\r
-  In the future, this maybe implemented based on a dedicated mechanism.\r
-\r
-Arguments:\r
-  Name            - Name to register the listener on.\r
-  NotifyTpl       - Maximum TPL to singnal the NotifyFunction.\r
-  NotifyFunction  - The listener routine.\r
-  NotifyContext   - Context passed into the listener routine.\r
-\r
-Returns:\r
-  EFI_SUCCESS if successful.\r
-\r
---*/\r
-;\r
-\r
-//\r
-// Handle.c\r
-//\r
-EFI_STATUS\r
-EfiLibLocateHandleProtocolByProtocols (\r
-  IN OUT EFI_HANDLE        * Handle, OPTIONAL\r
-  OUT    VOID              **Interface, OPTIONAL\r
-  ...\r
-  )\r
-/*++\r
-Routine Description:\r
-\r
-  Function locates Protocol and/or Handle on which all Protocols specified\r
-  as a variable list are installed.\r
-  It supports continued search. The caller must assure that no handles are added\r
-  or removed while performing continued search, by e.g., rising the TPL and not\r
-  calling any handle routines. Otherwise the behavior is undefined.\r
-\r
-Arguments:\r
-\r
-  Handle        - The address of handle to receive the handle on which protocols\r
-                  indicated by the variable list are installed.\r
-                  If points to NULL, all handles are searched. If pointing to a\r
-                  handle returned from previous call, searches starting from next handle.\r
-                  If NULL, the parameter is ignored.\r
-\r
-  Interface     - The address of a pointer to a protocol interface that will receive\r
-                  the interface indicated by first variable argument.\r
-                  If NULL, the parameter is ignored.\r
-\r
-  ...           - A variable argument list containing protocol GUIDs. Must end with NULL.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS  - All the protocols where found on same handle.\r
-  EFI_NOT_FOUND - A Handle with all the protocols installed was not found.\r
-  Other values as may be returned from LocateHandleBuffer() or HandleProtocol().\r
-\r
---*/\r
-;\r
-\r
-//\r
-// Debug.c init\r
-//\r
-EFI_STATUS\r
-EfiDebugAssertInit (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  \r
-  Locate Debug Assert Protocol and set as mDebugAssert\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-//\r
-// Unicode String Support\r
-//\r
-EFI_STATUS\r
-EfiLibLookupUnicodeString (\r
-  CHAR8                     *Language,\r
-  CHAR8                     *SupportedLanguages,\r
-  EFI_UNICODE_STRING_TABLE  *UnicodeStringTable,\r
-  CHAR16                    **UnicodeString\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Translate a unicode string to a specified language if supported.\r
-  \r
-Arguments:\r
-\r
-  Language              - The name of language to translate to\r
-  SupportedLanguages    - Supported languages set\r
-  UnicodeStringTable    - Pointer of one item in translation dictionary\r
-  UnicodeString         - The translated string\r
-\r
-Returns: \r
-\r
-  EFI_INVALID_PARAMETER - Invalid parameter\r
-  EFI_UNSUPPORTED       - System not supported this language or this string translation\r
-  EFI_SUCCESS           - String successfully translated\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiLibAddUnicodeString (\r
-  CHAR8                     *Language,\r
-  CHAR8                     *SupportedLanguages,\r
-  EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,\r
-  CHAR16                    *UnicodeString\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Add an translation to the dictionary if this language if supported.\r
-  \r
-Arguments:\r
-\r
-  Language              - The name of language to translate to\r
-  SupportedLanguages    - Supported languages set\r
-  UnicodeStringTable    - Translation dictionary\r
-  UnicodeString         - The corresponding string for the language to be translated to\r
-\r
-Returns: \r
-\r
-  EFI_INVALID_PARAMETER - Invalid parameter\r
-  EFI_UNSUPPORTED       - System not supported this language\r
-  EFI_ALREADY_STARTED   - Already has a translation item of this language\r
-  EFI_OUT_OF_RESOURCES  - No enough buffer to be allocated\r
-  EFI_SUCCESS           - String successfully translated\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiLibFreeUnicodeStringTable (\r
-  EFI_UNICODE_STRING_TABLE  *UnicodeStringTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Free a string table.\r
-\r
-Arguments:\r
-\r
-  UnicodeStringTable      - The string table to be freed.\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS       - The table successfully freed.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiLibReportStatusCode (\r
-  IN EFI_STATUS_CODE_TYPE     Type,\r
-  IN EFI_STATUS_CODE_VALUE    Value,\r
-  IN UINT32                   Instance,\r
-  IN EFI_GUID                 *CallerId OPTIONAL,\r
-  IN EFI_STATUS_CODE_DATA     *Data     OPTIONAL  \r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Report status code.\r
-\r
-Arguments:\r
-\r
-  Type        - Code type\r
-  Value       - Code value\r
-  Instance    - Instance number\r
-  CallerId    - Caller name\r
-  DevicePath  - Device path that to be reported\r
-\r
-Returns:\r
-\r
-  Status code.\r
-\r
-  EFI_OUT_OF_RESOURCES - No enough buffer could be allocated\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-ReportStatusCodeWithDevicePath (\r
-  IN EFI_STATUS_CODE_TYPE     Type,\r
-  IN EFI_STATUS_CODE_VALUE    Value,\r
-  IN UINT32                   Instance,\r
-  IN EFI_GUID                 * CallerId OPTIONAL,\r
-  IN EFI_DEVICE_PATH_PROTOCOL * DevicePath\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Report device path through status code.\r
-\r
-Arguments:\r
-\r
-  Type        - Code type\r
-  Value       - Code value\r
-  Instance    - Instance number\r
-  CallerId    - Caller name\r
-  DevicePath  - Device path that to be reported\r
-\r
-Returns:\r
-\r
-  Status code.\r
-\r
-  EFI_OUT_OF_RESOURCES - No enough buffer could be allocated\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-EfiCreateEventLegacyBoot (\r
-  IN EFI_TPL                      NotifyTpl,\r
-  IN EFI_EVENT_NOTIFY             NotifyFunction,\r
-  IN VOID                         *NotifyContext,\r
-  OUT EFI_EVENT                   *LegacyBootEvent\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Create a Legacy Boot Event.  \r
-  Tiano extended the CreateEvent Type enum to add a legacy boot event type. \r
-  This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was\r
-  added and now it's possible to not voilate the UEFI specification by \r
-  declaring a GUID for the legacy boot event class. This library supports\r
-  the EFI 1.10 form and UEFI 2.0 form and allows common code to work both ways.\r
-\r
-Arguments:\r
-  LegacyBootEvent  Returns the EFI event returned from gBS->CreateEvent(Ex)\r
-\r
-Returns:\r
-  EFI_SUCCESS   Event was created.\r
-  Other         Event was not created.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-EfiCreateEventReadyToBoot (\r
-  IN EFI_TPL                      NotifyTpl,\r
-  IN EFI_EVENT_NOTIFY             NotifyFunction,\r
-  IN VOID                         *NotifyContext,\r
-  OUT EFI_EVENT                   *ReadyToBootEvent\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Create a Read to Boot Event.  \r
-  \r
-  Tiano extended the CreateEvent Type enum to add a ready to boot event type. \r
-  This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was\r
-  added and now it's possible to not voilate the UEFI specification and use \r
-  the ready to boot event class defined in UEFI 2.0. This library supports\r
-  the EFI 1.10 form and UEFI 2.0 form and allows common code to work both ways.\r
-\r
-Arguments:\r
-  @param LegacyBootEvent  Returns the EFI event returned from gBS->CreateEvent(Ex)\r
-\r
-Return:\r
-  EFI_SUCCESS   - Event was created.\r
-  Other         - Event was not created.\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-EFIAPI\r
-EfiInitializeFwVolDevicepathNode (\r
-  IN  MEDIA_FW_VOL_FILEPATH_DEVICE_PATH     *FvDevicePathNode,\r
-  IN EFI_GUID                               *NameGuid\r
-  )\r
-/*++\r
-Routine Description:\r
-  Initialize a Firmware Volume (FV) Media Device Path node.\r
-  \r
-Arguments:\r
-  FvDevicePathNode   - Pointer to a FV device path node to initialize\r
-  NameGuid           - FV file name to use in FvDevicePathNode\r
-\r
---*/\r
-;\r
-\r
-EFI_GUID *\r
-EFIAPI\r
-EfiGetNameGuidFromFwVolDevicePathNode (\r
-  IN  MEDIA_FW_VOL_FILEPATH_DEVICE_PATH   *FvDevicePathNode\r
-  )\r
-/*++\r
-Routine Description:\r
-  Check to see if the Firmware Volume (FV) Media Device Path is valid.\r
-  \r
-Arguments:\r
-  FvDevicePathNode   - Pointer to FV device path to check\r
-\r
-Return:\r
-  NULL    - FvDevicePathNode is not valid.\r
-  Other   - FvDevicePathNode is valid and pointer to NameGuid was returned.\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-EfiLibSafeFreePool (\r
-  IN  VOID             *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Free pool safely.\r
-\r
-Arguments:\r
-  \r
-  Buffer          - The allocated pool entry to free\r
-\r
-Returns:\r
-\r
-  Pointer of the buffer allocated.\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiLibTestManagedDevice (\r
-  IN EFI_HANDLE       ControllerHandle,\r
-  IN EFI_HANDLE       DriverBindingHandle,\r
-  IN EFI_GUID         *ManagedProtocolGuid\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Test to see if the controller is managed by a specific driver.\r
-\r
-Arguments:\r
-\r
-  ControllerHandle          - Handle for controller to test\r
-\r
-  DriverBindingHandle       - Driver binding handle for controller\r
-\r
-  ManagedProtocolGuid       - The protocol guid the driver opens on controller\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS     - The controller is managed by the driver\r
-\r
-  EFI_UNSUPPORTED - The controller is not managed by the driver\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiLibTestChildHandle (\r
-  IN EFI_HANDLE       ControllerHandle,\r
-  IN EFI_HANDLE       ChildHandle,\r
-  IN EFI_GUID         *ConsumedGuid\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Test to see if the child handle is the child of the controller\r
-\r
-Arguments:\r
-\r
-  ControllerHandle          - Handle for controller (parent)\r
-\r
-  ChildHandle               - Child handle to test\r
-\r
-  ConsumsedGuid             - Protocol guid consumed by child from controller\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS     - The child handle is the child of the controller\r
-\r
-  EFI_UNSUPPORTED - The child handle is not the child of the controller\r
-\r
---*/\r
-;\r
-#endif\r