]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.h
Merge R8->R9 tracker 5935 and 7080 to update runtime arch protocol to DxeCis 0.91...
[mirror_edk2.git] / EdkModulePkg / Universal / Runtime / 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 //
28 // Function Prototypes
29 //
30 EFI_STATUS
31 EFIAPI
32 RuntimeDriverCalculateCrc32 (
33 IN VOID *Data,
34 IN UINTN DataSize,
35 OUT UINT32 *CrcOut
36 )
37 /*++
38
39 Routine Description:
40
41 Calculate CRC32 for target data
42
43 Arguments:
44
45 Data - The target data.
46 DataSize - The target data size.
47 CrcOut - The CRC32 for target data.
48
49 Returns:
50
51 EFI_SUCCESS - The CRC32 for target data is calculated successfully.
52 EFI_INVALID_PARAMETER - Some parameter is not valid, so the CRC32 is not
53 calculated.
54
55 --*/
56 ;
57
58 EFI_STATUS
59 EFIAPI
60 RuntimeDriverConvertPointer (
61 IN UINTN DebugDisposition,
62 IN OUT VOID **ConvertAddress
63 )
64 /*++
65
66 Routine Description:
67
68 Determines the new virtual address that is to be used on subsequent memory accesses.
69
70 Arguments:
71
72 DebugDisposition - Supplies type information for the pointer being converted.
73 ConvertAddress - A pointer to a pointer that is to be fixed to be the value needed
74 for the new virtual address mappings being applied.
75
76 Returns:
77
78 EFI_SUCCESS - The pointer pointed to by Address was modified.
79 EFI_NOT_FOUND - The pointer pointed to by Address was not found to be part
80 of the current memory map. This is normally fatal.
81 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
82
83 --*/
84 ;
85
86 EFI_STATUS
87 EFIAPI
88 RuntimeDriverSetVirtualAddressMap (
89 IN UINTN MemoryMapSize,
90 IN UINTN DescriptorSize,
91 IN UINT32 DescriptorVersion,
92 IN EFI_MEMORY_DESCRIPTOR *VirtualMap
93 )
94 /*++
95
96 Routine Description:
97
98 Changes the runtime addressing mode of EFI firmware from physical to virtual.
99
100 Arguments:
101
102 MemoryMapSize - The size in bytes of VirtualMap.
103 DescriptorSize - The size in bytes of an entry in the VirtualMap.
104 DescriptorVersion - The version of the structure entries in VirtualMap.
105 VirtualMap - An array of memory descriptors which contain new virtual
106 address mapping information for all runtime ranges.
107
108 Returns:
109
110 EFI_SUCCESS - The virtual address map has been applied.
111 EFI_UNSUPPORTED - EFI firmware is not at runtime, or the EFI firmware is already in
112 virtual address mapped mode.
113 EFI_INVALID_PARAMETER - DescriptorSize or DescriptorVersion is invalid.
114 EFI_NO_MAPPING - A virtual address was not supplied for a range in the memory
115 map that requires a mapping.
116 EFI_NOT_FOUND - A virtual address was supplied for an address that is not found
117 in the memory map.
118
119 --*/
120 ;
121
122 VOID
123 RuntimeDriverInitializeCrc32Table (
124 VOID
125 )
126 /*++
127
128 Routine Description:
129
130 Initialize CRC32 table.
131
132 Arguments:
133
134 None.
135
136 Returns:
137
138 None.
139
140 --*/
141 ;
142
143 EFI_STATUS
144 EFIAPI
145 RuntimeDriverInitialize (
146 IN EFI_HANDLE ImageHandle,
147 IN EFI_SYSTEM_TABLE *SystemTable
148 )
149 /*++
150
151 Routine Description:
152
153 Install Runtime AP. This code includes the EfiRuntimeLib, but it only
154 functions at RT in physical mode.
155
156 Arguments:
157
158 ImageHandle - Image handle of this driver.
159 SystemTable - Pointer to the EFI System Table.
160
161 Returns:
162
163 EFI_SUCEESS - Runtime Driver Architectural Protocol installed.
164
165 --*/
166 ;
167
168 #endif