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