1 | /*␊ |
2 | * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.␊ |
3 | *␊ |
4 | * This file contains Original Code and/or Modifications of Original Code␊ |
5 | * as defined in and that are subject to the Apple Public Source License␊ |
6 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
7 | * compliance with the License. The rights granted to you under the License␊ |
8 | * may not be used to create, or enable the creation or redistribution of,␊ |
9 | * unlawful or unlicensed copies of an Apple operating system, or to␊ |
10 | * circumvent, violate, or enable the circumvention or violation of, any␊ |
11 | * terms of an Apple operating system software license agreement.␊ |
12 | * ␊ |
13 | * Please obtain a copy of the License at␊ |
14 | * http://www.opensource.apple.com/apsl/ and read it before using this file.␊ |
15 | * ␊ |
16 | * The Original Code and all software distributed under the License are␊ |
17 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
18 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
19 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
20 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
21 | * Please see the License for the specific language governing rights and␊ |
22 | * limitations under the License.␊ |
23 | * ␊ |
24 | */␊ |
25 | ␊ |
26 | #ifndef _PEXPERT_I386_EFI_H␊ |
27 | #define _PEXPERT_I386_EFI_H␊ |
28 | ␊ |
29 | #include <stdint.h>␊ |
30 | ␊ |
31 | typedef uint8_t EFI_UINT8;␊ |
32 | typedef uint16_t EFI_UINT16;␊ |
33 | typedef uint32_t EFI_UINT32;␊ |
34 | typedef uint64_t EFI_UINT64;␊ |
35 | ␊ |
36 | typedef uint32_t EFI_UINTN; /* natural size for firmware, not kernel */␊ |
37 | ␊ |
38 | typedef int8_t EFI_INT8;␊ |
39 | typedef int16_t EFI_INT16;␊ |
40 | typedef int32_t EFI_INT32;␊ |
41 | typedef int64_t EFI_INT64;␊ |
42 | ␊ |
43 | typedef int8_t EFI_CHAR8;␊ |
44 | typedef int16_t EFI_CHAR16;␊ |
45 | typedef int32_t EFI_CHAR32;␊ |
46 | typedef int64_t EFI_CHAR64;␊ |
47 | ␊ |
48 | typedef uint32_t EFI_STATUS;␊ |
49 | typedef uint8_t EFI_BOOLEAN;␊ |
50 | typedef void VOID;␊ |
51 | ␊ |
52 | typedef uint32_t EFI_PTR32;␊ |
53 | typedef uint32_t EFI_HANDLE32;␊ |
54 | ␊ |
55 | typedef uint64_t EFI_PTR64;␊ |
56 | typedef uint64_t EFI_HANDLE64;␊ |
57 | /*␊ |
58 | ␊ |
59 | Portions Copyright 2004, Intel Corporation␊ |
60 | All rights reserved. This program and the accompanying materials␊ |
61 | are licensed and made available under the terms and conditions of the BSD License␊ |
62 | which accompanies this distribution. The full text of the license may be found at␊ |
63 | http://opensource.org/licenses/bsd-license.php␊ |
64 | ␊ |
65 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,␊ |
66 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.␊ |
67 | ␊ |
68 | */␊ |
69 | ␊ |
70 | ␊ |
71 | // Modifiers for EFI Runtime and Boot Services␊ |
72 | ␊ |
73 | #define EFI_RUNTIMESERVICE␊ |
74 | #define EFIAPI␊ |
75 | #define IN␊ |
76 | #define OUT␊ |
77 | #define OPTIONAL␊ |
78 | ␊ |
79 | #define EFI_MAX_BIT 0x80000000␊ |
80 | ␊ |
81 | // Set the upper bit to indicate EFI Error.␊ |
82 | #define EFIERR(a) (EFI_MAX_BIT | (a))␊ |
83 | ␊ |
84 | #define EFIWARN(a) (a)␊ |
85 | #define EFI_ERROR(a) (((INTN) (a)) < 0)␊ |
86 | ␊ |
87 | #define EFI_SUCCESS 0␊ |
88 | #define EFI_LOAD_ERROR EFIERR (1)␊ |
89 | #define EFI_INVALID_PARAMETER EFIERR (2)␊ |
90 | #define EFI_UNSUPPORTED EFIERR (3)␊ |
91 | #define EFI_BAD_BUFFER_SIZE EFIERR (4)␊ |
92 | #define EFI_BUFFER_TOO_SMALL EFIERR (5)␊ |
93 | #define EFI_NOT_READY EFIERR (6)␊ |
94 | #define EFI_DEVICE_ERROR EFIERR (7)␊ |
95 | #define EFI_WRITE_PROTECTED EFIERR (8)␊ |
96 | #define EFI_OUT_OF_RESOURCES EFIERR (9)␊ |
97 | #define EFI_VOLUME_CORRUPTED EFIERR (10)␊ |
98 | #define EFI_VOLUME_FULL EFIERR (11)␊ |
99 | #define EFI_NO_MEDIA EFIERR (12)␊ |
100 | #define EFI_MEDIA_CHANGED EFIERR (13)␊ |
101 | #define EFI_NOT_FOUND EFIERR (14)␊ |
102 | #define EFI_ACCESS_DENIED EFIERR (15)␊ |
103 | #define EFI_NO_RESPONSE EFIERR (16)␊ |
104 | #define EFI_NO_MAPPING EFIERR (17)␊ |
105 | #define EFI_TIMEOUT EFIERR (18)␊ |
106 | #define EFI_NOT_STARTED EFIERR (19)␊ |
107 | #define EFI_ALREADY_STARTED EFIERR (20)␊ |
108 | #define EFI_ABORTED EFIERR (21)␊ |
109 | #define EFI_ICMP_ERROR EFIERR (22)␊ |
110 | #define EFI_TFTP_ERROR EFIERR (23)␊ |
111 | #define EFI_PROTOCOL_ERROR EFIERR (24)␊ |
112 | #define EFI_INCOMPATIBLE_VERSION EFIERR (25)␊ |
113 | #define EFI_SECURITY_VIOLATION EFIERR (26)␊ |
114 | #define EFI_CRC_ERROR EFIERR (27)␊ |
115 | ␊ |
116 | #define EFI_WARN_UNKNOWN_GLYPH EFIWARN (1)␊ |
117 | #define EFI_WARN_DELETE_FAILURE EFIWARN (2)␊ |
118 | #define EFI_WARN_WRITE_FAILURE EFIWARN (3)␊ |
119 | #define EFI_WARN_BUFFER_TOO_SMALL EFIWARN (4)␊ |
120 | //␊ |
121 | // EFI Specification Revision information␊ |
122 | //␊ |
123 | #define EFI_SPECIFICATION_MAJOR_REVISION 1␊ |
124 | #define EFI_SPECIFICATION_MINOR_REVISION 10␊ |
125 | ␊ |
126 | typedef struct␊ |
127 | {␊ |
128 | EFI_UINT32 Data1;␊ |
129 | EFI_UINT16 Data2;␊ |
130 | EFI_UINT16 Data3;␊ |
131 | EFI_UINT8 Data4[8];␊ |
132 | } EFI_GUID;␊ |
133 | ␊ |
134 | #define APPLE_VENDOR_GUID \␊ |
135 | {0xAC39C713, 0x7E50, 0x423D, {0x88, 0x9D, 0x27,0x8F, 0xCC, 0x34, 0x22, 0xB6} }␊ |
136 | ␊ |
137 | #define EFI_GLOBAL_VARIABLE_GUID \␊ |
138 | {0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} }␊ |
139 | ␊ |
140 | typedef union␊ |
141 | {␊ |
142 | EFI_GUID Guid;␊ |
143 | EFI_UINT8 Raw[16];␊ |
144 | } EFI_GUID_UNION;␊ |
145 | ␊ |
146 | //␊ |
147 | // EFI Time Abstraction:␊ |
148 | // Year: 2000 - 20XX␊ |
149 | // Month: 1 - 12␊ |
150 | // Day: 1 - 31␊ |
151 | // Hour: 0 - 23␊ |
152 | // Minute: 0 - 59␊ |
153 | // Second: 0 - 59␊ |
154 | // Nanosecond: 0 - 999,999,999␊ |
155 | // TimeZone: -1440 to 1440 or 2047␊ |
156 | //␊ |
157 | typedef struct␊ |
158 | {␊ |
159 | ␉EFI_UINT16 Year;␊ |
160 | ␉EFI_UINT8 Month;␊ |
161 | ␉EFI_UINT8 Day;␊ |
162 | ␉EFI_UINT8 Hour;␊ |
163 | ␉EFI_UINT8 Minute;␊ |
164 | ␉EFI_UINT8 Second;␊ |
165 | ␉EFI_UINT8 Pad1;␊ |
166 | ␉EFI_UINT32 Nanosecond;␊ |
167 | ␉EFI_INT16 TimeZone;␊ |
168 | ␉EFI_UINT8 Daylight;␊ |
169 | ␉EFI_UINT8 Pad2;␊ |
170 | } EFI_TIME;␊ |
171 | ␊ |
172 | ␊ |
173 | // Bit definitions for EFI_TIME.Daylight␊ |
174 | ␊ |
175 | #define EFI_TIME_ADJUST_DAYLIGHT 0x01␊ |
176 | #define EFI_TIME_IN_DAYLIGHT 0x02␊ |
177 | ␊ |
178 | ␊ |
179 | // Value definition for EFI_TIME.TimeZone␊ |
180 | ␊ |
181 | #define EFI_UNSPECIFIED_TIMEZONE 0x07FF␊ |
182 | ␊ |
183 | typedef enum␊ |
184 | {␊ |
185 | ␉EfiReservedMemoryType,␊ |
186 | ␉EfiLoaderCode,␊ |
187 | ␉EfiLoaderData,␊ |
188 | ␉EfiBootServicesCode,␊ |
189 | ␉EfiBootServicesData,␊ |
190 | ␉EfiRuntimeServicesCode,␊ |
191 | ␉EfiRuntimeServicesData,␊ |
192 | ␉EfiConventionalMemory,␊ |
193 | ␉EfiUnusableMemory,␊ |
194 | ␉EfiACPIReclaimMemory,␊ |
195 | ␉EfiACPIMemoryNVS,␊ |
196 | ␉EfiMemoryMappedIO,␊ |
197 | ␉EfiMemoryMappedIOPortSpace,␊ |
198 | ␉EfiPalCode,␊ |
199 | ␉EfiMaxMemoryType␊ |
200 | } EFI_MEMORY_TYPE;␊ |
201 | ␊ |
202 | typedef struct␊ |
203 | {␊ |
204 | ␉EFI_UINT64␉␉␉␉Signature;␊ |
205 | ␉EFI_UINT32␉␉␉␉Revision;␊ |
206 | ␉EFI_UINT32␉␉␉␉HeaderSize;␊ |
207 | ␉EFI_UINT32␉␉␉␉CRC32;␊ |
208 | ␉EFI_UINT32␉␉␉␉Reserved;␊ |
209 | } __attribute__((aligned(8))) EFI_TABLE_HEADER;␊ |
210 | ␊ |
211 | // possible caching types for the memory range␊ |
212 | ␊ |
213 | #define EFI_MEMORY_UC 0x0000000000000001ULL␊ |
214 | #define EFI_MEMORY_WC 0x0000000000000002ULL␊ |
215 | #define EFI_MEMORY_WT 0x0000000000000004ULL␊ |
216 | #define EFI_MEMORY_WB 0x0000000000000008ULL␊ |
217 | #define EFI_MEMORY_UCE 0x0000000000000010ULL␊ |
218 | ␊ |
219 | ␊ |
220 | // physical memory protection on range␊ |
221 | ␊ |
222 | #define EFI_MEMORY_WP 0x0000000000001000ULL␊ |
223 | #define EFI_MEMORY_RP 0x0000000000002000ULL␊ |
224 | #define EFI_MEMORY_XP 0x0000000000004000ULL␊ |
225 | ␊ |
226 | ␊ |
227 | // range requires a runtime mapping␊ |
228 | ␊ |
229 | #define EFI_MEMORY_RUNTIME 0x8000000000000000ULL␊ |
230 | ␊ |
231 | typedef EFI_UINT64 EFI_PHYSICAL_ADDRESS;␊ |
232 | typedef EFI_UINT64 EFI_VIRTUAL_ADDRESS;␊ |
233 | ␊ |
234 | #define EFI_MEMORY_DESCRIPTOR_VERSION 1␊ |
235 | typedef struct␊ |
236 | {␊ |
237 | ␉EFI_UINT32 Type;␊ |
238 | ␉EFI_UINT32 Pad;␊ |
239 | ␉EFI_PHYSICAL_ADDRESS PhysicalStart;␊ |
240 | ␉EFI_VIRTUAL_ADDRESS VirtualStart;␊ |
241 | ␉EFI_UINT64 NumberOfPages;␊ |
242 | ␉EFI_UINT64 Attribute;␊ |
243 | } __attribute__((aligned(8))) EFI_MEMORY_DESCRIPTOR;␊ |
244 | ␊ |
245 | ␊ |
246 | typedef␊ |
247 | EFI_RUNTIMESERVICE␊ |
248 | EFI_STATUS␊ |
249 | (EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) (␊ |
250 | IN EFI_UINTN MemoryMapSize,␊ |
251 | IN EFI_UINTN DescriptorSize,␊ |
252 | IN EFI_UINT32 DescriptorVersion,␊ |
253 | IN EFI_MEMORY_DESCRIPTOR * VirtualMap␊ |
254 | ) __attribute__((regparm(0)));␊ |
255 | ␊ |
256 | typedef␊ |
257 | EFI_RUNTIMESERVICE␊ |
258 | EFI_STATUS␊ |
259 | (EFIAPI *EFI_CONVERT_POINTER) (␊ |
260 | IN EFI_UINTN DebugDisposition,␊ |
261 | IN OUT VOID **Address␊ |
262 | ) __attribute__((regparm(0)));␊ |
263 | ␊ |
264 | ␊ |
265 | // Variable attributes␊ |
266 | ␊ |
267 | #define EFI_VARIABLE_NON_VOLATILE 0x00000001␊ |
268 | #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002␊ |
269 | #define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004␊ |
270 | #define EFI_VARIABLE_READ_ONLY 0x00000008␊ |
271 | ␊ |
272 | typedef␊ |
273 | EFI_RUNTIMESERVICE␊ |
274 | EFI_STATUS␊ |
275 | (EFIAPI *EFI_GET_VARIABLE) (␊ |
276 | IN EFI_CHAR16 * VariableName,␊ |
277 | IN EFI_GUID * VendorGuid,␊ |
278 | OUT EFI_UINT32 * Attributes OPTIONAL,␊ |
279 | IN OUT EFI_UINTN * DataSize,␊ |
280 | OUT VOID * Data␊ |
281 | ) __attribute__((regparm(0)));␊ |
282 | ␊ |
283 | typedef␊ |
284 | EFI_RUNTIMESERVICE␊ |
285 | EFI_STATUS␊ |
286 | (EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) (␊ |
287 | IN OUT EFI_UINTN * VariableNameSize,␊ |
288 | IN OUT EFI_CHAR16 * VariableName,␊ |
289 | IN OUT EFI_GUID * VendorGuid␊ |
290 | ) __attribute__((regparm(0)));␊ |
291 | ␊ |
292 | typedef␊ |
293 | EFI_RUNTIMESERVICE␊ |
294 | EFI_STATUS␊ |
295 | (EFIAPI *EFI_SET_VARIABLE) (␊ |
296 | IN EFI_CHAR16 * VariableName,␊ |
297 | IN EFI_GUID * VendorGuid,␊ |
298 | IN EFI_UINT32 Attributes,␊ |
299 | IN EFI_UINTN DataSize,␊ |
300 | IN VOID * Data␊ |
301 | ) __attribute__((regparm(0)));␊ |
302 | ␊ |
303 | ␊ |
304 | // EFI Time␊ |
305 | ␊ |
306 | typedef struct␊ |
307 | {␊ |
308 | ␉EFI_UINT32 Resolution;␊ |
309 | ␉EFI_UINT32 Accuracy;␊ |
310 | ␉EFI_BOOLEAN SetsToZero;␊ |
311 | } __attribute__((aligned(4))) EFI_TIME_CAPABILITIES;␊ |
312 | ␊ |
313 | typedef␊ |
314 | EFI_RUNTIMESERVICE␊ |
315 | EFI_STATUS␊ |
316 | (EFIAPI *EFI_GET_TIME) (␊ |
317 | OUT EFI_TIME * Time,␊ |
318 | OUT EFI_TIME_CAPABILITIES * Capabilities OPTIONAL␊ |
319 | ) __attribute__((regparm(0)));␊ |
320 | ␊ |
321 | typedef␊ |
322 | EFI_RUNTIMESERVICE␊ |
323 | EFI_STATUS␊ |
324 | (EFIAPI *EFI_SET_TIME) (␊ |
325 | IN EFI_TIME * Time␊ |
326 | ) __attribute__((regparm(0)));␊ |
327 | ␊ |
328 | typedef␊ |
329 | EFI_RUNTIMESERVICE␊ |
330 | EFI_STATUS␊ |
331 | (EFIAPI *EFI_GET_WAKEUP_TIME) (␊ |
332 | OUT EFI_BOOLEAN * Enabled,␊ |
333 | OUT EFI_BOOLEAN * Pending,␊ |
334 | OUT EFI_TIME * Time␊ |
335 | ) __attribute__((regparm(0)));␊ |
336 | ␊ |
337 | typedef␊ |
338 | EFI_RUNTIMESERVICE␊ |
339 | EFI_STATUS␊ |
340 | (EFIAPI *EFI_SET_WAKEUP_TIME) (␊ |
341 | IN EFI_BOOLEAN Enable,␊ |
342 | IN EFI_TIME * Time OPTIONAL␊ |
343 | ) __attribute((regparm(0)));␊ |
344 | ␊ |
345 | typedef enum {␊ |
346 | EfiResetCold,␊ |
347 | EfiResetWarm,␊ |
348 | EfiResetShutdown,␊ |
349 | ␊ |
350 | #ifdef TIANO_EXTENSION_FLAG␊ |
351 | EfiResetUpdate␊ |
352 | #endif␊ |
353 | ␊ |
354 | } EFI_RESET_TYPE;␊ |
355 | ␊ |
356 | typedef␊ |
357 | EFI_RUNTIMESERVICE␊ |
358 | VOID␊ |
359 | (EFIAPI *EFI_RESET_SYSTEM) (␊ |
360 | IN EFI_RESET_TYPE ResetType,␊ |
361 | IN EFI_STATUS ResetStatus,␊ |
362 | IN EFI_UINTN DataSize,␊ |
363 | IN EFI_CHAR16 * ResetData OPTIONAL␊ |
364 | ) __attribute__((regparm(0)));␊ |
365 | ␊ |
366 | typedef␊ |
367 | EFI_RUNTIMESERVICE␊ |
368 | EFI_STATUS␊ |
369 | (EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) (␊ |
370 | OUT EFI_UINT32 * HighCount␊ |
371 | ) __attribute__((regparm(0)));␊ |
372 | ␊ |
373 | // Definition of Status Code extended data header␊ |
374 | ␊ |
375 | // HeaderSize The size of the architecture. This is specified to enable the future expansion␊ |
376 | ␊ |
377 | // Size The size of the data in bytes. This does not include the size of the header structure.␊ |
378 | ␊ |
379 | // Type A GUID defining the type of the data␊ |
380 | ␊ |
381 | #ifdef TIANO_EXTENSION_FLAG␊ |
382 | ␊ |
383 | typedef␊ |
384 | EFI_RUNTIMESERVICE␊ |
385 | EFI_STATUS␊ |
386 | (EFIAPI *EFI_REPORT_STATUS_CODE) (␊ |
387 | IN EFI_STATUS_CODE_TYPE Type,␊ |
388 | IN EFI_STATUS_CODE_VALUE Value,␊ |
389 | IN EFI_UINT32 Instance,␊ |
390 | IN EFI_GUID * CallerId OPTIONAL,␊ |
391 | IN EFI_STATUS_CODE_DATA * Data OPTIONAL␊ |
392 | ) __attribute__((regparm(0)));␊ |
393 | ␊ |
394 | #endif␊ |
395 | //␊ |
396 | // EFI Runtime Services Table␊ |
397 | //␊ |
398 | #define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552ULL␊ |
399 | #define EFI_RUNTIME_SERVICES_REVISION ((EFI_SPECIFICATION_MAJOR_REVISION << 16) | (EFI_SPECIFICATION_MINOR_REVISION))␊ |
400 | ␊ |
401 | typedef struct␊ |
402 | {␊ |
403 | ␉EFI_TABLE_HEADER␉␉Hdr;␊ |
404 | ␊ |
405 | ␉// Time Services␊ |
406 | ␉EFI_PTR32␉␉␉␉GetTime;␊ |
407 | ␉EFI_PTR32␉␉␉␉SetTime;␊ |
408 | ␉EFI_PTR32␉␉␉␉GetWakeupTime;␊ |
409 | ␉EFI_PTR32␉␉␉␉SetWakeupTime;␊ |
410 | ␊ |
411 | ␉// Virtual Memory Services␊ |
412 | ␊ |
413 | ␉EFI_PTR32 SetVirtualAddressMap;␊ |
414 | ␉EFI_PTR32 ConvertPointer;␊ |
415 | ␊ |
416 | ␊ |
417 | ␉// Variable Services␊ |
418 | ␉EFI_PTR32 GetVariable;␊ |
419 | ␉EFI_PTR32 GetNextVariableName;␊ |
420 | ␉EFI_PTR32 SetVariable;␊ |
421 | ␊ |
422 | ␉// Miscellaneous Services␊ |
423 | ␉EFI_PTR32 GetNextHighMonotonicCount;␊ |
424 | ␉EFI_PTR32 ResetSystem;␊ |
425 | ␊ |
426 | #ifdef TIANO_EXTENSION_FLAG␊ |
427 | ␊ |
428 | ␉// ////////////////////////////////////////////////////␊ |
429 | ␉// Extended EFI Services␊ |
430 | ␉//////////////////////////////////////////////////////␊ |
431 | ␊ |
432 | ␉EFI_PTR32 ReportStatusCode;␊ |
433 | #endif␊ |
434 | ␊ |
435 | } __attribute__((aligned(8))) EFI_RUNTIME_SERVICES_32;␊ |
436 | ␊ |
437 | typedef struct␊ |
438 | {␊ |
439 | ␉EFI_TABLE_HEADER Hdr;␊ |
440 | ␊ |
441 | ␊ |
442 | ␉// Time services␊ |
443 | ␊ |
444 | ␉EFI_PTR64 GetTime;␊ |
445 | ␉EFI_PTR64 SetTime;␊ |
446 | ␉EFI_PTR64 GetWakeupTime;␊ |
447 | ␉EFI_PTR64 SetWakeupTime;␊ |
448 | ␊ |
449 | ␉// Virtual memory services␊ |
450 | ␊ |
451 | ␉EFI_PTR64 SetVirtualAddressMap;␊ |
452 | ␉EFI_PTR64 ConvertPointer;␊ |
453 | ␊ |
454 | ␉// Variable services␊ |
455 | ␊ |
456 | ␉EFI_PTR64 GetVariable;␊ |
457 | ␉EFI_PTR64 GetNextVariableName;␊ |
458 | ␉EFI_PTR64 SetVariable;␊ |
459 | ␊ |
460 | ␉// Misc␊ |
461 | ␊ |
462 | ␉EFI_PTR64 GetNextHighMonotonicCount;␊ |
463 | ␉EFI_PTR64 ResetSystem;␊ |
464 | ␊ |
465 | #ifdef TIANO_EXTENSION_FLAG␊ |
466 | ␊ |
467 | ␉// ////////////////////////////////////////////////////␊ |
468 | ␉// Extended EFI Services␊ |
469 | ␉//////////////////////////////////////////////////////␊ |
470 | ␊ |
471 | ␉EFI_PTR64 ReportStatusCode;␊ |
472 | #endif␊ |
473 | ␊ |
474 | } __attribute__((aligned(8))) EFI_RUNTIME_SERVICES_64;␊ |
475 | ␊ |
476 | //␊ |
477 | // EFI Configuration Table␊ |
478 | //␊ |
479 | typedef struct␊ |
480 | {␊ |
481 | ␉EFI_GUID VendorGuid;␊ |
482 | ␉EFI_PTR32 VendorTable;␊ |
483 | } EFI_CONFIGURATION_TABLE_32;␊ |
484 | ␊ |
485 | typedef struct␊ |
486 | {␊ |
487 | ␉EFI_GUID VendorGuid;␊ |
488 | ␉EFI_PTR64 VendorTable;␊ |
489 | } __attribute__((aligned(8))) EFI_CONFIGURATION_TABLE_64;␊ |
490 | ␊ |
491 | ␊ |
492 | // EFI System Table␊ |
493 | ␊ |
494 | #define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249ULL␊ |
495 | #define EFI_SYSTEM_TABLE_REVISION ((EFI_SPECIFICATION_MAJOR_REVISION << 16) | (EFI_SPECIFICATION_MINOR_REVISION))␊ |
496 | #define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | 00)␊ |
497 | #define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | 02)␊ |
498 | #define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | 10)␊ |
499 | ␊ |
500 | typedef struct EFI_SYSTEM_TABLE_32␊ |
501 | {␊ |
502 | ␉EFI_TABLE_HEADER Hdr;␊ |
503 | ␊ |
504 | ␉EFI_PTR32 FirmwareVendor;␊ |
505 | ␉EFI_UINT32 FirmwareRevision;␊ |
506 | ␊ |
507 | ␉EFI_HANDLE32 ConsoleInHandle;␊ |
508 | ␉EFI_PTR32 ConIn;␊ |
509 | ␊ |
510 | ␉EFI_HANDLE32 ConsoleOutHandle;␊ |
511 | ␉EFI_PTR32 ConOut;␊ |
512 | ␊ |
513 | ␉EFI_HANDLE32 StandardErrorHandle;␊ |
514 | ␉EFI_PTR32 StdErr;␊ |
515 | ␊ |
516 | ␉EFI_PTR32 RuntimeServices;␊ |
517 | ␉EFI_PTR32 BootServices;␊ |
518 | ␊ |
519 | ␉EFI_UINT32 NumberOfTableEntries;␊ |
520 | ␉EFI_PTR32 ConfigurationTable;␊ |
521 | ␊ |
522 | } __attribute__((aligned(8))) EFI_SYSTEM_TABLE_32;␊ |
523 | ␊ |
524 | typedef struct EFI_SYSTEM_TABLE_64␊ |
525 | {␊ |
526 | ␉EFI_TABLE_HEADER Hdr;␊ |
527 | ␊ |
528 | ␉EFI_PTR64 FirmwareVendor;␊ |
529 | ␉EFI_UINT32 FirmwareRevision;␊ |
530 | ␊ |
531 | ␉EFI_UINT32 __pad;␊ |
532 | ␉EFI_HANDLE64 ConsoleInHandle;␊ |
533 | ␉EFI_PTR64 ConIn;␊ |
534 | ␊ |
535 | ␉EFI_HANDLE64 ConsoleOutHandle;␊ |
536 | ␉EFI_PTR64 ConOut;␊ |
537 | ␊ |
538 | ␉EFI_HANDLE64 StandardErrorHandle;␊ |
539 | ␉EFI_PTR64 StdErr;␊ |
540 | ␊ |
541 | ␉EFI_PTR64 RuntimeServices;␊ |
542 | ␉EFI_PTR64 BootServices;␊ |
543 | ␊ |
544 | ␉EFI_UINT64 NumberOfTableEntries;␊ |
545 | ␉EFI_PTR64 ConfigurationTable;␊ |
546 | } __attribute__((aligned(8))) EFI_SYSTEM_TABLE_64;␊ |
547 | ␊ |
548 | #endif /* _PEXPERT_I386_EFI_H */␊ |
549 | |