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