]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiRuntimeLib.h
EdkCompatibilityPkg: Remove EdkCompatibilityPkg
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Dxe / Include / EfiRuntimeLib.h
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiRuntimeLib.h b/EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiRuntimeLib.h
deleted file mode 100644 (file)
index e130492..0000000
+++ /dev/null
@@ -1,1743 +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
-    EfiRuntimeLib.h\r
-\r
-Abstract:\r
-\r
-  Light weight lib to support EFI drivers.\r
-\r
---*/\r
-\r
-#ifndef _EFI_RUNTIME_LIB_H_\r
-#define _EFI_RUNTIME_LIB_H_\r
-#define MAX_FVB_COUNT 16\r
-#include "EfiStatusCode.h"\r
-#include "EfiCommonLib.h"\r
-\r
-#include "LinkedList.h"\r
-#include "GetImage.h"\r
-#include "RtDevicePath.h"\r
-\r
-#include EFI_GUID_DEFINITION (DxeServices)\r
-#include EFI_GUID_DEFINITION (EventGroup)\r
-#include EFI_GUID_DEFINITION (EventLegacyBios)\r
-#include EFI_PROTOCOL_DEFINITION (CpuIo)\r
-#include EFI_PROTOCOL_DEFINITION (FirmwareVolume)\r
-#include EFI_PROTOCOL_DEFINITION (FirmwareVolume2)\r
-#include EFI_PROTOCOL_DEFINITION (FirmwareVolumeBlock)\r
-#include EFI_PROTOCOL_DEFINITION (FvbExtension)\r
-#include "ProcDep.h"\r
-\r
-typedef struct {\r
-  EFI_HANDLE                          Handle;\r
-  EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  *Fvb;\r
-  EFI_FVB_EXTENSION_PROTOCOL          *FvbExtension;\r
-} FVB_ENTRY;\r
-\r
-//\r
-// Driver Lib Globals.\r
-//\r
-extern EFI_BOOT_SERVICES  *gBS;\r
-extern EFI_SYSTEM_TABLE   *gST;\r
-extern EFI_DXE_SERVICES   *gDS;\r
-extern UINTN              gRtErrorLevel;\r
-extern FVB_ENTRY          *mFvbEntry;\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
-VOID\r
-EFIAPI\r
-EfiRuntimeLibFvbVirtualNotifyEvent (\r
-  IN EFI_EVENT        Event,\r
-  IN VOID             *Context\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Notify function to convert pointers to Fvb functions after ExitBootServices\r
-\r
-Arguments:\r
-\r
-  Event   - Event whose notification function is being invoked.\r
-  Context - Pointer to the notification function's context, which is\r
-            implementation-dependent.\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiInitializeRuntimeDriverLib (\r
-  IN EFI_HANDLE           ImageHandle,\r
-  IN EFI_SYSTEM_TABLE     *SystemTable,\r
-  IN EFI_EVENT_NOTIFY     RuntimeNotifyEventHandler\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Intialize Runtime 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
-  RuntimeNotifyEventHandler     - Virtual address change notification event\r
-\r
-Returns: \r
-\r
-  EFI_STATUS always returns EFI_SUCCESS\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiShutdownRuntimeDriverLib (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This routine will free some resources which have been allocated in\r
-  EfiInitializeRuntimeDriverLib(). If a runtime driver exits with an error, \r
-  it must call this routine to free the allocated resource before the exiting.\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS     - Shotdown the Runtime Driver Lib successfully\r
-  EFI_UNSUPPORTED - Runtime Driver lib was not initialized at all\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiInitializeSmmDriverLib (\r
-  IN EFI_HANDLE           ImageHandle,\r
-  IN EFI_SYSTEM_TABLE     *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Intialize Smm 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
-EfiLibGetSystemConfigurationTable (\r
-  IN EFI_GUID *TableGuid,\r
-  IN 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
-EfiAtRuntime (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Am I at runtime?\r
-\r
-Arguments:\r
-\r
-  None\r
-\r
-Returns:\r
-\r
-  TRUE      - At runtime\r
-  FALSE     - Not at runtime\r
-\r
---*/\r
-;\r
-\r
-BOOLEAN\r
-EfiGoneVirtual (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Return TRUE if SetVirtualAddressMap () has been called\r
-\r
-Arguments:\r
-  NONE\r
-\r
-Returns: \r
-  TRUE - If SetVirtualAddressMap () has been called\r
-  FALSE - If SetVirtualAddressMap () has not been called\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiLibGetSystemConfigurationTable (\r
-  IN EFI_GUID *TableGuid,\r
-  IN OUT VOID **Table\r
-  )\r
-/*++\r
-\r
\r
-\r
-Routine Description:\r
-\r
\r
-\r
-  Get table from configuration table by name\r
-\r
\r
-\r
-Arguments:\r
-\r
\r
-\r
-  TableGuid       - Table name to search\r
-\r
-  \r
-\r
-  Table           - Pointer to the table caller wants\r
-\r
\r
-\r
-Returns: \r
-\r
\r
-\r
-  EFI_NOT_FOUND   - Not found the table\r
-\r
-  \r
-\r
-  EFI_SUCCESS     - Found the table\r
-\r
\r
-\r
---*/\r
-\r
-;\r
-\r
-EFI_EVENT\r
-RtEfiLibCreateProtocolNotifyEvent (\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
-//\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
-\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
-  Lock owned\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
-#define EfiCopyMem  EfiCommonLibCopyMem\r
-#define EfiSetMem   EfiCommonLibSetMem\r
-#define EfiZeroMem  EfiCommonLibZeroMem\r
-\r
-INTN\r
-EfiCompareMem (\r
-  IN VOID     *MemOne,\r
-  IN VOID     *MemTwo,\r
-  IN UINTN    Len\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Compares two memory buffers of a given length.\r
-\r
-Arguments:\r
-\r
-  MemOne - First memory buffer\r
-\r
-  MemTwo - Second memory buffer\r
-\r
-  Len    - Length of Mem1 and Mem2 memory regions to compare\r
-\r
-Returns:\r
-\r
-  = 0     if MemOne == MemTwo\r
-  \r
-  > 0     if MemOne > MemTwo\r
-  \r
-  < 0     if MemOne < MemTwo\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
-// Wrapper for EFI runtime functions\r
-//\r
-VOID\r
-EfiResetSystem (\r
-  IN EFI_RESET_TYPE               ResetType,\r
-  IN EFI_STATUS                   ResetStatus,\r
-  IN UINTN                        DataSize,\r
-  IN CHAR16                       *ResetData\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Resets the entire platform.\r
-\r
-Arguments:\r
-\r
-  ResetType   - The type of reset to perform.\r
-  ResetStatus - The status code for the reset.\r
-  DataSize    - The size, in bytes, of ResetData.\r
-  ResetData   - A data buffer that includes a Null-terminated Unicode string, optionally\r
-                followed by additional binary data.\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiGetNextHighMonotonicCount (\r
-  OUT UINT32                      *HighCount\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Returns the next high 32 bits of the platform's monotonic counter.\r
-\r
-Arguments:\r
-\r
-  HighCount - Pointer to returned value.\r
-\r
-Returns:\r
-\r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiGetTime (\r
-  OUT EFI_TIME                    *Time,\r
-  OUT EFI_TIME_CAPABILITIES       *Capabilities\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Returns the current time and date information, and the time-keeping \r
-  capabilities of the hardware platform.\r
-\r
-Arguments:\r
-\r
-  Time          - A pointer to storage to receive a snapshot of the current time.\r
-  Capabilities  - An optional pointer to a buffer to receive the real time clock device's\r
-                  capabilities.\r
-\r
-Returns:\r
-\r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiSetTime (\r
-  OUT EFI_TIME                    *Time\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Sets the current local time and date information.\r
-\r
-Arguments:\r
-\r
-  Time  - A pointer to the current time.\r
-\r
-Returns:\r
-\r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiGetWakeupTime (\r
-  OUT BOOLEAN                     *Enabled,\r
-  OUT BOOLEAN                     *Pending,\r
-  OUT EFI_TIME                    *Time\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Returns the current wakeup alarm clock setting.\r
-\r
-Arguments:\r
-\r
-  Enabled - Indicates if the alarm is currently enabled or disabled.\r
-  Pending - Indicates if the alarm signal is pending and requires acknowledgement.\r
-  Time    - The current alarm setting.\r
-\r
-Returns:\r
-\r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiSetWakeupTime (\r
-  IN BOOLEAN                      Enable,\r
-  IN EFI_TIME                     *Time\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Sets the system wakeup alarm clock time.\r
-\r
-Arguments:\r
-\r
-  Enable  - Enable or disable the wakeup alarm.\r
-  Time    - If Enable is TRUE, the time to set the wakeup alarm for.\r
-            If Enable is FALSE, then this parameter is optional, and may be NULL.\r
-\r
-Returns:\r
-\r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiGetVariable (\r
-  IN CHAR16                       *VariableName,\r
-  IN EFI_GUID                     * VendorGuid,\r
-  OUT UINT32                      *Attributes OPTIONAL,\r
-  IN OUT UINTN                    *DataSize,\r
-  OUT VOID                        *Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Returns the value of a variable.\r
-\r
-Arguments:\r
-\r
-  VariableName  - A Null-terminated Unicode string that is the name of the\r
-                  vendor's variable.\r
-  VendorGuid    - A unique identifier for the vendor.\r
-  Attributes    - If not NULL, a pointer to the memory location to return the\r
-                  attributes bitmask for the variable.\r
-  DataSize      - On input, the size in bytes of the return Data buffer.\r
-                  On output the size of data returned in Data.\r
-  Data          - The buffer to return the contents of the variable.\r
-\r
-Returns:\r
-\r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiGetNextVariableName (\r
-  IN OUT UINTN                    *VariableNameSize,\r
-  IN OUT CHAR16                   *VariableName,\r
-  IN OUT EFI_GUID                 *VendorGuid\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Enumerates the current variable names.\r
-\r
-Arguments:\r
-\r
-  VariableNameSize  - The size of the VariableName buffer.\r
-  VariableName      - On input, supplies the last VariableName that was returned\r
-                      by GetNextVariableName(). \r
-                      On output, returns the Nullterminated Unicode string of the\r
-                      current variable.\r
-  VendorGuid        - On input, supplies the last VendorGuid that was returned by\r
-                      GetNextVariableName(). \r
-                      On output, returns the VendorGuid of the current variable.\r
-\r
-Returns:\r
-\r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiSetVariable (\r
-  IN CHAR16                       *VariableName,\r
-  IN EFI_GUID                     *VendorGuid,\r
-  IN UINT32                       Attributes,\r
-  IN UINTN                        DataSize,\r
-  IN VOID                         *Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Sets the value of a variable.\r
-\r
-Arguments:\r
-\r
-  VariableName  - A Null-terminated Unicode string that is the name of the\r
-                  vendor's variable.\r
-  VendorGuid    - A unique identifier for the vendor.\r
-  Attributes    - Attributes bitmask to set for the variable.\r
-  DataSize      - The size in bytes of the Data buffer.\r
-  Data          - The contents for the variable.\r
-\r
-Returns:\r
-\r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
-\r
-EFI_STATUS\r
-EfiQueryVariableInfo (\r
-  IN UINT32           Attributes,\r
-  OUT UINT64          *MaximumVariableStorageSize,\r
-  OUT UINT64          *RemainingVariableStorageSize,\r
-  OUT UINT64          *MaximumVariableSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This code returns information about the EFI variables.\r
-\r
-Arguments:\r
-\r
-  Attributes                      Attributes bitmask to specify the type of variables \r
-                                  on which to return information.\r
-  MaximumVariableStorageSize      Pointer to the maximum size of the storage space available\r
-                                  for the EFI variables associated with the attributes specified.\r
-  RemainingVariableStorageSize    Pointer to the remaining size of the storage space available \r
-                                  for the EFI variables associated with the attributes specified.\r
-  MaximumVariableSize             Pointer to the maximum size of the individual EFI variables\r
-                                  associated with the attributes specified.\r
-\r
-Returns:\r
-\r
-  Status code\r
-\r
---*/\r
-;\r
-#endif\r
-\r
-\r
-EFI_STATUS\r
-EfiReportStatusCode (\r
-  IN EFI_STATUS_CODE_TYPE     CodeType,\r
-  IN EFI_STATUS_CODE_VALUE    Value,\r
-  IN UINT32                   Instance,\r
-  IN EFI_GUID                 * CallerId,\r
-  IN EFI_STATUS_CODE_DATA     * Data OPTIONAL\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Status Code reporter\r
-\r
-Arguments:\r
-  \r
-  CodeType    - Type of Status Code.\r
-  \r
-  Value       - Value to output for Status Code.\r
-  \r
-  Instance    - Instance Number of this status code.\r
-  \r
-  CallerId    - ID of the caller of this status code.\r
-  \r
-  Data        - Optional data associated with this status code.\r
-\r
-Returns:\r
-\r
-  Status code\r
-  \r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiConvertPointer (\r
-  IN UINTN                     DebugDisposition,\r
-  IN OUT VOID                  *Address\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Determines the new virtual address that is to be used on subsequent memory accesses.\r
-\r
-Arguments:\r
-\r
-  DebugDisposition  - Supplies type information for the pointer being converted.\r
-  Address           - A pointer to a pointer that is to be fixed to be the value needed\r
-                      for the new virtual address mappings being applied.\r
-\r
-Returns:\r
-\r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiConvertList (\r
-  IN UINTN                DebugDisposition,\r
-  IN OUT EFI_LIST_ENTRY   *ListHead\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Conver the standard Lib double linked list to a virtual mapping.\r
-\r
-Arguments:\r
-\r
-  DebugDisposition - Argument to EfiConvertPointer (EFI 1.0 API)\r
-\r
-  ListHead         - Head of linked list to convert\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS\r
-\r
---*/\r
-;\r
-\r
-//\r
-//  Base IO Class Functions\r
-//\r
-EFI_STATUS\r
-EfiIoRead (\r
-  IN     EFI_CPU_IO_PROTOCOL_WIDTH  Width,\r
-  IN     UINT64                     Address,\r
-  IN     UINTN                      Count,\r
-  IN OUT VOID                       *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Perform an IO read into Buffer.\r
-\r
-Arguments:\r
-  Width   - Width of read transaction, and repeat operation to use\r
-  Address - IO address to read\r
-  Count   - Number of times to read the IO address.\r
-  Buffer  - Buffer to read data into. size is Width * Count\r
-\r
-Returns: \r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-UINT8\r
-IoRead8 (\r
-  IN  UINT64    Address\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a one byte IO read\r
-\r
-Arguments:\r
-  Address - IO address to read\r
-\r
-Returns: \r
-  Data read\r
-\r
---*/\r
-;\r
-\r
-UINT16\r
-IoRead16 (\r
-  IN  UINT64    Address\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a two byte IO read\r
-\r
-Arguments:\r
-  Address - IO address to read\r
-\r
-Returns: \r
-  Data read\r
-\r
---*/\r
-;\r
-\r
-UINT32\r
-IoRead32 (\r
-  IN  UINT64    Address\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a four byte IO read\r
-\r
-Arguments:\r
-  Address - IO address to read\r
-\r
-Returns: \r
-  Data read\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiIoWrite (\r
-  IN     EFI_CPU_IO_PROTOCOL_WIDTH  Width,\r
-  IN     UINT64                     Address,\r
-  IN     UINTN                      Count,\r
-  IN OUT VOID                       *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Perform an IO write into Buffer.\r
-\r
-Arguments:\r
-  Width   - Width of write transaction, and repeat operation to use\r
-  Address - IO address to write\r
-  Count   - Number of times to write the IO address.\r
-  Buffer  - Buffer to write data from. size is Width * Count\r
-\r
-Returns: \r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-IoWrite8 (\r
-  IN  UINT64    Address,\r
-  IN  UINT8     Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a one byte IO write\r
-\r
-Arguments:\r
-  Address - IO address to write\r
-  Data    - Data to write to Address\r
-\r
-Returns: \r
-  NONE\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-IoWrite16 (\r
-  IN  UINT64    Address,\r
-  IN  UINT16    Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a two byte IO write\r
-\r
-Arguments:\r
-  Address - IO address to write\r
-  Data    - Data to write to Address\r
-\r
-Returns: \r
-  NONE\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-IoWrite32 (\r
-  IN  UINT64    Address,\r
-  IN  UINT32    Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a four byte IO write\r
-\r
-Arguments:\r
-  Address - IO address to write\r
-  Data    - Data to write to Address\r
-\r
-Returns: \r
-  NONE\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiMemRead (\r
-  IN     EFI_CPU_IO_PROTOCOL_WIDTH  Width,\r
-  IN     UINT64                     Address,\r
-  IN     UINTN                      Count,\r
-  IN  OUT VOID                      *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Perform a Memory mapped IO read into Buffer.\r
-\r
-Arguments:\r
-  Width   - Width of each read transaction.\r
-  Address - Memory mapped IO address to read\r
-  Count   - Number of Width quanta to read\r
-  Buffer  - Buffer to read data into. size is Width * Count\r
-\r
-Returns: \r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-UINT8\r
-MemRead8 (\r
-  IN  UINT64    Address\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a one byte Memory mapped IO read\r
-\r
-Arguments:\r
-  Address - Memory mapped IO address to read\r
-\r
-Returns: \r
-  Data read\r
-\r
---*/\r
-;\r
-\r
-UINT16\r
-MemRead16 (\r
-  IN  UINT64    Address\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a two byte Memory mapped IO read\r
-\r
-Arguments:\r
-  Address - Memory mapped IO address to read\r
-\r
-Returns: \r
-  Data read\r
-\r
---*/\r
-;\r
-\r
-UINT32\r
-MemRead32 (\r
-  IN  UINT64    Address\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a four byte Memory mapped IO read\r
-\r
-Arguments:\r
-  Address - Memory mapped IO address to read\r
-\r
-Returns: \r
-  Data read\r
-\r
---*/\r
-;\r
-\r
-UINT64\r
-MemRead64 (\r
-  IN  UINT64    Address\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a eight byte Memory mapped IO read\r
-\r
-Arguments:\r
-  Address - Memory mapped IO address to read\r
-\r
-Returns: \r
-  Data read\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiMemWrite (\r
-  IN     EFI_CPU_IO_PROTOCOL_WIDTH  Width,\r
-  IN     UINT64                     Address,\r
-  IN     UINTN                      Count,\r
-  IN OUT VOID                       *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Perform a memory mapped IO write into Buffer.\r
-\r
-Arguments:\r
-  Width   - Width of write transaction, and repeat operation to use\r
-  Address - IO address to write\r
-  Count   - Number of times to write the IO address.\r
-  Buffer  - Buffer to write data from. size is Width * Count\r
-\r
-Returns: \r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-MemWrite8 (\r
-  IN  UINT64    Address,\r
-  IN  UINT8     Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a one byte Memory mapped IO write\r
-\r
-Arguments:\r
-  Address - Memory mapped IO address to write\r
-  Data    - Data to write to Address\r
-\r
-Returns: \r
-  NONE\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-MemWrite16 (\r
-  IN  UINT64    Address,\r
-  IN  UINT16    Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a two byte Memory mapped IO write\r
-\r
-Arguments:\r
-  Address - Memory mapped IO address to write\r
-  Data    - Data to write to Address\r
-\r
-Returns: \r
-  NONE\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-MemWrite32 (\r
-  IN  UINT64    Address,\r
-  IN  UINT32    Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a four byte Memory mapped IO write\r
-\r
-Arguments:\r
-  Address - Memory mapped IO address to write\r
-  Data    - Data to write to Address\r
-\r
-Returns: \r
-  NONE\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-MemWrite64 (\r
-  IN  UINT64    Address,\r
-  IN  UINT64    Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Do a eight byte Memory mapped IO write\r
-\r
-Arguments:\r
-  Address - Memory mapped IO address to write\r
-  Data    - Data to write to Address\r
-\r
-Returns: \r
-  NONE\r
-\r
---*/\r
-;\r
-\r
-//\r
-//  Platform specific functions\r
-//\r
-UINT8\r
-PciRead8 (\r
-  UINT8   Segment,\r
-  UINT8   Bus,\r
-  UINT8   DevFunc,\r
-  UINT8   Register\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Perform an one byte PCI config cycle read\r
-    \r
-Arguments:\r
-  Segment   - PCI Segment ACPI _SEG\r
-  Bus       - PCI Bus\r
-  DevFunc   - PCI Device(7:3) and Func(2:0)\r
-  Register  - PCI config space register\r
-\r
-Returns:\r
-  Data read from PCI config space\r
-\r
---*/\r
-;\r
-\r
-UINT16\r
-PciRead16 (\r
-  UINT8   Segment,\r
-  UINT8   Bus,\r
-  UINT8   DevFunc,\r
-  UINT8   Register\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Perform an two byte PCI config cycle read\r
-    \r
-Arguments:\r
-  Segment   - PCI Segment ACPI _SEG\r
-  Bus       - PCI Bus\r
-  DevFunc   - PCI Device(7:3) and Func(2:0)\r
-  Register  - PCI config space register\r
-\r
-Returns:\r
-  Data read from PCI config space\r
-\r
---*/\r
-;\r
-\r
-UINT32\r
-PciRead32 (\r
-  UINT8   Segment,\r
-  UINT8   Bus,\r
-  UINT8   DevFunc,\r
-  UINT8   Register\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Perform an four byte PCI config cycle read\r
-    \r
-Arguments:\r
-  Segment   - PCI Segment ACPI _SEG\r
-  Bus       - PCI Bus\r
-  DevFunc   - PCI Device(7:3) and Func(2:0)\r
-  Register  - PCI config space register\r
-\r
-Returns:\r
-  Data read from PCI config space\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-PciWrite8 (\r
-  UINT8   Segment,\r
-  UINT8   Bus,\r
-  UINT8   DevFunc,\r
-  UINT8   Register,\r
-  UINT8   Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Perform an one byte PCI config cycle write\r
-    \r
-Arguments:\r
-  Segment   - PCI Segment ACPI _SEG\r
-  Bus       - PCI Bus\r
-  DevFunc   - PCI Device(7:3) and Func(2:0)\r
-  Register  - PCI config space register\r
-  Data      - Data to write\r
-\r
-Returns:\r
-  NONE\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-PciWrite16 (\r
-  UINT8   Segment,\r
-  UINT8   Bus,\r
-  UINT8   DevFunc,\r
-  UINT8   Register,\r
-  UINT16  Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Perform an two byte PCI config cycle write\r
-    \r
-Arguments:\r
-  Segment   - PCI Segment ACPI _SEG\r
-  Bus       - PCI Bus\r
-  DevFunc   - PCI Device(7:3) and Func(2:0)\r
-  Register  - PCI config space register\r
-  Data      - Data to write\r
-\r
-Returns:\r
-  NONE\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-PciWrite32 (\r
-  UINT8   Segment,\r
-  UINT8   Bus,\r
-  UINT8   DevFunc,\r
-  UINT8   Register,\r
-  UINT32  Data\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Perform an four byte PCI config cycle write\r
-\r
-Arguments:\r
-  Segment   - PCI Segment ACPI _SEG\r
-  Bus       - PCI Bus\r
-  DevFunc   - PCI Device(7:3) and Func(2:0)\r
-  Register  - PCI config space register\r
-  Data      - Data to write\r
-\r
-Returns:\r
-  NONE\r
-\r
---*/\r
-;\r
-\r
-VOID\r
-EfiStall (\r
-  IN  UINTN   Microseconds\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
- Delay for at least the request number of microseconds\r
-    \r
-Arguments:\r
-  Microseconds - Number of microseconds to delay.\r
-\r
-Returns:\r
-  NONE\r
-\r
---*/\r
-;\r
-\r
-//\r
-//  FVB Services.\r
-//\r
-EFI_STATUS\r
-EfiFvbInitialize (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Initialize globals and register Fvb Protocol notification function.\r
-\r
-Arguments:\r
-  None \r
-\r
-Returns: \r
-  EFI_SUCCESS\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiFvbShutdown (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Release resources allocated in EfiFvbInitialize.\r
-\r
-Arguments:\r
-  None \r
-\r
-Returns: \r
-  EFI_SUCCESS\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiFvbReadBlock (\r
-  IN UINTN                                        Instance,\r
-  IN EFI_LBA                                      Lba,\r
-  IN UINTN                                        Offset,\r
-  IN OUT UINTN                                    *NumBytes,\r
-  IN UINT8                                        *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Reads specified number of bytes into a buffer from the specified block\r
-\r
-Arguments:\r
-  Instance              - The FV instance to be read from\r
-  Lba                   - The logical block address to be read from\r
-  Offset                - Offset into the block at which to begin reading\r
-  NumBytes              - Pointer that on input contains the total size of\r
-                          the buffer. On output, it contains the total number\r
-                          of bytes read\r
-  Buffer                - Pointer to a caller allocated buffer that will be\r
-                          used to hold the data read\r
-\r
-Returns: \r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiFvbWriteBlock (\r
-  IN UINTN                                        Instance,\r
-  IN EFI_LBA                                      Lba,\r
-  IN UINTN                                        Offset,\r
-  IN OUT UINTN                                    *NumBytes,\r
-  IN UINT8                                        *Buffer\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Writes specified number of bytes from the input buffer to the block\r
-\r
-Arguments:\r
-  Instance              - The FV instance to be written to\r
-  Lba                   - The starting logical block index to write to\r
-  Offset                - Offset into the block at which to begin writing\r
-  NumBytes              - Pointer that on input contains the total size of\r
-                          the buffer. On output, it contains the total number\r
-                          of bytes actually written\r
-  Buffer                - Pointer to a caller allocated buffer that contains\r
-                          the source for the write\r
-\r
-Returns: \r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiFvbEraseBlock (\r
-  IN UINTN                                Instance,\r
-  IN EFI_LBA                              Lba\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Erases and initializes a firmware volume block\r
-\r
-Arguments:\r
-  Instance              - The FV instance to be erased\r
-  Lba                   - The logical block index to be erased\r
-  \r
-Returns: \r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiFvbGetVolumeAttributes (\r
-  IN UINTN                                Instance,\r
-  OUT EFI_FVB_ATTRIBUTES                  *Attributes\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Retrieves attributes, insures positive polarity of attribute bits, returns\r
-  resulting attributes in output parameter\r
-\r
-Arguments:\r
-  Instance              - The FV instance whose attributes is going to be \r
-                          returned\r
-  Attributes            - Output buffer which contains attributes\r
-\r
-Returns: \r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiFvbSetVolumeAttributes (\r
-  IN UINTN                                Instance,\r
-  IN EFI_FVB_ATTRIBUTES                   Attributes\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Modifies the current settings of the firmware volume according to the \r
-  input parameter.\r
-\r
-Arguments:\r
-  Instance              - The FV instance whose attributes is going to be \r
-                          modified\r
-  Attributes            - It is a pointer to EFI_FVB_ATTRIBUTES \r
-                          containing the desired firmware volume settings.\r
-\r
-Returns: \r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiFvbGetPhysicalAddress (\r
-  IN UINTN                                Instance,\r
-  OUT EFI_PHYSICAL_ADDRESS                *Address\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Retrieves the physical address of a memory mapped FV\r
-\r
-Arguments:\r
-  Instance              - The FV instance whose base address is going to be\r
-                          returned\r
-  Address               - Pointer to a caller allocated EFI_PHYSICAL_ADDRESS \r
-                          that on successful return, contains the base address\r
-                          of the firmware volume. \r
-\r
-Returns: \r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiFvbGetBlockSize (\r
-  IN UINTN                                Instance,\r
-  IN EFI_LBA                              Lba,\r
-  OUT UINTN                               *BlockSize,\r
-  OUT UINTN                               *NumOfBlocks\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Retrieve the size of a logical block\r
-\r
-Arguments:\r
-  Instance              - The FV instance whose block size is going to be\r
-                          returned\r
-  Lba                   - Indicates which block to return the size for.\r
-  BlockSize             - A pointer to a caller allocated UINTN in which\r
-                          the size of the block is returned\r
-  NumOfBlocks           - a pointer to a caller allocated UINTN in which the\r
-                          number of consecutive blocks starting with Lba is\r
-                          returned. All blocks in this range have a size of\r
-                          BlockSize\r
-\r
-Returns: \r
-  EFI_SUCCESS           - The firmware volume was read successfully and \r
-                          contents are in Buffer\r
-\r
---*/\r
-;\r
-EFI_STATUS\r
-EfiFvbEraseCustomBlockRange (\r
-  IN UINTN                                Instance,\r
-  IN EFI_LBA                              StartLba,\r
-  IN UINTN                                OffsetStartLba,\r
-  IN EFI_LBA                              LastLba,\r
-  IN UINTN                                OffsetLastLba\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Erases and initializes a specified range of a firmware volume\r
-\r
-Arguments:\r
-  Instance              - The FV instance to be erased\r
-  StartLba              - The starting logical block index to be erased\r
-  OffsetStartLba        - Offset into the starting block at which to \r
-                          begin erasing\r
-  LastLba               - The last logical block index to be erased\r
-  OffsetLastLba         - Offset into the last block at which to end erasing\r
-\r
-Returns: \r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EfiCpuFlushCache (\r
-  IN EFI_PHYSICAL_ADDRESS          Start,\r
-  IN UINT64                        Length\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Flush cache with specified range.\r
-\r
-Arguments:\r
-\r
-  Start   - Start address\r
-  Length  - Length in bytes\r
-\r
-Returns:\r
-\r
-  Status code\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-RtEfiCreateEventLegacyBoot (\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
-RtEfiCreateEventReadyToBoot (\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
-  ReadyToBootEvent  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
-#endif\r