--- /dev/null
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation \r
+All rights reserved. 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
+ Runtime.h\r
+\r
+Abstract:\r
+\r
+ Runtime Architectural Protocol as defined in the DXE CIS\r
+\r
+ This code is used to produce the EFI runtime architectural protocol.\r
+\r
+--*/\r
+\r
+#ifndef _RUNTIME_H_\r
+#define _RUNTIME_H_\r
+\r
+//\r
+// Function Prototypes\r
+//\r
+EFI_STATUS\r
+EFIAPI\r
+RuntimeDriverCalculateCrc32 (\r
+ IN VOID *Data,\r
+ IN UINTN DataSize,\r
+ OUT UINT32 *CrcOut\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+ Calculate CRC32 for target data\r
+\r
+Arguments:\r
+\r
+ Data - The target data.\r
+ DataSize - The target data size.\r
+ CrcOut - The CRC32 for target data.\r
+\r
+Returns:\r
+\r
+ EFI_SUCCESS - The CRC32 for target data is calculated successfully.\r
+ EFI_INVALID_PARAMETER - Some parameter is not valid, so the CRC32 is not \r
+ calculated.\r
+\r
+--*/\r
+;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+RuntimeDriverConvertPointer (\r
+ IN UINTN DebugDisposition,\r
+ IN OUT VOID **ConvertAddress\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
+ ConvertAddress - 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
+ EFI_SUCCESS - The pointer pointed to by Address was modified.\r
+ EFI_NOT_FOUND - The pointer pointed to by Address was not found to be part\r
+ of the current memory map. This is normally fatal.\r
+ EFI_INVALID_PARAMETER - One of the parameters has an invalid value.\r
+\r
+--*/\r
+;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+RuntimeDriverSetVirtualAddressMap (\r
+ IN UINTN MemoryMapSize,\r
+ IN UINTN DescriptorSize,\r
+ IN UINT32 DescriptorVersion,\r
+ IN EFI_MEMORY_DESCRIPTOR *VirtualMap\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+ Changes the runtime addressing mode of EFI firmware from physical to virtual.\r
+\r
+Arguments:\r
+ \r
+ MemoryMapSize - The size in bytes of VirtualMap.\r
+ DescriptorSize - The size in bytes of an entry in the VirtualMap.\r
+ DescriptorVersion - The version of the structure entries in VirtualMap.\r
+ VirtualMap - An array of memory descriptors which contain new virtual\r
+ address mapping information for all runtime ranges.\r
+\r
+Returns:\r
+\r
+ EFI_SUCCESS - The virtual address map has been applied.\r
+ EFI_UNSUPPORTED - EFI firmware is not at runtime, or the EFI firmware is already in\r
+ virtual address mapped mode.\r
+ EFI_INVALID_PARAMETER - DescriptorSize or DescriptorVersion is invalid.\r
+ EFI_NO_MAPPING - A virtual address was not supplied for a range in the memory\r
+ map that requires a mapping.\r
+ EFI_NOT_FOUND - A virtual address was supplied for an address that is not found\r
+ in the memory map.\r
+\r
+--*/\r
+;\r
+\r
+VOID\r
+RuntimeDriverInitializeCrc32Table (\r
+ VOID\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+ Initialize CRC32 table.\r
+\r
+Arguments:\r
+\r
+ None.\r
+\r
+Returns:\r
+\r
+ None.\r
+\r
+--*/\r
+;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+RuntimeDriverInitialize (\r
+ IN EFI_HANDLE ImageHandle,\r
+ IN EFI_SYSTEM_TABLE *SystemTable\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+ Install Runtime AP. This code includes the EfiRuntimeLib, but it only \r
+ functions at RT in physical mode. \r
+\r
+Arguments:\r
+ \r
+ ImageHandle - Image handle of this driver.\r
+ SystemTable - Pointer to the EFI System Table.\r
+\r
+Returns:\r
+\r
+ EFI_SUCEESS - Runtime Driver Architectural Protocol installed.\r
+\r
+--*/\r
+;\r
+\r
+#endif\r