summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/RuntimeDxe/Runtime.h
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-07-19 08:36:30 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-07-19 08:36:30 +0000
commitf2abdc918bc19de53fe612458bf6c26298b65c1c (patch)
treea35b90b4361d38d8c76f916aec600f841b1ed04f /MdeModulePkg/Core/RuntimeDxe/Runtime.h
parent656a2b89074e6b88410e734ec6377d3975789cb3 (diff)
downloadedk2-platforms-f2abdc918bc19de53fe612458bf6c26298b65c1c.tar.xz
Move RuntimeDxe to /Core of MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3363 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/RuntimeDxe/Runtime.h')
-rw-r--r--MdeModulePkg/Core/RuntimeDxe/Runtime.h184
1 files changed, 184 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/RuntimeDxe/Runtime.h b/MdeModulePkg/Core/RuntimeDxe/Runtime.h
new file mode 100644
index 0000000000..7154b53cdf
--- /dev/null
+++ b/MdeModulePkg/Core/RuntimeDxe/Runtime.h
@@ -0,0 +1,184 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Runtime.h
+
+Abstract:
+
+ Runtime Architectural Protocol as defined in the DXE CIS
+
+ This code is used to produce the EFI runtime architectural protocol.
+
+--*/
+
+#ifndef _RUNTIME_H_
+#define _RUNTIME_H_
+
+#include <PiDxe.h>
+#include <Protocol/LoadedImage.h>
+#include <Protocol/Runtime.h>
+#include <Protocol/UgaIo.h>
+#include <Library/BaseLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/DebugLib.h>
+#include <Library/ReportStatusCodeLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/UefiRuntimeServicesTableLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/CacheMaintenanceLib.h>
+#include <Library/PeCoffLib.h>
+#include <Library/PcdLib.h>
+
+
+//
+// Function Prototypes
+//
+EFI_STATUS
+EFIAPI
+RuntimeDriverCalculateCrc32 (
+ IN VOID *Data,
+ IN UINTN DataSize,
+ OUT UINT32 *CrcOut
+ )
+/*++
+
+Routine Description:
+
+ Calculate CRC32 for target data
+
+Arguments:
+
+ Data - The target data.
+ DataSize - The target data size.
+ CrcOut - The CRC32 for target data.
+
+Returns:
+
+ EFI_SUCCESS - The CRC32 for target data is calculated successfully.
+ EFI_INVALID_PARAMETER - Some parameter is not valid, so the CRC32 is not
+ calculated.
+
+--*/
+;
+
+EFI_STATUS
+EFIAPI
+RuntimeDriverConvertPointer (
+ IN UINTN DebugDisposition,
+ IN OUT VOID **ConvertAddress
+ )
+/*++
+
+Routine Description:
+
+ Determines the new virtual address that is to be used on subsequent memory accesses.
+
+Arguments:
+
+ DebugDisposition - Supplies type information for the pointer being converted.
+ ConvertAddress - A pointer to a pointer that is to be fixed to be the value needed
+ for the new virtual address mappings being applied.
+
+Returns:
+
+ EFI_SUCCESS - The pointer pointed to by Address was modified.
+ EFI_NOT_FOUND - The pointer pointed to by Address was not found to be part
+ of the current memory map. This is normally fatal.
+ EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
+
+--*/
+;
+
+EFI_STATUS
+EFIAPI
+RuntimeDriverSetVirtualAddressMap (
+ IN UINTN MemoryMapSize,
+ IN UINTN DescriptorSize,
+ IN UINT32 DescriptorVersion,
+ IN EFI_MEMORY_DESCRIPTOR *VirtualMap
+ )
+/*++
+
+Routine Description:
+
+ Changes the runtime addressing mode of EFI firmware from physical to virtual.
+
+Arguments:
+
+ MemoryMapSize - The size in bytes of VirtualMap.
+ DescriptorSize - The size in bytes of an entry in the VirtualMap.
+ DescriptorVersion - The version of the structure entries in VirtualMap.
+ VirtualMap - An array of memory descriptors which contain new virtual
+ address mapping information for all runtime ranges.
+
+Returns:
+
+ EFI_SUCCESS - The virtual address map has been applied.
+ EFI_UNSUPPORTED - EFI firmware is not at runtime, or the EFI firmware is already in
+ virtual address mapped mode.
+ EFI_INVALID_PARAMETER - DescriptorSize or DescriptorVersion is invalid.
+ EFI_NO_MAPPING - A virtual address was not supplied for a range in the memory
+ map that requires a mapping.
+ EFI_NOT_FOUND - A virtual address was supplied for an address that is not found
+ in the memory map.
+
+--*/
+;
+
+VOID
+RuntimeDriverInitializeCrc32Table (
+ VOID
+ )
+/*++
+
+Routine Description:
+
+ Initialize CRC32 table.
+
+Arguments:
+
+ None.
+
+Returns:
+
+ None.
+
+--*/
+;
+
+EFI_STATUS
+EFIAPI
+RuntimeDriverInitialize (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+/*++
+
+Routine Description:
+
+ Install Runtime AP. This code includes the EfiRuntimeLib, but it only
+ functions at RT in physical mode.
+
+Arguments:
+
+ ImageHandle - Image handle of this driver.
+ SystemTable - Pointer to the EFI System Table.
+
+Returns:
+
+ EFI_SUCEESS - Runtime Driver Architectural Protocol installed.
+
+--*/
+;
+
+#endif