]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Core/RuntimeDxe/Runtime.h
Clean up DEC files:
[mirror_edk2.git] / MdeModulePkg / Core / RuntimeDxe / Runtime.h
CommitLineData
fb0b259e 1/** @file\r
2 Runtime Architectural Protocol as defined in the DXE CIS.\r
f2abdc91 3\r
9920ae74 4 This code is used to produce the EFI runtime architectural protocol.\r
5\r
cd5ebaa0
HT
6Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
7This program and the accompanying materials\r
62409219 8are licensed and made available under the terms and conditions of the BSD License\r
9which accompanies this distribution. The full text of the license may be found at\r
10http://opensource.org/licenses/bsd-license.php\r
fb0b259e 11\r
62409219 12THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
f2abdc91 14\r
fb0b259e 15**/\r
f2abdc91 16\r
17#ifndef _RUNTIME_H_\r
18#define _RUNTIME_H_\r
19\r
17c62eb6 20#include <PiDxe.h>\r
f2abdc91 21#include <Protocol/LoadedImage.h>\r
22#include <Protocol/Runtime.h>\r
f2abdc91 23#include <Library/BaseLib.h>\r
24#include <Library/UefiDriverEntryPoint.h>\r
25#include <Library/DebugLib.h>\r
26#include <Library/ReportStatusCodeLib.h>\r
f2abdc91 27#include <Library/UefiRuntimeServicesTableLib.h>\r
28#include <Library/UefiBootServicesTableLib.h>\r
857c8410 29#include <Library/UefiLib.h>\r
f2abdc91 30#include <Library/CacheMaintenanceLib.h>\r
31#include <Library/PeCoffLib.h>\r
f2abdc91 32\r
33\r
34//\r
35// Function Prototypes\r
36//\r
9fc78752 37/**\r
9920ae74 38 Calculate CRC32 for target data.\r
9fc78752 39\r
40 @param Data The target data.\r
41 @param DataSize The target data size.\r
42 @param CrcOut The CRC32 for target data.\r
43\r
44 @retval EFI_SUCCESS The CRC32 for target data is calculated successfully.\r
45 @retval EFI_INVALID_PARAMETER Some parameter is not valid, so the CRC32 is not\r
46 calculated.\r
47\r
48**/\r
f2abdc91 49EFI_STATUS\r
50EFIAPI\r
51RuntimeDriverCalculateCrc32 (\r
52 IN VOID *Data,\r
53 IN UINTN DataSize,\r
54 OUT UINT32 *CrcOut\r
ed66e1bc 55 );\r
f2abdc91 56\r
9fc78752 57/**\r
9fc78752 58 Determines the new virtual address that is to be used on subsequent memory accesses.\r
f2abdc91 59\r
f2abdc91 60\r
9fc78752 61 @param DebugDisposition Supplies type information for the pointer being converted.\r
62 @param ConvertAddress A pointer to a pointer that is to be fixed to be the value needed\r
63 for the new virtual address mappings being applied.\r
f2abdc91 64\r
9fc78752 65 @retval EFI_SUCCESS The pointer pointed to by Address was modified.\r
66 @retval EFI_NOT_FOUND The pointer pointed to by Address was not found to be part\r
67 of the current memory map. This is normally fatal.\r
68 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
f2abdc91 69\r
9fc78752 70**/\r
f2abdc91 71EFI_STATUS\r
72EFIAPI\r
73RuntimeDriverConvertPointer (\r
74 IN UINTN DebugDisposition,\r
75 IN OUT VOID **ConvertAddress\r
ed66e1bc 76 );\r
f2abdc91 77\r
9fc78752 78/**\r
9fc78752 79 Changes the runtime addressing mode of EFI firmware from physical to virtual.\r
f2abdc91 80\r
9920ae74 81 @param MemoryMapSize The size in bytes of VirtualMap.\r
82 @param DescriptorSize The size in bytes of an entry in the VirtualMap.\r
83 @param DescriptorVersion The version of the structure entries in VirtualMap.\r
84 @param VirtualMap An array of memory descriptors which contain new virtual\r
9fc78752 85 address mapping information for all runtime ranges.\r
f2abdc91 86\r
9fc78752 87 @retval EFI_SUCCESS The virtual address map has been applied.\r
88 @retval EFI_UNSUPPORTED EFI firmware is not at runtime, or the EFI firmware is already in\r
89 virtual address mapped mode.\r
90 @retval EFI_INVALID_PARAMETER DescriptorSize or DescriptorVersion is invalid.\r
91 @retval EFI_NO_MAPPING A virtual address was not supplied for a range in the memory\r
92 map that requires a mapping.\r
93 @retval EFI_NOT_FOUND A virtual address was supplied for an address that is not found\r
94 in the memory map.\r
f2abdc91 95\r
9fc78752 96**/\r
f2abdc91 97EFI_STATUS\r
98EFIAPI\r
99RuntimeDriverSetVirtualAddressMap (\r
100 IN UINTN MemoryMapSize,\r
101 IN UINTN DescriptorSize,\r
102 IN UINT32 DescriptorVersion,\r
103 IN EFI_MEMORY_DESCRIPTOR *VirtualMap\r
ed66e1bc 104 );\r
f2abdc91 105\r
9fc78752 106/**\r
9fc78752 107 Initialize CRC32 table.\r
f2abdc91 108\r
9fc78752 109**/\r
f2abdc91 110VOID\r
111RuntimeDriverInitializeCrc32Table (\r
112 VOID\r
ed66e1bc 113 );\r
f2abdc91 114\r
9fc78752 115/**\r
9fc78752 116 Install Runtime AP. This code includes the EfiRuntimeLib, but it only\r
117 functions at RT in physical mode.\r
f2abdc91 118\r
9920ae74 119 @param ImageHandle Image handle of this driver.\r
120 @param SystemTable Pointer to the EFI System Table.\r
f2abdc91 121\r
9920ae74 122 @retval EFI_SUCEESS Runtime Driver Architectural Protocol Installed\r
123 @return Other value if gBS->InstallMultipleProtocolInterfaces fails. Check\r
9fc78752 124 gBS->InstallMultipleProtocolInterfaces for details.\r
f2abdc91 125\r
9fc78752 126**/\r
f2abdc91 127EFI_STATUS\r
128EFIAPI\r
129RuntimeDriverInitialize (\r
130 IN EFI_HANDLE ImageHandle,\r
131 IN EFI_SYSTEM_TABLE *SystemTable\r
ed66e1bc 132 );\r
f2abdc91 133\r
134#endif\r