Rev 2726 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2726 | Rev 3386 | ||
---|---|---|---|
1 | #ifndef _EFI_API_H |
1 | #ifndef _EFI_API_H |
2 | #define _EFI_API_H |
2 | #define _EFI_API_H |
3 | 3 | ||
4 | /*++ |
4 | /*++ |
5 | 5 | ||
6 | Copyright (c) 1998 Intel Corporation |
6 | Copyright (c) 1998 Intel Corporation |
7 | 7 | ||
8 | Module Name: |
8 | Module Name: |
9 | 9 | ||
10 | efiapi.h |
10 | efiapi.h |
11 | 11 | ||
12 | Abstract: |
12 | Abstract: |
13 | 13 | ||
14 | Global EFI runtime & boot service interfaces |
14 | Global EFI runtime & boot service interfaces |
15 | 15 | ||
16 | 16 | ||
17 | 17 | ||
18 | 18 | ||
19 | Revision History |
19 | Revision History |
20 | 20 | ||
21 | --*/ |
21 | --*/ |
22 | 22 | ||
23 | // |
23 | // |
24 | // EFI Specification Revision |
24 | // EFI Specification Revision |
25 | // |
25 | // |
26 | 26 | ||
27 | #define EFI_SPECIFICATION_MAJOR_REVISION 1 |
27 | #define EFI_SPECIFICATION_MAJOR_REVISION 1 |
28 | #define EFI_SPECIFICATION_MINOR_REVISION 02 |
28 | #define EFI_SPECIFICATION_MINOR_REVISION 02 |
29 | 29 | ||
30 | // |
30 | // |
31 | // Declare forward referenced data structures |
31 | // Declare forward referenced data structures |
32 | // |
32 | // |
33 | 33 | ||
34 | INTERFACE_DECL(_EFI_SYSTEM_TABLE); |
34 | INTERFACE_DECL(_EFI_SYSTEM_TABLE); |
35 | 35 | ||
36 | // |
36 | // |
37 | // EFI Memory |
37 | // EFI Memory |
38 | // |
38 | // |
39 | 39 | ||
40 | typedef |
40 | typedef |
41 | EFI_STATUS |
41 | EFI_STATUS |
42 | (EFIAPI *EFI_ALLOCATE_PAGES) ( |
42 | (EFIAPI *EFI_ALLOCATE_PAGES) ( |
43 | IN EFI_ALLOCATE_TYPE Type, |
43 | IN EFI_ALLOCATE_TYPE Type, |
44 | IN EFI_MEMORY_TYPE MemoryType, |
44 | IN EFI_MEMORY_TYPE MemoryType, |
45 | IN UINTN NoPages, |
45 | IN UINTN NoPages, |
46 | OUT EFI_PHYSICAL_ADDRESS *Memory |
46 | OUT EFI_PHYSICAL_ADDRESS *Memory |
47 | ); |
47 | ); |
48 | 48 | ||
49 | typedef |
49 | typedef |
50 | EFI_STATUS |
50 | EFI_STATUS |
51 | (EFIAPI *EFI_FREE_PAGES) ( |
51 | (EFIAPI *EFI_FREE_PAGES) ( |
52 | IN EFI_PHYSICAL_ADDRESS Memory, |
52 | IN EFI_PHYSICAL_ADDRESS Memory, |
53 | IN UINTN NoPages |
53 | IN UINTN NoPages |
54 | ); |
54 | ); |
55 | 55 | ||
56 | typedef |
56 | typedef |
57 | EFI_STATUS |
57 | EFI_STATUS |
58 | (EFIAPI *EFI_GET_MEMORY_MAP) ( |
58 | (EFIAPI *EFI_GET_MEMORY_MAP) ( |
59 | IN OUT UINTN *MemoryMapSize, |
59 | IN OUT UINTN *MemoryMapSize, |
60 | IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, |
60 | IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, |
61 | OUT UINTN *MapKey, |
61 | OUT UINTN *MapKey, |
62 | OUT UINTN *DescriptorSize, |
62 | OUT UINTN *DescriptorSize, |
63 | OUT UINT32 *DescriptorVersion |
63 | OUT UINT32 *DescriptorVersion |
64 | ); |
64 | ); |
65 | 65 | ||
66 | #define NextMemoryDescriptor(Ptr,Size) ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) Ptr) + Size)) |
66 | #define NextMemoryDescriptor(Ptr,Size) ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) Ptr) + Size)) |
67 | 67 | ||
68 | 68 | ||
69 | typedef |
69 | typedef |
70 | EFI_STATUS |
70 | EFI_STATUS |
71 | (EFIAPI *EFI_ALLOCATE_POOL) ( |
71 | (EFIAPI *EFI_ALLOCATE_POOL) ( |
72 | IN EFI_MEMORY_TYPE PoolType, |
72 | IN EFI_MEMORY_TYPE PoolType, |
73 | IN UINTN Size, |
73 | IN UINTN Size, |
74 | OUT VOID **Buffer |
74 | OUT VOID **Buffer |
75 | ); |
75 | ); |
76 | 76 | ||
77 | typedef |
77 | typedef |
78 | EFI_STATUS |
78 | EFI_STATUS |
79 | (EFIAPI *EFI_FREE_POOL) ( |
79 | (EFIAPI *EFI_FREE_POOL) ( |
80 | IN VOID *Buffer |
80 | IN VOID *Buffer |
81 | ); |
81 | ); |
82 | 82 | ||
83 | typedef |
83 | typedef |
84 | EFI_STATUS |
84 | EFI_STATUS |
85 | (EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) ( |
85 | (EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) ( |
86 | IN UINTN MemoryMapSize, |
86 | IN UINTN MemoryMapSize, |
87 | IN UINTN DescriptorSize, |
87 | IN UINTN DescriptorSize, |
88 | IN UINT32 DescriptorVersion, |
88 | IN UINT32 DescriptorVersion, |
89 | IN EFI_MEMORY_DESCRIPTOR *VirtualMap |
89 | IN EFI_MEMORY_DESCRIPTOR *VirtualMap |
90 | ); |
90 | ); |
91 | 91 | ||
92 | 92 | ||
93 | #define EFI_OPTIONAL_PTR 0x00000001 |
93 | #define EFI_OPTIONAL_PTR 0x00000001 |
94 | #define EFI_INTERNAL_FNC 0x00000002 // Pointer to internal runtime fnc |
94 | #define EFI_INTERNAL_FNC 0x00000002 // Pointer to internal runtime fnc |
95 | #define EFI_INTERNAL_PTR 0x00000004 // Pointer to internal runtime data |
95 | #define EFI_INTERNAL_PTR 0x00000004 // Pointer to internal runtime data |
96 | 96 | ||
97 | 97 | ||
98 | typedef |
98 | typedef |
99 | EFI_STATUS |
99 | EFI_STATUS |
100 | (EFIAPI *EFI_CONVERT_POINTER) ( |
100 | (EFIAPI *EFI_CONVERT_POINTER) ( |
101 | IN UINTN DebugDisposition, |
101 | IN UINTN DebugDisposition, |
102 | IN OUT VOID **Address |
102 | IN OUT VOID **Address |
103 | ); |
103 | ); |
104 | 104 | ||
105 | 105 | ||
106 | // |
106 | // |
107 | // EFI Events |
107 | // EFI Events |
108 | // |
108 | // |
109 | 109 | ||
110 | 110 | ||
111 | 111 | ||
112 | #define EVT_TIMER 0x80000000 |
112 | #define EVT_TIMER 0x80000000 |
113 | #define EVT_RUNTIME 0x40000000 |
113 | #define EVT_RUNTIME 0x40000000 |
114 | #define EVT_RUNTIME_CONTEXT 0x20000000 |
114 | #define EVT_RUNTIME_CONTEXT 0x20000000 |
115 | 115 | ||
116 | #define EVT_NOTIFY_WAIT 0x00000100 |
116 | #define EVT_NOTIFY_WAIT 0x00000100 |
117 | #define EVT_NOTIFY_SIGNAL 0x00000200 |
117 | #define EVT_NOTIFY_SIGNAL 0x00000200 |
118 | 118 | ||
119 | #define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201 |
119 | #define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201 |
120 | #define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202 |
120 | #define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202 |
121 | 121 | ||
122 | #define EVT_EFI_SIGNAL_MASK 0x000000FF |
122 | #define EVT_EFI_SIGNAL_MASK 0x000000FF |
123 | #define EVT_EFI_SIGNAL_MAX 2 |
123 | #define EVT_EFI_SIGNAL_MAX 2 |
124 | 124 | ||
125 | typedef |
125 | typedef |
126 | VOID |
126 | VOID |
127 | (EFIAPI *EFI_EVENT_NOTIFY) ( |
127 | (EFIAPI *EFI_EVENT_NOTIFY) ( |
128 | IN EFI_EVENT Event, |
128 | IN EFI_EVENT Event, |
129 | IN VOID *Context |
129 | IN VOID *Context |
130 | ); |
130 | ); |
131 | 131 | ||
132 | typedef |
132 | typedef |
133 | EFI_STATUS |
133 | EFI_STATUS |
134 | (EFIAPI *EFI_CREATE_EVENT) ( |
134 | (EFIAPI *EFI_CREATE_EVENT) ( |
135 | IN UINT32 Type, |
135 | IN UINT32 Type, |
136 | IN EFI_TPL NotifyTpl, |
136 | IN EFI_TPL NotifyTpl, |
137 | IN EFI_EVENT_NOTIFY NotifyFunction, |
137 | IN EFI_EVENT_NOTIFY NotifyFunction, |
138 | IN VOID *NotifyContext, |
138 | IN VOID *NotifyContext, |
139 | OUT EFI_EVENT *Event |
139 | OUT EFI_EVENT *Event |
140 | ); |
140 | ); |
141 | 141 | ||
142 | typedef enum { |
142 | typedef enum { |
143 | TimerCancel, |
143 | TimerCancel, |
144 | TimerPeriodic, |
144 | TimerPeriodic, |
145 | TimerRelative, |
145 | TimerRelative, |
146 | TimerTypeMax |
146 | TimerTypeMax |
147 | } EFI_TIMER_DELAY; |
147 | } EFI_TIMER_DELAY; |
148 | 148 | ||
149 | typedef |
149 | typedef |
150 | EFI_STATUS |
150 | EFI_STATUS |
151 | (EFIAPI *EFI_SET_TIMER) ( |
151 | (EFIAPI *EFI_SET_TIMER) ( |
152 | IN EFI_EVENT Event, |
152 | IN EFI_EVENT Event, |
153 | IN EFI_TIMER_DELAY Type, |
153 | IN EFI_TIMER_DELAY Type, |
154 | IN UINT64 TriggerTime |
154 | IN UINT64 TriggerTime |
155 | ); |
155 | ); |
156 | 156 | ||
157 | typedef |
157 | typedef |
158 | EFI_STATUS |
158 | EFI_STATUS |
159 | (EFIAPI *EFI_SIGNAL_EVENT) ( |
159 | (EFIAPI *EFI_SIGNAL_EVENT) ( |
160 | IN EFI_EVENT Event |
160 | IN EFI_EVENT Event |
161 | ); |
161 | ); |
162 | 162 | ||
163 | typedef |
163 | typedef |
164 | EFI_STATUS |
164 | EFI_STATUS |
165 | (EFIAPI *EFI_WAIT_FOR_EVENT) ( |
165 | (EFIAPI *EFI_WAIT_FOR_EVENT) ( |
166 | IN UINTN NumberOfEvents, |
166 | IN UINTN NumberOfEvents, |
167 | IN EFI_EVENT *Event, |
167 | IN EFI_EVENT *Event, |
168 | OUT UINTN *Index |
168 | OUT UINTN *Index |
169 | ); |
169 | ); |
170 | 170 | ||
171 | typedef |
171 | typedef |
172 | EFI_STATUS |
172 | EFI_STATUS |
173 | (EFIAPI *EFI_CLOSE_EVENT) ( |
173 | (EFIAPI *EFI_CLOSE_EVENT) ( |
174 | IN EFI_EVENT Event |
174 | IN EFI_EVENT Event |
175 | ); |
175 | ); |
176 | 176 | ||
177 | typedef |
177 | typedef |
178 | EFI_STATUS |
178 | EFI_STATUS |
179 | (EFIAPI *EFI_CHECK_EVENT) ( |
179 | (EFIAPI *EFI_CHECK_EVENT) ( |
180 | IN EFI_EVENT Event |
180 | IN EFI_EVENT Event |
181 | ); |
181 | ); |
182 | 182 | ||
183 | // |
183 | // |
184 | // Task priority level |
184 | // Task priority level |
185 | // |
185 | // |
186 | 186 | ||
187 | #define TPL_APPLICATION 4 |
187 | #define TPL_APPLICATION 4 |
188 | #define TPL_CALLBACK 8 |
188 | #define TPL_CALLBACK 8 |
189 | #define TPL_NOTIFY 16 |
189 | #define TPL_NOTIFY 16 |
190 | #define TPL_HIGH_LEVEL 31 |
190 | #define TPL_HIGH_LEVEL 31 |
191 | 191 | ||
192 | typedef |
192 | typedef |
193 | EFI_TPL |
193 | EFI_TPL |
194 | (EFIAPI *EFI_RAISE_TPL) ( |
194 | (EFIAPI *EFI_RAISE_TPL) ( |
195 | IN EFI_TPL NewTpl |
195 | IN EFI_TPL NewTpl |
196 | ); |
196 | ); |
197 | 197 | ||
198 | typedef |
198 | typedef |
199 | VOID |
199 | VOID |
200 | (EFIAPI *EFI_RESTORE_TPL) ( |
200 | (EFIAPI *EFI_RESTORE_TPL) ( |
201 | IN EFI_TPL OldTpl |
201 | IN EFI_TPL OldTpl |
202 | ); |
202 | ); |
203 | 203 | ||
204 | 204 | ||
205 | // |
205 | // |
206 | // EFI platform varibles |
206 | // EFI platform varibles |
207 | // |
207 | // |
208 | 208 | ||
209 | #define EFI_GLOBAL_VARIABLE \ |
209 | #define EFI_GLOBAL_VARIABLE \ |
210 | { 0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} } |
210 | { 0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} } |
211 | 211 | ||
212 | // Variable attributes |
212 | // Variable attributes |
213 | #define EFI_VARIABLE_NON_VOLATILE 0x00000001 |
213 | #define EFI_VARIABLE_NON_VOLATILE 0x00000001 |
214 | #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 |
214 | #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 |
215 | #define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 |
215 | #define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 |
216 | 216 | ||
217 | // Variable size limitation |
217 | // Variable size limitation |
218 | #define EFI_MAXIMUM_VARIABLE_SIZE 1024 |
218 | #define EFI_MAXIMUM_VARIABLE_SIZE 1024 |
219 | 219 | ||
220 | typedef |
220 | typedef |
221 | EFI_STATUS |
221 | EFI_STATUS |
222 | (EFIAPI *EFI_GET_VARIABLE) ( |
222 | (EFIAPI *EFI_GET_VARIABLE) ( |
223 | IN CHAR16 *VariableName, |
223 | IN CHAR16 *VariableName, |
224 | IN EFI_GUID *VendorGuid, |
224 | IN EFI_GUID *VendorGuid, |
225 | OUT UINT32 *Attributes OPTIONAL, |
225 | OUT UINT32 *Attributes OPTIONAL, |
226 | IN OUT UINTN *DataSize, |
226 | IN OUT UINTN *DataSize, |
227 | OUT VOID *Data |
227 | OUT VOID *Data |
228 | ); |
228 | ); |
229 | 229 | ||
230 | typedef |
230 | typedef |
231 | EFI_STATUS |
231 | EFI_STATUS |
232 | (EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) ( |
232 | (EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) ( |
233 | IN OUT UINTN *VariableNameSize, |
233 | IN OUT UINTN *VariableNameSize, |
234 | IN OUT CHAR16 *VariableName, |
234 | IN OUT CHAR16 *VariableName, |
235 | IN OUT EFI_GUID *VendorGuid |
235 | IN OUT EFI_GUID *VendorGuid |
236 | ); |
236 | ); |
237 | 237 | ||
238 | 238 | ||
239 | typedef |
239 | typedef |
240 | EFI_STATUS |
240 | EFI_STATUS |
241 | (EFIAPI *EFI_SET_VARIABLE) ( |
241 | (EFIAPI *EFI_SET_VARIABLE) ( |
242 | IN CHAR16 *VariableName, |
242 | IN CHAR16 *VariableName, |
243 | IN EFI_GUID *VendorGuid, |
243 | IN EFI_GUID *VendorGuid, |
244 | IN UINT32 Attributes, |
244 | IN UINT32 Attributes, |
245 | IN UINTN DataSize, |
245 | IN UINTN DataSize, |
246 | IN VOID *Data |
246 | IN VOID *Data |
247 | ); |
247 | ); |
248 | 248 | ||
249 | 249 | ||
250 | // |
250 | // |
251 | // EFI Time |
251 | // EFI Time |
252 | // |
252 | // |
253 | 253 | ||
254 | typedef struct { |
254 | typedef struct { |
255 | UINT32 Resolution; // 1e-6 parts per million |
255 | UINT32 Resolution; // 1e-6 parts per million |
256 | UINT32 Accuracy; // hertz |
256 | UINT32 Accuracy; // hertz |
257 | BOOLEAN SetsToZero; // Set clears sub-second time |
257 | BOOLEAN SetsToZero; // Set clears sub-second time |
258 | } EFI_TIME_CAPABILITIES; |
258 | } EFI_TIME_CAPABILITIES; |
259 | 259 | ||
260 | 260 | ||
261 | typedef |
261 | typedef |
262 | EFI_STATUS |
262 | EFI_STATUS |
263 | (EFIAPI *EFI_GET_TIME) ( |
263 | (EFIAPI *EFI_GET_TIME) ( |
264 | OUT EFI_TIME *Time, |
264 | OUT EFI_TIME *Time, |
265 | OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL |
265 | OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL |
266 | ); |
266 | ); |
267 | 267 | ||
268 | typedef |
268 | typedef |
269 | EFI_STATUS |
269 | EFI_STATUS |
270 | (EFIAPI *EFI_SET_TIME) ( |
270 | (EFIAPI *EFI_SET_TIME) ( |
271 | IN EFI_TIME *Time |
271 | IN EFI_TIME *Time |
272 | ); |
272 | ); |
273 | 273 | ||
274 | typedef |
274 | typedef |
275 | EFI_STATUS |
275 | EFI_STATUS |
276 | (EFIAPI *EFI_GET_WAKEUP_TIME) ( |
276 | (EFIAPI *EFI_GET_WAKEUP_TIME) ( |
277 | OUT BOOLEAN *Enabled, |
277 | OUT BOOLEAN *Enabled, |
278 | OUT BOOLEAN *Pending, |
278 | OUT BOOLEAN *Pending, |
279 | OUT EFI_TIME *Time |
279 | OUT EFI_TIME *Time |
280 | ); |
280 | ); |
281 | 281 | ||
282 | typedef |
282 | typedef |
283 | EFI_STATUS |
283 | EFI_STATUS |
284 | (EFIAPI *EFI_SET_WAKEUP_TIME) ( |
284 | (EFIAPI *EFI_SET_WAKEUP_TIME) ( |
285 | IN BOOLEAN Enable, |
285 | IN BOOLEAN Enable, |
286 | IN EFI_TIME *Time OPTIONAL |
286 | IN EFI_TIME *Time OPTIONAL |
287 | ); |
287 | ); |
288 | 288 | ||
289 | 289 | ||
290 | // |
290 | // |
291 | // Image functions |
291 | // Image functions |
292 | // |
292 | // |
293 | 293 | ||
294 | 294 | ||
295 | // PE32+ Subsystem type for EFI images |
295 | // PE32+ Subsystem type for EFI images |
296 | 296 | ||
297 | #if !defined(IMAGE_SUBSYSTEM_EFI_APPLICATION) |
297 | #if !defined(IMAGE_SUBSYSTEM_EFI_APPLICATION) |
298 | #define IMAGE_SUBSYSTEM_EFI_APPLICATION 10 |
298 | #define IMAGE_SUBSYSTEM_EFI_APPLICATION 10 |
299 | #define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11 |
299 | #define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11 |
300 | #define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12 |
300 | #define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12 |
301 | #endif |
301 | #endif |
302 | 302 | ||
303 | // PE32+ Machine type for EFI images |
303 | // PE32+ Machine type for EFI images |
304 | 304 | ||
305 | #if !defined(EFI_IMAGE_MACHINE_IA32) |
305 | #if !defined(EFI_IMAGE_MACHINE_IA32) |
306 | #define EFI_IMAGE_MACHINE_IA32 0x014c |
306 | #define EFI_IMAGE_MACHINE_IA32 0x014c |
307 | #endif |
307 | #endif |
308 | 308 | ||
309 | #if !defined(EFI_IMAGE_MACHINE_IA64) |
309 | #if !defined(EFI_IMAGE_MACHINE_IA64) |
310 | #define EFI_IMAGE_MACHINE_IA64 0x0200 |
310 | #define EFI_IMAGE_MACHINE_IA64 0x0200 |
311 | #endif |
311 | #endif |
312 | 312 | ||
313 | // Image Entry prototype |
313 | // Image Entry prototype |
314 | 314 | ||
315 | typedef |
315 | typedef |
316 | EFI_STATUS |
316 | EFI_STATUS |
317 | (EFIAPI *EFI_IMAGE_ENTRY_POINT) ( |
317 | (EFIAPI *EFI_IMAGE_ENTRY_POINT) ( |
318 | IN EFI_HANDLE ImageHandle, |
318 | IN EFI_HANDLE ImageHandle, |
319 | IN struct _EFI_SYSTEM_TABLE *SystemTable |
319 | IN struct _EFI_SYSTEM_TABLE *SystemTable |
320 | ); |
320 | ); |
321 | 321 | ||
322 | typedef |
322 | typedef |
323 | EFI_STATUS |
323 | EFI_STATUS |
324 | (EFIAPI *EFI_IMAGE_LOAD) ( |
324 | (EFIAPI *EFI_IMAGE_LOAD) ( |
325 | IN BOOLEAN BootPolicy, |
325 | IN BOOLEAN BootPolicy, |
326 | IN EFI_HANDLE ParentImageHandle, |
326 | IN EFI_HANDLE ParentImageHandle, |
327 | IN EFI_DEVICE_PATH *FilePath, |
327 | IN EFI_DEVICE_PATH *FilePath, |
328 | IN VOID *SourceBuffer OPTIONAL, |
328 | IN VOID *SourceBuffer OPTIONAL, |
329 | IN UINTN SourceSize, |
329 | IN UINTN SourceSize, |
330 | OUT EFI_HANDLE *ImageHandle |
330 | OUT EFI_HANDLE *ImageHandle |
331 | ); |
331 | ); |
332 | 332 | ||
333 | typedef |
333 | typedef |
334 | EFI_STATUS |
334 | EFI_STATUS |
335 | (EFIAPI *EFI_IMAGE_START) ( |
335 | (EFIAPI *EFI_IMAGE_START) ( |
336 | IN EFI_HANDLE ImageHandle, |
336 | IN EFI_HANDLE ImageHandle, |
337 | OUT UINTN *ExitDataSize, |
337 | OUT UINTN *ExitDataSize, |
338 | OUT CHAR16 **ExitData OPTIONAL |
338 | OUT CHAR16 **ExitData OPTIONAL |
339 | ); |
339 | ); |
340 | 340 | ||
341 | typedef |
341 | typedef |
342 | EFI_STATUS |
342 | EFI_STATUS |
343 | (EFIAPI *EFI_EXIT) ( |
343 | (EFIAPI *EFI_EXIT) ( |
344 | IN EFI_HANDLE ImageHandle, |
344 | IN EFI_HANDLE ImageHandle, |
345 | IN EFI_STATUS ExitStatus, |
345 | IN EFI_STATUS ExitStatus, |
346 | IN UINTN ExitDataSize, |
346 | IN UINTN ExitDataSize, |
347 | IN CHAR16 *ExitData OPTIONAL |
347 | IN CHAR16 *ExitData OPTIONAL |
348 | ); |
348 | ); |
349 | 349 | ||
350 | typedef |
350 | typedef |
351 | EFI_STATUS |
351 | EFI_STATUS |
352 | (EFIAPI *EFI_IMAGE_UNLOAD) ( |
352 | (EFIAPI *EFI_IMAGE_UNLOAD) ( |
353 | IN EFI_HANDLE ImageHandle |
353 | IN EFI_HANDLE ImageHandle |
354 | ); |
354 | ); |
355 | 355 | ||
356 | 356 | ||
357 | // Image handle |
357 | // Image handle |
358 | #define LOADED_IMAGE_PROTOCOL \ |
358 | #define LOADED_IMAGE_PROTOCOL \ |
359 | { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} } |
359 | { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} } |
360 | 360 | ||
361 | #define EFI_IMAGE_INFORMATION_REVISION 0x1000 |
361 | #define EFI_IMAGE_INFORMATION_REVISION 0x1000 |
362 | typedef struct { |
362 | typedef struct { |
363 | UINT32 Revision; |
363 | UINT32 Revision; |
364 | EFI_HANDLE ParentHandle; |
364 | EFI_HANDLE ParentHandle; |
365 | struct _EFI_SYSTEM_TABLE *SystemTable; |
365 | struct _EFI_SYSTEM_TABLE *SystemTable; |
366 | 366 | ||
367 | // Source location of image |
367 | // Source location of image |
368 | EFI_HANDLE DeviceHandle; |
368 | EFI_HANDLE DeviceHandle; |
369 | EFI_DEVICE_PATH *FilePath; |
369 | EFI_DEVICE_PATH *FilePath; |
370 | VOID *Reserved; |
370 | VOID *Reserved; |
371 | 371 | ||
372 | // Images load options |
372 | // Images load options |
373 | UINT32 LoadOptionsSize; |
373 | UINT32 LoadOptionsSize; |
374 | VOID *LoadOptions; |
374 | VOID *LoadOptions; |
375 | 375 | ||
376 | // Location of where image was loaded |
376 | // Location of where image was loaded |
377 | VOID *ImageBase; |
377 | VOID *ImageBase; |
378 | UINT64 ImageSize; |
378 | UINT64 ImageSize; |
379 | EFI_MEMORY_TYPE ImageCodeType; |
379 | EFI_MEMORY_TYPE ImageCodeType; |
380 | EFI_MEMORY_TYPE ImageDataType; |
380 | EFI_MEMORY_TYPE ImageDataType; |
381 | 381 | ||
382 | // If the driver image supports a dynamic unload request |
382 | // If the driver image supports a dynamic unload request |
383 | EFI_IMAGE_UNLOAD Unload; |
383 | EFI_IMAGE_UNLOAD Unload; |
384 | 384 | ||
385 | } EFI_LOADED_IMAGE; |
385 | } EFI_LOADED_IMAGE; |
386 | 386 | ||
387 | 387 | ||
388 | typedef |
388 | typedef |
389 | EFI_STATUS |
389 | EFI_STATUS |
390 | (EFIAPI *EFI_EXIT_BOOT_SERVICES) ( |
390 | (EFIAPI *EFI_EXIT_BOOT_SERVICES) ( |
391 | IN EFI_HANDLE ImageHandle, |
391 | IN EFI_HANDLE ImageHandle, |
392 | IN UINTN MapKey |
392 | IN UINTN MapKey |
393 | ); |
393 | ); |
394 | 394 | ||
395 | // |
395 | // |
396 | // Misc |
396 | // Misc |
397 | // |
397 | // |
398 | 398 | ||
399 | 399 | ||
400 | typedef |
400 | typedef |
401 | EFI_STATUS |
401 | EFI_STATUS |
402 | (EFIAPI *EFI_STALL) ( |
402 | (EFIAPI *EFI_STALL) ( |
403 | IN UINTN Microseconds |
403 | IN UINTN Microseconds |
404 | ); |
404 | ); |
405 | 405 | ||
406 | typedef |
406 | typedef |
407 | EFI_STATUS |
407 | EFI_STATUS |
408 | (EFIAPI *EFI_SET_WATCHDOG_TIMER) ( |
408 | (EFIAPI *EFI_SET_WATCHDOG_TIMER) ( |
409 | IN UINTN Timeout, |
409 | IN UINTN Timeout, |
410 | IN UINT64 WatchdogCode, |
410 | IN UINT64 WatchdogCode, |
411 | IN UINTN DataSize, |
411 | IN UINTN DataSize, |
412 | IN CHAR16 *WatchdogData OPTIONAL |
412 | IN CHAR16 *WatchdogData OPTIONAL |
413 | ); |
413 | ); |
414 | 414 | ||
415 | 415 | ||
416 | typedef enum { |
416 | typedef enum { |
417 | EfiResetCold, |
417 | EfiResetCold, |
418 | EfiResetWarm |
418 | EfiResetWarm |
419 | } EFI_RESET_TYPE; |
419 | } EFI_RESET_TYPE; |
420 | 420 | ||
421 | typedef |
421 | typedef |
422 | EFI_STATUS |
422 | EFI_STATUS |
423 | (EFIAPI *EFI_RESET_SYSTEM) ( |
423 | (EFIAPI *EFI_RESET_SYSTEM) ( |
424 | IN EFI_RESET_TYPE ResetType, |
424 | IN EFI_RESET_TYPE ResetType, |
425 | IN EFI_STATUS ResetStatus, |
425 | IN EFI_STATUS ResetStatus, |
426 | IN UINTN DataSize, |
426 | IN UINTN DataSize, |
427 | IN CHAR16 *ResetData OPTIONAL |
427 | IN CHAR16 *ResetData OPTIONAL |
428 | ); |
428 | ); |
429 | 429 | ||
430 | typedef |
430 | typedef |
431 | EFI_STATUS |
431 | EFI_STATUS |
432 | (EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT) ( |
432 | (EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT) ( |
433 | OUT UINT64 *Count |
433 | OUT UINT64 *Count |
434 | ); |
434 | ); |
435 | 435 | ||
436 | typedef |
436 | typedef |
437 | EFI_STATUS |
437 | EFI_STATUS |
438 | (EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) ( |
438 | (EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) ( |
439 | OUT UINT32 *HighCount |
439 | OUT UINT32 *HighCount |
440 | ); |
440 | ); |
441 | 441 | ||
442 | // |
442 | // |
443 | // Protocol handler functions |
443 | // Protocol handler functions |
444 | // |
444 | // |
445 | 445 | ||
446 | typedef enum { |
446 | typedef enum { |
447 | EFI_NATIVE_INTERFACE, |
447 | EFI_NATIVE_INTERFACE, |
448 | EFI_PCODE_INTERFACE |
448 | EFI_PCODE_INTERFACE |
449 | } EFI_INTERFACE_TYPE; |
449 | } EFI_INTERFACE_TYPE; |
450 | 450 | ||
451 | typedef |
451 | typedef |
452 | EFI_STATUS |
452 | EFI_STATUS |
453 | (EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE) ( |
453 | (EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE) ( |
454 | IN OUT EFI_HANDLE *Handle, |
454 | IN OUT EFI_HANDLE *Handle, |
455 | IN EFI_GUID *Protocol, |
455 | IN EFI_GUID *Protocol, |
456 | IN EFI_INTERFACE_TYPE InterfaceType, |
456 | IN EFI_INTERFACE_TYPE InterfaceType, |
457 | IN VOID *Interface |
457 | IN VOID *Interface |
458 | ); |
458 | ); |
459 | 459 | ||
460 | typedef |
460 | typedef |
461 | EFI_STATUS |
461 | EFI_STATUS |
462 | (EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE) ( |
462 | (EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE) ( |
463 | IN EFI_HANDLE Handle, |
463 | IN EFI_HANDLE Handle, |
464 | IN EFI_GUID *Protocol, |
464 | IN EFI_GUID *Protocol, |
465 | IN VOID *OldInterface, |
465 | IN VOID *OldInterface, |
466 | IN VOID *NewInterface |
466 | IN VOID *NewInterface |
467 | ); |
467 | ); |
468 | 468 | ||
469 | typedef |
469 | typedef |
470 | EFI_STATUS |
470 | EFI_STATUS |
471 | (EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE) ( |
471 | (EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE) ( |
472 | IN EFI_HANDLE Handle, |
472 | IN EFI_HANDLE Handle, |
473 | IN EFI_GUID *Protocol, |
473 | IN EFI_GUID *Protocol, |
474 | IN VOID *Interface |
474 | IN VOID *Interface |
475 | ); |
475 | ); |
476 | 476 | ||
477 | typedef |
477 | typedef |
478 | EFI_STATUS |
478 | EFI_STATUS |
479 | (EFIAPI *EFI_HANDLE_PROTOCOL) ( |
479 | (EFIAPI *EFI_HANDLE_PROTOCOL) ( |
480 | IN EFI_HANDLE Handle, |
480 | IN EFI_HANDLE Handle, |
481 | IN EFI_GUID *Protocol, |
481 | IN EFI_GUID *Protocol, |
482 | OUT VOID **Interface |
482 | OUT VOID **Interface |
483 | ); |
483 | ); |
484 | 484 | ||
485 | typedef |
485 | typedef |
486 | EFI_STATUS |
486 | EFI_STATUS |
487 | (EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY) ( |
487 | (EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY) ( |
488 | IN EFI_GUID *Protocol, |
488 | IN EFI_GUID *Protocol, |
489 | IN EFI_EVENT Event, |
489 | IN EFI_EVENT Event, |
490 | OUT VOID **Registration |
490 | OUT VOID **Registration |
491 | ); |
491 | ); |
492 | 492 | ||
493 | typedef enum { |
493 | typedef enum { |
494 | AllHandles, |
494 | AllHandles, |
495 | ByRegisterNotify, |
495 | ByRegisterNotify, |
496 | ByProtocol |
496 | ByProtocol |
497 | } EFI_LOCATE_SEARCH_TYPE; |
497 | } EFI_LOCATE_SEARCH_TYPE; |
498 | 498 | ||
499 | typedef |
499 | typedef |
500 | EFI_STATUS |
500 | EFI_STATUS |
501 | (EFIAPI *EFI_LOCATE_HANDLE) ( |
501 | (EFIAPI *EFI_LOCATE_HANDLE) ( |
502 | IN EFI_LOCATE_SEARCH_TYPE SearchType, |
502 | IN EFI_LOCATE_SEARCH_TYPE SearchType, |
503 | IN EFI_GUID *Protocol OPTIONAL, |
503 | IN EFI_GUID *Protocol OPTIONAL, |
504 | IN VOID *SearchKey OPTIONAL, |
504 | IN VOID *SearchKey OPTIONAL, |
505 | IN OUT UINTN *BufferSize, |
505 | IN OUT UINTN *BufferSize, |
506 | OUT EFI_HANDLE *Buffer |
506 | OUT EFI_HANDLE *Buffer |
507 | ); |
507 | ); |
508 | 508 | ||
509 | typedef |
509 | typedef |
510 | EFI_STATUS |
510 | EFI_STATUS |
511 | (EFIAPI *EFI_LOCATE_DEVICE_PATH) ( |
511 | (EFIAPI *EFI_LOCATE_DEVICE_PATH) ( |
512 | IN EFI_GUID *Protocol, |
512 | IN EFI_GUID *Protocol, |
513 | IN OUT EFI_DEVICE_PATH **DevicePath, |
513 | IN OUT EFI_DEVICE_PATH **DevicePath, |
514 | OUT EFI_HANDLE *Device |
514 | OUT EFI_HANDLE *Device |
515 | ); |
515 | ); |
516 | 516 | ||
517 | typedef |
517 | typedef |
518 | EFI_STATUS |
518 | EFI_STATUS |
519 | (EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE) ( |
519 | (EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE) ( |
520 | IN EFI_GUID *Guid, |
520 | IN EFI_GUID *Guid, |
521 | IN VOID *Table |
521 | IN VOID *Table |
522 | ); |
522 | ); |
523 | 523 | ||
524 | typedef |
524 | typedef |
525 | EFI_STATUS |
525 | EFI_STATUS |
526 | (EFIAPI *EFI_RESERVED_SERVICE) ( |
526 | (EFIAPI *EFI_RESERVED_SERVICE) ( |
527 | ); |
527 | ); |
528 | 528 | ||
529 | // |
529 | // |
530 | // Standard EFI table header |
530 | // Standard EFI table header |
531 | // |
531 | // |
532 | 532 | ||
533 | typedef struct _EFI_TABLE_HEARDER { |
533 | typedef struct _EFI_TABLE_HEARDER { |
534 | UINT64 Signature; |
534 | UINT64 Signature; |
535 | UINT32 Revision; |
535 | UINT32 Revision; |
536 | UINT32 HeaderSize; |
536 | UINT32 HeaderSize; |
537 | UINT32 CRC32; |
537 | UINT32 CRC32; |
538 | UINT32 Reserved; |
538 | UINT32 Reserved; |
539 | } EFI_TABLE_HEADER; |
539 | } EFI_TABLE_HEADER; |
540 | 540 | ||
541 | 541 | ||
542 | // |
542 | // |
543 | // EFI Runtime Serivces Table |
543 | // EFI Runtime Serivces Table |
544 | // |
544 | // |
545 | 545 | ||
546 | #define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552 |
546 | #define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552 |
547 | #define EFI_RUNTIME_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION) |
547 | #define EFI_RUNTIME_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION) |
548 | 548 | ||
549 | typedef struct { |
549 | typedef struct { |
550 | EFI_TABLE_HEADER Hdr; |
550 | EFI_TABLE_HEADER Hdr; |
551 | 551 | ||
552 | // |
552 | // |
553 | // Time services |
553 | // Time services |
554 | // |
554 | // |
555 | 555 | ||
556 | EFI_GET_TIME GetTime; |
556 | EFI_GET_TIME GetTime; |
557 | EFI_SET_TIME SetTime; |
557 | EFI_SET_TIME SetTime; |
558 | EFI_GET_WAKEUP_TIME GetWakeupTime; |
558 | EFI_GET_WAKEUP_TIME GetWakeupTime; |
559 | EFI_SET_WAKEUP_TIME SetWakeupTime; |
559 | EFI_SET_WAKEUP_TIME SetWakeupTime; |
560 | 560 | ||
561 | // |
561 | // |
562 | // Virtual memory services |
562 | // Virtual memory services |
563 | // |
563 | // |
564 | 564 | ||
565 | EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap; |
565 | EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap; |
566 | EFI_CONVERT_POINTER ConvertPointer; |
566 | EFI_CONVERT_POINTER ConvertPointer; |
567 | 567 | ||
568 | // |
568 | // |
569 | // Variable serviers |
569 | // Variable serviers |
570 | // |
570 | // |
571 | 571 | ||
572 | EFI_GET_VARIABLE GetVariable; |
572 | EFI_GET_VARIABLE GetVariable; |
573 | EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName; |
573 | EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName; |
574 | EFI_SET_VARIABLE SetVariable; |
574 | EFI_SET_VARIABLE SetVariable; |
575 | 575 | ||
576 | // |
576 | // |
577 | // Misc |
577 | // Misc |
578 | // |
578 | // |
579 | 579 | ||
580 | EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount; |
580 | EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount; |
581 | EFI_RESET_SYSTEM ResetSystem; |
581 | EFI_RESET_SYSTEM ResetSystem; |
582 | 582 | ||
583 | } EFI_RUNTIME_SERVICES; |
583 | } EFI_RUNTIME_SERVICES; |
584 | 584 | ||
585 | 585 | ||
586 | // |
586 | // |
587 | // EFI Boot Services Table |
587 | // EFI Boot Services Table |
588 | // |
588 | // |
589 | 589 | ||
590 | #define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42 |
590 | #define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42 |
591 | #define EFI_BOOT_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION) |
591 | #define EFI_BOOT_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION) |
592 | 592 | ||
593 | typedef struct _EFI_BOOT_SERVICES { |
593 | typedef struct _EFI_BOOT_SERVICES { |
594 | 594 | ||
595 | EFI_TABLE_HEADER Hdr; |
595 | EFI_TABLE_HEADER Hdr; |
596 | 596 | ||
597 | // |
597 | // |
598 | // Task priority functions |
598 | // Task priority functions |
599 | // |
599 | // |
600 | 600 | ||
601 | EFI_RAISE_TPL RaiseTPL; |
601 | EFI_RAISE_TPL RaiseTPL; |
602 | EFI_RESTORE_TPL RestoreTPL; |
602 | EFI_RESTORE_TPL RestoreTPL; |
603 | 603 | ||
604 | // |
604 | // |
605 | // Memory functions |
605 | // Memory functions |
606 | // |
606 | // |
607 | 607 | ||
608 | EFI_ALLOCATE_PAGES AllocatePages; |
608 | EFI_ALLOCATE_PAGES AllocatePages; |
609 | EFI_FREE_PAGES FreePages; |
609 | EFI_FREE_PAGES FreePages; |
610 | EFI_GET_MEMORY_MAP GetMemoryMap; |
610 | EFI_GET_MEMORY_MAP GetMemoryMap; |
611 | EFI_ALLOCATE_POOL AllocatePool; |
611 | EFI_ALLOCATE_POOL AllocatePool; |
612 | EFI_FREE_POOL FreePool; |
612 | EFI_FREE_POOL FreePool; |
613 | 613 | ||
614 | // |
614 | // |
615 | // Event & timer functions |
615 | // Event & timer functions |
616 | // |
616 | // |
617 | 617 | ||
618 | EFI_CREATE_EVENT CreateEvent; |
618 | EFI_CREATE_EVENT CreateEvent; |
619 | EFI_SET_TIMER SetTimer; |
619 | EFI_SET_TIMER SetTimer; |
620 | EFI_WAIT_FOR_EVENT WaitForEvent; |
620 | EFI_WAIT_FOR_EVENT WaitForEvent; |
621 | EFI_SIGNAL_EVENT SignalEvent; |
621 | EFI_SIGNAL_EVENT SignalEvent; |
622 | EFI_CLOSE_EVENT CloseEvent; |
622 | EFI_CLOSE_EVENT CloseEvent; |
623 | EFI_CHECK_EVENT CheckEvent; |
623 | EFI_CHECK_EVENT CheckEvent; |
624 | 624 | ||
625 | // |
625 | // |
626 | // Protocol handler functions |
626 | // Protocol handler functions |
627 | // |
627 | // |
628 | 628 | ||
629 | EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface; |
629 | EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface; |
630 | EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface; |
630 | EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface; |
631 | EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface; |
631 | EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface; |
632 | EFI_HANDLE_PROTOCOL HandleProtocol; |
632 | EFI_HANDLE_PROTOCOL HandleProtocol; |
633 | EFI_HANDLE_PROTOCOL PCHandleProtocol; |
633 | EFI_HANDLE_PROTOCOL PCHandleProtocol; |
634 | EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify; |
634 | EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify; |
635 | EFI_LOCATE_HANDLE LocateHandle; |
635 | EFI_LOCATE_HANDLE LocateHandle; |
636 | EFI_LOCATE_DEVICE_PATH LocateDevicePath; |
636 | EFI_LOCATE_DEVICE_PATH LocateDevicePath; |
637 | EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable; |
637 | EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable; |
638 | 638 | ||
639 | // |
639 | // |
640 | // Image functions |
640 | // Image functions |
641 | // |
641 | // |
642 | 642 | ||
643 | EFI_IMAGE_LOAD LoadImage; |
643 | EFI_IMAGE_LOAD LoadImage; |
644 | EFI_IMAGE_START StartImage; |
644 | EFI_IMAGE_START StartImage; |
645 | EFI_EXIT Exit; |
645 | EFI_EXIT Exit; |
646 | EFI_IMAGE_UNLOAD UnloadImage; |
646 | EFI_IMAGE_UNLOAD UnloadImage; |
647 | EFI_EXIT_BOOT_SERVICES ExitBootServices; |
647 | EFI_EXIT_BOOT_SERVICES ExitBootServices; |
648 | 648 | ||
649 | // |
649 | // |
650 | // Misc functions |
650 | // Misc functions |
651 | // |
651 | // |
652 | 652 | ||
653 | EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount; |
653 | EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount; |
654 | EFI_STALL Stall; |
654 | EFI_STALL Stall; |
655 | EFI_SET_WATCHDOG_TIMER SetWatchdogTimer; |
655 | EFI_SET_WATCHDOG_TIMER SetWatchdogTimer; |
656 | 656 | ||
657 | } EFI_BOOT_SERVICES; |
657 | } EFI_BOOT_SERVICES; |
658 | 658 | ||
659 | 659 | ||
660 | // |
660 | // |
661 | // EFI Configuration Table and GUID definitions |
661 | // EFI Configuration Table and GUID definitions |
662 | // |
662 | // |
663 | 663 | ||
664 | #define MPS_TABLE_GUID \ |
664 | #define MPS_TABLE_GUID \ |
665 | { 0xeb9d2d2f, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } |
665 | { 0xeb9d2d2f, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } |
666 | 666 | ||
667 | #define ACPI_TABLE_GUID \ |
667 | #define ACPI_TABLE_GUID \ |
668 | { 0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } |
668 | { 0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } |
669 | 669 | ||
670 | #define ACPI_20_TABLE_GUID \ |
670 | #define ACPI_20_TABLE_GUID \ |
671 | { 0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} } |
671 | { 0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} } |
672 | 672 | ||
673 | #define SMBIOS_TABLE_GUID \ |
673 | #define SMBIOS_TABLE_GUID \ |
674 | { 0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } |
674 | { 0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } |
675 | 675 | ||
676 | #define SAL_SYSTEM_TABLE_GUID \ |
676 | #define SAL_SYSTEM_TABLE_GUID \ |
677 | { 0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } |
677 | { 0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } |
678 | 678 | ||
679 | 679 | ||
680 | typedef struct _EFI_CONFIGURATION_TABLE { |
680 | typedef struct _EFI_CONFIGURATION_TABLE { |
681 | EFI_GUID VendorGuid; |
681 | EFI_GUID VendorGuid; |
682 | VOID *VendorTable; |
682 | VOID *VendorTable; |
683 | } EFI_CONFIGURATION_TABLE; |
683 | } EFI_CONFIGURATION_TABLE; |
684 | 684 | ||
685 | 685 | ||
686 | // |
686 | // |
687 | // EFI System Table |
687 | // EFI System Table |
688 | // |
688 | // |
689 | 689 | ||
690 | 690 | ||
691 | 691 | ||
692 | 692 | ||
693 | #define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249 |
693 | #define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249 |
694 | #define EFI_SYSTEM_TABLE_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION) |
694 | #define EFI_SYSTEM_TABLE_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION) |
695 | 695 | ||
696 | typedef struct _EFI_SYSTEM_TABLE { |
696 | typedef struct _EFI_SYSTEM_TABLE { |
697 | EFI_TABLE_HEADER Hdr; |
697 | EFI_TABLE_HEADER Hdr; |
698 | 698 | ||
699 | CHAR16 *FirmwareVendor; |
699 | CHAR16 *FirmwareVendor; |
700 | UINT32 FirmwareRevision; |
700 | UINT32 FirmwareRevision; |
701 | 701 | ||
702 | EFI_HANDLE ConsoleInHandle; |
702 | EFI_HANDLE ConsoleInHandle; |
703 | SIMPLE_INPUT_INTERFACE *ConIn; |
703 | SIMPLE_INPUT_INTERFACE *ConIn; |
704 | 704 | ||
705 | EFI_HANDLE ConsoleOutHandle; |
705 | EFI_HANDLE ConsoleOutHandle; |
706 | SIMPLE_TEXT_OUTPUT_INTERFACE *ConOut; |
706 | SIMPLE_TEXT_OUTPUT_INTERFACE *ConOut; |
707 | 707 | ||
708 | EFI_HANDLE StandardErrorHandle; |
708 | EFI_HANDLE StandardErrorHandle; |
709 | SIMPLE_TEXT_OUTPUT_INTERFACE *StdErr; |
709 | SIMPLE_TEXT_OUTPUT_INTERFACE *StdErr; |
710 | 710 | ||
711 | EFI_RUNTIME_SERVICES *RuntimeServices; |
711 | EFI_RUNTIME_SERVICES *RuntimeServices; |
712 | EFI_BOOT_SERVICES *BootServices; |
712 | EFI_BOOT_SERVICES *BootServices; |
713 | 713 | ||
714 | UINTN NumberOfTableEntries; |
714 | UINTN NumberOfTableEntries; |
715 | EFI_CONFIGURATION_TABLE *ConfigurationTable; |
715 | EFI_CONFIGURATION_TABLE *ConfigurationTable; |
716 | 716 | ||
717 | } EFI_SYSTEM_TABLE; |
717 | } EFI_SYSTEM_TABLE; |
718 | 718 | ||
719 | #endif |
719 | #endif |
720 | 720 | ||
721 | 721 |