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