1 /* efi.h - declare EFI types and functions */
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
6 * GRUB is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GRUB is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef GRUB_EFI_API_HEADER
21 #define GRUB_EFI_API_HEADER 1
23 #include <grub/types.h>
25 /* For consistency and safety, we name the EFI-defined types differently.
26 All names are transformed into lower case, _t appended, and
27 grub_efi_ prepended. */
30 #define GRUB_EFI_EVT_TIMER 0x80000000
31 #define GRUB_EFI_EVT_RUNTIME 0x40000000
32 #define GRUB_EFI_EVT_RUNTIME_CONTEXT 0x20000000
33 #define GRUB_EFI_EVT_NOTIFY_WAIT 0x00000100
34 #define GRUB_EFI_EVT_NOTIFY_SIGNAL 0x00000200
35 #define GRUB_EFI_EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
36 #define GRUB_EFI_EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
38 #define GRUB_EFI_TPL_APPLICATION 4
39 #define GRUB_EFI_TPL_CALLBACK 8
40 #define GRUB_EFI_TPL_NOTIFY 16
41 #define GRUB_EFI_TPL_HIGH_LEVEL 31
43 #define GRUB_EFI_MEMORY_UC 0x0000000000000001LL
44 #define GRUB_EFI_MEMORY_WC 0x0000000000000002LL
45 #define GRUB_EFI_MEMORY_WT 0x0000000000000004LL
46 #define GRUB_EFI_MEMORY_WB 0x0000000000000008LL
47 #define GRUB_EFI_MEMORY_UCE 0x0000000000000010LL
48 #define GRUB_EFI_MEMORY_WP 0x0000000000001000LL
49 #define GRUB_EFI_MEMORY_RP 0x0000000000002000LL
50 #define GRUB_EFI_MEMORY_XP 0x0000000000004000LL
51 #define GRUB_EFI_MEMORY_RUNTIME 0x8000000000000000LL
53 #define GRUB_EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001
54 #define GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002
55 #define GRUB_EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004
56 #define GRUB_EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008
57 #define GRUB_EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010
58 #define GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE 0x00000020
60 #define GRUB_EFI_VARIABLE_NON_VOLATILE 0x0000000000000001
61 #define GRUB_EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002
62 #define GRUB_EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004
64 #define GRUB_EFI_TIME_ADJUST_DAYLIGHT 0x01
65 #define GRUB_EFI_TIME_IN_DAYLIGHT 0x02
67 #define GRUB_EFI_UNSPECIFIED_TIMEZONE 0x07FF
69 #define GRUB_EFI_OPTIONAL_PTR 0x00000001
71 #define GRUB_EFI_LOADED_IMAGE_GUID \
72 { 0x5b1b31a1, 0x9562, 0x11d2, \
73 { 0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
76 #define GRUB_EFI_DISK_IO_GUID \
77 { 0xce345171, 0xba0b, 0x11d2, \
78 { 0x8e, 0x4f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
81 #define GRUB_EFI_BLOCK_IO_GUID \
82 { 0x964e5b21, 0x6459, 0x11d2, \
83 { 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
86 #define GRUB_EFI_DEVICE_PATH_GUID \
87 { 0x09576e91, 0x6d3f, 0x11d2, \
88 { 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
91 #define GRUB_EFI_MPS_TABLE_GUID \
92 { 0xeb9d2d2f, 0x2d88, 0x11d3, \
93 { 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
96 #define GRUB_EFI_ACPI_TABLE_GUID \
97 { 0xeb9d2d30, 0x2d88, 0x11d3, \
98 { 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
101 #define GRUB_EFI_ACPI_20_TABLE_GUID \
102 { 0x8868e871, 0xe4f1, 0x11d3, \
103 { 0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
106 #define GRUB_EFI_SMBIOS_TABLE_GUID \
107 { 0xeb9d2d31, 0x2d88, 0x11d3, \
108 { 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
112 enum grub_efi_timer_delay
114 GRUB_EFI_TIMER_CANCEL
,
115 GRUB_EFI_TIMER_PERIODIC
,
116 GRUB_EFI_TIMER_RELATIVE
118 typedef enum grub_efi_timer_delay grub_efi_timer_delay_t
;
120 enum grub_efi_allocate_type
122 GRUB_EFI_ALLOCATE_ANY_PAGES
,
123 GRUB_EFI_ALLOCATE_MAX_ADDRESS
,
124 GRUB_EFI_ALLOCATE_ADDRESS
,
125 GRUB_EFI_MAX_ALLOCATION_TYPE
127 typedef enum grub_efi_allocate_type grub_efi_allocate_type_t
;
129 enum grub_efi_memory_type
131 GRUB_EFI_RESERVED_MEMORY_TYPE
,
132 GRUB_EFI_LOADER_CODE
,
133 GRUB_EFI_LOADER_DATA
,
134 GRUB_EFI_BOOT_SERVICES_CODE
,
135 GRUB_EFI_BOOT_SERVICES_DATA
,
136 GRUB_EFI_RUNTIME_SERVICES_CODE
,
137 GRUB_EFI_RUNTIME_SERVICES_DATA
,
138 GRUB_EFI_CONVENTIONAL_MEMORY
,
139 GRUB_EFI_UNUSABLE_MEMORY
,
140 GRUB_EFI_ACPI_RECLAIM_MEMORY
,
141 GRUB_EFI_ACPI_MEMORY_NVS
,
142 GRUB_EFI_MEMORY_MAPPED_IO
,
143 GRUB_EFI_MEMORY_MAPPED_IO_PORT_SPACE
,
145 GRUB_EFI_MAX_MEMORY_TYPE
147 typedef enum grub_efi_memory_type grub_efi_memory_type_t
;
149 enum grub_efi_interface_type
151 GRUB_EFI_NATIVE_INTERFACE
153 typedef enum grub_efi_interface_type grub_efi_interface_type_t
;
155 enum grub_efi_locate_search_type
157 GRUB_EFI_ALL_HANDLES
,
158 GRUB_EFI_BY_REGISTER_NOTIFY
,
161 typedef enum grub_efi_locate_search_type grub_efi_locate_search_type_t
;
163 enum grub_efi_reset_type
167 GRUB_EFI_RESET_SHUTDOWN
169 typedef enum grub_efi_reset_type grub_efi_reset_type_t
;
172 typedef char grub_efi_boolean_t
;
173 typedef long grub_efi_intn_t
;
174 typedef unsigned long grub_efi_uintn_t
;
175 typedef grub_int8_t grub_efi_int8_t
;
176 typedef grub_uint8_t grub_efi_uint8_t
;
177 typedef grub_int16_t grub_efi_int16_t
;
178 typedef grub_uint16_t grub_efi_uint16_t
;
179 typedef grub_int32_t grub_efi_int32_t
;
180 typedef grub_uint32_t grub_efi_uint32_t
;
181 typedef grub_int64_t grub_efi_int64_t
;
182 typedef grub_uint64_t grub_efi_uint64_t
;
183 typedef grub_uint8_t grub_efi_char8_t
;
184 typedef grub_uint16_t grub_efi_char16_t
;
186 typedef grub_efi_intn_t grub_efi_status_t
;
188 #define GRUB_EFI_ERROR_CODE(value) \
189 ((1L << (sizeof (grub_efi_status_t) * 8 - 1)) | (value))
191 #define GRUB_EFI_WARNING_CODE(value) (value)
193 #define GRUB_EFI_SUCCESS 0
195 #define GRUB_EFI_LOAD_ERROR GRUB_EFI_ERROR_CODE (1)
196 #define GRUB_EFI_INVALID_PARAMETER GRUB_EFI_ERROR_CODE (2)
197 #define GRUB_EFI_UNSUPPORTED GRUB_EFI_ERROR_CODE (3)
198 #define GRUB_EFI_BAD_BUFFER_SIZE GRUB_EFI_ERROR_CODE (4)
199 #define GRUB_EFI_BUFFER_TOO_SMALL GRUB_EFI_ERROR_CODE (5)
200 #define GRUB_EFI_NOT_READY GRUB_EFI_ERROR_CODE (6)
201 #define GRUB_EFI_DEVICE_ERROR GRUB_EFI_ERROR_CODE (7)
202 #define GRUB_EFI_WRITE_PROTECTED GRUB_EFI_ERROR_CODE (8)
203 #define GRUB_EFI_OUT_OF_RESOURCES GRUB_EFI_ERROR_CODE (9)
204 #define GRUB_EFI_VOLUME_CORRUPTED GRUB_EFI_ERROR_CODE (10)
205 #define GRUB_EFI_VOLUME_FULL GRUB_EFI_ERROR_CODE (11)
206 #define GRUB_EFI_NO_MEDIA GRUB_EFI_ERROR_CODE (12)
207 #define GRUB_EFI_MEDIA_CHANGED GRUB_EFI_ERROR_CODE (13)
208 #define GRUB_EFI_NOT_FOUND GRUB_EFI_ERROR_CODE (14)
209 #define GRUB_EFI_ACCESS_DENIED GRUB_EFI_ERROR_CODE (15)
210 #define GRUB_EFI_NO_RESPONSE GRUB_EFI_ERROR_CODE (16)
211 #define GRUB_EFI_NO_MAPPING GRUB_EFI_ERROR_CODE (17)
212 #define GRUB_EFI_TIMEOUT GRUB_EFI_ERROR_CODE (18)
213 #define GRUB_EFI_NOT_STARTED GRUB_EFI_ERROR_CODE (19)
214 #define GRUB_EFI_ALREADY_STARTED GRUB_EFI_ERROR_CODE (20)
215 #define GRUB_EFI_ABORTED GRUB_EFI_ERROR_CODE (21)
216 #define GRUB_EFI_ICMP_ERROR GRUB_EFI_ERROR_CODE (22)
217 #define GRUB_EFI_TFTP_ERROR GRUB_EFI_ERROR_CODE (23)
218 #define GRUB_EFI_PROTOCOL_ERROR GRUB_EFI_ERROR_CODE (24)
219 #define GRUB_EFI_INCOMPATIBLE_VERSION GRUB_EFI_ERROR_CODE (25)
220 #define GRUB_EFI_SECURITY_VIOLATION GRUB_EFI_ERROR_CODE (26)
221 #define GRUB_EFI_CRC_ERROR GRUB_EFI_ERROR_CODE (27)
223 #define GRUB_EFI_WARN_UNKNOWN_GLYPH GRUB_EFI_WARNING_CODE (1)
224 #define GRUB_EFI_WARN_DELETE_FAILURE GRUB_EFI_WARNING_CODE (2)
225 #define GRUB_EFI_WARN_WRITE_FAILURE GRUB_EFI_WARNING_CODE (3)
226 #define GRUB_EFI_WARN_BUFFER_TOO_SMALL GRUB_EFI_WARNING_CODE (4)
228 typedef void *grub_efi_handle_t
;
229 typedef void *grub_efi_event_t
;
230 typedef grub_efi_uint64_t grub_efi_lba_t
;
231 typedef grub_efi_uintn_t grub_efi_tpl_t
;
232 typedef grub_uint8_t grub_efi_mac_address_t
[32];
233 typedef grub_uint8_t grub_efi_ipv4_address_t
[4];
234 typedef grub_uint16_t grub_efi_ipv6_address_t
[8];
235 typedef grub_uint8_t grub_efi_ip_address_t
[8] __attribute__ ((aligned(4)));
236 typedef grub_efi_uint64_t grub_efi_physical_address_t
;
237 typedef grub_efi_uint64_t grub_efi_virtual_address_t
;
244 grub_uint8_t data4
[8];
245 } __attribute__ ((aligned(8)));
246 typedef struct grub_efi_guid grub_efi_guid_t
;
248 /* XXX although the spec does not specify the padding, this actually
249 must have the padding! */
250 struct grub_efi_memory_descriptor
252 grub_efi_uint32_t type
;
253 grub_efi_uint32_t padding
;
254 grub_efi_physical_address_t physical_start
;
255 grub_efi_virtual_address_t virtual_start
;
256 grub_efi_uint64_t num_pages
;
257 grub_efi_uint64_t attribute
;
259 typedef struct grub_efi_memory_descriptor grub_efi_memory_descriptor_t
;
261 /* Device Path definitions. */
262 struct grub_efi_device_path
264 grub_efi_uint8_t type
;
265 grub_efi_uint8_t subtype
;
266 grub_efi_uint8_t length
[2];
268 typedef struct grub_efi_device_path grub_efi_device_path_t
;
269 /* XXX EFI does not define EFI_DEVICE_PATH_PROTOCOL but uses it.
270 It seems to be identical to EFI_DEVICE_PATH. */
271 typedef struct grub_efi_device_path grub_efi_device_path_protocol_t
;
273 #define GRUB_EFI_DEVICE_PATH_TYPE(dp) ((dp)->type & 0x7f)
274 #define GRUB_EFI_DEVICE_PATH_SUBTYPE(dp) ((dp)->subtype)
275 #define GRUB_EFI_DEVICE_PATH_LENGTH(dp) \
276 ((dp)->length[0] | ((grub_efi_uint16_t) ((dp)->length[1]) << 8))
278 /* The End of Device Path nodes. */
279 #define GRUB_EFI_END_DEVICE_PATH_TYPE (0xff & 0x7f)
281 #define GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
282 #define GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE 0x01
284 #define GRUB_EFI_END_ENTIRE_DEVICE_PATH(dp) \
285 (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_END_DEVICE_PATH_TYPE \
286 && (GRUB_EFI_DEVICE_PATH_SUBTYPE (dp) \
287 == GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE))
289 #define GRUB_EFI_NEXT_DEVICE_PATH(dp) \
290 ((grub_efi_device_path_t *) ((char *) (dp) \
291 + GRUB_EFI_DEVICE_PATH_LENGTH (dp)))
293 /* Hardware Device Path. */
294 #define GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE 1
296 #define GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE 1
298 struct grub_efi_pci_device_path
300 grub_efi_device_path_t header
;
301 grub_efi_uint8_t function
;
302 grub_efi_uint8_t device
;
304 typedef struct grub_efi_pci_device_path grub_efi_pci_device_path_t
;
306 #define GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE 2
308 struct grub_efi_pccard_device_path
310 grub_efi_device_path_t header
;
311 grub_efi_uint8_t function
;
313 typedef struct grub_efi_pccard_device_path grub_efi_pccard_device_path_t
;
315 #define GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE 3
317 struct grub_efi_memory_mapped_device_path
319 grub_efi_device_path_t header
;
320 grub_efi_memory_type_t memory_type
;
321 grub_efi_physical_address_t start_address
;
322 grub_efi_physical_address_t end_address
;
324 typedef struct grub_efi_memory_mapped_device_path grub_efi_memory_mapped_device_path_t
;
326 #define GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE 4
328 struct grub_efi_vendor_device_path
330 grub_efi_device_path_t header
;
331 grub_efi_guid_t vendor_guid
;
332 grub_efi_uint8_t vendor_defined_data
[0];
334 typedef struct grub_efi_vendor_device_path grub_efi_vendor_device_path_t
;
336 #define GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE 5
338 struct grub_efi_controller_device_path
340 grub_efi_device_path_t header
;
341 grub_efi_uint32_t controller_number
;
343 typedef struct grub_efi_controller_device_path grub_efi_controller_device_path_t
;
345 /* ACPI Device Path. */
346 #define GRUB_EFI_ACPI_DEVICE_PATH_TYPE 2
348 #define GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE 1
350 struct grub_efi_acpi_device_path
352 grub_efi_device_path_t header
;
353 grub_efi_uint32_t hid
;
354 grub_efi_uint32_t uid
;
356 typedef struct grub_efi_acpi_device_path grub_efi_acpi_device_path_t
;
358 #define GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE 2
360 struct grub_efi_expanded_acpi_device_path
362 grub_efi_device_path_t header
;
363 grub_efi_uint32_t hid
;
364 grub_efi_uint32_t uid
;
365 grub_efi_uint32_t cid
;
368 typedef struct grub_efi_expanded_acpi_device_path grub_efi_expanded_acpi_device_path_t
;
370 #define GRUB_EFI_EXPANDED_ACPI_HIDSTR(dp) \
371 (((grub_efi_expanded_acpi_device_path_t *) dp)->hidstr)
372 #define GRUB_EFI_EXPANDED_ACPI_UIDSTR(dp) \
373 (GRUB_EFI_EXPANDED_ACPI_HIDSTR(dp) \
374 + grub_strlen (GRUB_EFI_EXPANDED_ACPI_HIDSTR(dp)) + 1)
375 #define GRUB_EFI_EXPANDED_ACPI_CIDSTR(dp) \
376 (GRUB_EFI_EXPANDED_ACPI_UIDSTR(dp) \
377 + grub_strlen (GRUB_EFI_EXPANDED_ACPI_UIDSTR(dp)) + 1)
379 /* Messaging Device Path. */
380 #define GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE 3
382 #define GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE 1
384 struct grub_efi_atapi_device_path
386 grub_efi_device_path_t header
;
387 grub_efi_uint8_t primary_secondary
;
388 grub_efi_uint8_t slave_master
;
389 grub_efi_uint16_t lun
;
391 typedef struct grub_efi_atapi_device_path grub_efi_atapi_device_path_t
;
393 #define GRUB_EFI_SCSI_DEVICE_PATH_SUBTYPE 2
395 struct grub_efi_scsi_device_path
397 grub_efi_device_path_t header
;
398 grub_efi_uint16_t pun
;
399 grub_efi_uint16_t lun
;
401 typedef struct grub_efi_scsi_device_path grub_efi_scsi_device_path_t
;
403 #define GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE 3
405 struct grub_efi_fibre_channel_device_path
407 grub_efi_device_path_t header
;
408 grub_efi_uint32_t reserved
;
409 grub_efi_uint64_t wwn
;
410 grub_efi_uint64_t lun
;
412 typedef struct grub_efi_fibre_channel_device_path grub_efi_fibre_channel_device_path_t
;
414 #define GRUB_EFI_1394_DEVICE_PATH_SUBTYPE 4
416 struct grub_efi_1394_device_path
418 grub_efi_device_path_t header
;
419 grub_efi_uint32_t reserved
;
420 grub_efi_uint64_t guid
;
422 typedef struct grub_efi_1394_device_path grub_efi_1394_device_path_t
;
424 #define GRUB_EFI_USB_DEVICE_PATH_SUBTYPE 5
426 struct grub_efi_usb_device_path
428 grub_efi_device_path_t header
;
429 grub_efi_uint8_t parent_port_number
;
430 grub_efi_uint8_t interface
;
432 typedef struct grub_efi_usb_device_path grub_efi_usb_device_path_t
;
434 #define GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE 15
436 struct grub_efi_usb_class_device_path
438 grub_efi_device_path_t header
;
439 grub_efi_uint16_t vendor_id
;
440 grub_efi_uint16_t product_id
;
441 grub_efi_uint8_t device_class
;
442 grub_efi_uint8_t device_subclass
;
443 grub_efi_uint8_t device_protocol
;
445 typedef struct grub_efi_usb_class_device_path grub_efi_usb_class_device_path_t
;
447 #define GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE 6
449 struct grub_efi_i2o_device_path
451 grub_efi_device_path_t header
;
452 grub_efi_uint32_t tid
;
454 typedef struct grub_efi_i2o_device_path grub_efi_i2o_device_path_t
;
456 #define GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE 11
458 struct grub_efi_mac_address_device_path
460 grub_efi_device_path_t header
;
461 grub_efi_mac_address_t mac_address
;
462 grub_efi_uint8_t if_type
;
464 typedef struct grub_efi_mac_address_device_path grub_efi_mac_address_device_path_t
;
466 #define GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE 12
468 struct grub_efi_ipv4_device_path
470 grub_efi_device_path_t header
;
471 grub_efi_ipv4_address_t local_ip_address
;
472 grub_efi_ipv4_address_t remote_ip_address
;
473 grub_efi_uint16_t local_port
;
474 grub_efi_uint16_t remote_port
;
475 grub_efi_uint16_t protocol
;
476 grub_efi_uint8_t static_ip_address
;
478 typedef struct grub_efi_ipv4_device_path grub_efi_ipv4_device_path_t
;
480 #define GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE 13
482 struct grub_efi_ipv6_device_path
484 grub_efi_device_path_t header
;
485 grub_efi_ipv6_address_t local_ip_address
;
486 grub_efi_ipv6_address_t remote_ip_address
;
487 grub_efi_uint16_t local_port
;
488 grub_efi_uint16_t remote_port
;
489 grub_efi_uint16_t protocol
;
490 grub_efi_uint8_t static_ip_address
;
492 typedef struct grub_efi_ipv6_device_path grub_efi_ipv6_device_path_t
;
494 #define GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE 9
496 struct grub_efi_infiniband_device_path
498 grub_efi_device_path_t header
;
499 grub_efi_uint32_t resource_flags
;
500 grub_efi_uint8_t port_gid
[16];
501 grub_efi_uint64_t remote_id
;
502 grub_efi_uint64_t target_port_id
;
503 grub_efi_uint64_t device_id
;
505 typedef struct grub_efi_infiniband_device_path grub_efi_infiniband_device_path_t
;
507 #define GRUB_EFI_UART_DEVICE_PATH_SUBTYPE 14
509 struct grub_efi_uart_device_path
511 grub_efi_device_path_t header
;
512 grub_efi_uint32_t reserved
;
513 grub_efi_uint64_t baud_rate
;
514 grub_efi_uint8_t data_bits
;
515 grub_efi_uint8_t parity
;
516 grub_efi_uint8_t stop_bits
;
518 typedef struct grub_efi_uart_device_path grub_efi_uart_device_path_t
;
520 #define GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE 10
522 struct grub_efi_vendor_messaging_device_path
524 grub_efi_device_path_t header
;
525 grub_efi_guid_t vendor_guid
;
526 grub_efi_uint8_t vendor_defined_data
[0];
528 typedef struct grub_efi_vendor_messaging_device_path grub_efi_vendor_messaging_device_path_t
;
530 /* Media Device Path. */
531 #define GRUB_EFI_MEDIA_DEVICE_PATH_TYPE 4
533 #define GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE 1
535 struct grub_efi_hard_drive_device_path
537 grub_efi_device_path_t header
;
538 grub_efi_uint32_t partition_number
;
539 grub_efi_lba_t partition_start
;
540 grub_efi_lba_t partition_size
;
541 grub_efi_uint8_t partition_signature
[8];
542 grub_efi_uint8_t mbr_type
;
543 grub_efi_uint8_t signature_type
;
545 typedef struct grub_efi_hard_drive_device_path grub_efi_hard_drive_device_path_t
;
547 #define GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE 2
549 struct grub_efi_cdrom_device_path
551 grub_efi_device_path_t header
;
552 grub_efi_uint32_t boot_entry
;
553 grub_efi_lba_t partition_start
;
554 grub_efi_lba_t partition_size
;
556 typedef struct grub_efi_cdrom_device_path grub_efi_cdrom_device_path_t
;
558 #define GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE 3
560 struct grub_efi_vendor_media_device_path
562 grub_efi_device_path_t header
;
563 grub_efi_guid_t vendor_guid
;
564 grub_efi_uint8_t vendor_defined_data
[0];
566 typedef struct grub_efi_vendor_media_device_path grub_efi_vendor_media_device_path_t
;
568 #define GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE 4
570 struct grub_efi_file_path_device_path
572 grub_efi_device_path_t header
;
573 grub_efi_char16_t path_name
[0];
575 typedef struct grub_efi_file_path_device_path grub_efi_file_path_device_path_t
;
577 #define GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE 5
579 struct grub_efi_protocol_device_path
581 grub_efi_device_path_t header
;
582 grub_efi_guid_t guid
;
584 typedef struct grub_efi_protocol_device_path grub_efi_protocol_device_path_t
;
586 /* BIOS Boot Specification Device Path. */
587 #define GRUB_EFI_BIOS_DEVICE_PATH_TYPE 5
589 #define GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE 1
591 struct grub_efi_bios_device_path
593 grub_efi_device_path_t header
;
594 grub_efi_uint16_t device_type
;
595 grub_efi_uint16_t status_flags
;
598 typedef struct grub_efi_bios_device_path grub_efi_bios_device_path_t
;
600 struct grub_efi_open_protocol_information_entry
602 grub_efi_handle_t agent_handle
;
603 grub_efi_handle_t controller_handle
;
604 grub_efi_uint32_t attributes
;
605 grub_efi_uint32_t open_count
;
607 typedef struct grub_efi_open_protocol_information_entry grub_efi_open_protocol_information_entry_t
;
611 grub_efi_uint16_t year
;
612 grub_efi_uint8_t month
;
613 grub_efi_uint8_t day
;
614 grub_efi_uint8_t hour
;
615 grub_efi_uint8_t minute
;
616 grub_efi_uint8_t second
;
617 grub_efi_uint8_t pad1
;
618 grub_efi_uint32_t nanosecond
;
619 grub_efi_int16_t time_zone
;
620 grub_efi_uint8_t daylight
;
621 grub_efi_uint8_t pad2
;
622 } __attribute__ ((packed
));
623 typedef struct grub_efi_time grub_efi_time_t
;
625 struct grub_efi_time_capabilities
627 grub_efi_uint32_t resolution
;
628 grub_efi_uint32_t accuracy
;
629 grub_efi_boolean_t sets_to_zero
;
631 typedef struct grub_efi_time_capabilities grub_efi_time_capabilities_t
;
633 struct grub_efi_input_key
635 grub_efi_uint16_t scan_code
;
636 grub_efi_char16_t unicode_char
;
638 typedef struct grub_efi_input_key grub_efi_input_key_t
;
640 struct grub_efi_simple_text_output_mode
642 grub_efi_int32_t max_mode
;
643 grub_efi_int32_t mode
;
644 grub_efi_int32_t attribute
;
645 grub_efi_int32_t cursor_column
;
646 grub_efi_int32_t cursor_row
;
647 grub_efi_boolean_t cursor_visible
;
649 typedef struct grub_efi_simple_text_output_mode grub_efi_simple_text_output_mode_t
;
652 struct grub_efi_table_header
654 grub_efi_uint64_t signature
;
655 grub_efi_uint32_t revision
;
656 grub_efi_uint32_t header_size
;
657 grub_efi_uint32_t crc32
;
658 grub_efi_uint32_t reserved
;
660 typedef struct grub_efi_table_header grub_efi_table_header_t
;
662 struct grub_efi_boot_services
664 grub_efi_table_header_t hdr
;
667 (*raise_tpl
) (grub_efi_tpl_t new_tpl
);
670 (*restore_tpl
) (grub_efi_tpl_t old_tpl
);
673 (*allocate_pages
) (grub_efi_allocate_type_t type
,
674 grub_efi_memory_type_t memory_type
,
675 grub_efi_uintn_t pages
,
676 grub_efi_physical_address_t
*memory
);
679 (*free_pages
) (grub_efi_physical_address_t memory
,
680 grub_efi_uintn_t pages
);
683 (*get_memory_map
) (grub_efi_uintn_t
*memory_map_size
,
684 grub_efi_memory_descriptor_t
*memory_map
,
685 grub_efi_uintn_t
*map_key
,
686 grub_efi_uintn_t
*descriptor_size
,
687 grub_efi_uint32_t
*descriptor_version
);
690 (*allocate_pool
) (grub_efi_memory_type_t pool_type
,
691 grub_efi_uintn_t size
,
695 (*free_pool
) (void *buffer
);
698 (*create_event
) (grub_efi_uint32_t type
,
699 grub_efi_tpl_t notify_tpl
,
700 void (*notify_function
) (grub_efi_event_t event
,
702 void *notify_context
,
703 grub_efi_event_t
*event
);
706 (*set_timer
) (grub_efi_event_t event
,
707 grub_efi_timer_delay_t type
,
708 grub_efi_uint64_t trigger_time
);
711 (*wait_for_event
) (grub_efi_uintn_t num_events
,
712 grub_efi_event_t
*event
,
713 grub_efi_uintn_t
*index
);
716 (*signal_event
) (grub_efi_event_t event
);
719 (*close_event
) (grub_efi_event_t event
);
722 (*check_event
) (grub_efi_event_t event
);
725 (*install_protocol_interface
) (grub_efi_handle_t
*handle
,
726 grub_efi_guid_t
*protocol
,
727 grub_efi_interface_type_t interface_type
,
731 (*reinstall_protocol_interface
) (grub_efi_handle_t handle
,
732 grub_efi_guid_t
*protocol
,
734 void *new_interface
);
737 (*uninstall_protocol_interface
) (grub_efi_handle_t handle
,
738 grub_efi_guid_t
*protocol
,
742 (*handle_protocol
) (grub_efi_handle_t handle
,
743 grub_efi_guid_t
*protocol
,
749 (*register_protocol_notify
) (grub_efi_guid_t
*protocol
,
750 grub_efi_event_t event
,
751 void **registration
);
754 (*locate_handle
) (grub_efi_locate_search_type_t search_type
,
755 grub_efi_guid_t
*protocol
,
757 grub_efi_uintn_t
*buffer_size
,
758 grub_efi_handle_t
*buffer
);
761 (*locate_device_path
) (grub_efi_guid_t
*protocol
,
762 grub_efi_device_path_t
**device_path
,
763 grub_efi_handle_t
*device
);
766 (*install_configuration_table
) (grub_efi_guid_t
*guid
, void *table
);
769 (*load_image
) (grub_efi_boolean_t boot_policy
,
770 grub_efi_handle_t parent_image_handle
,
771 grub_efi_device_path_t
*file_path
,
773 grub_efi_uintn_t source_size
,
774 grub_efi_handle_t
*image_handle
);
777 (*start_image
) (grub_efi_handle_t image_handle
,
778 grub_efi_uintn_t
*exit_data_size
,
779 grub_efi_char16_t
**exit_data
);
782 (*exit
) (grub_efi_handle_t image_handle
,
783 grub_efi_status_t exit_status
,
784 grub_efi_uintn_t exit_data_size
,
785 grub_efi_char16_t
*exit_data
) __attribute__((noreturn
));
788 (*unload_image
) (grub_efi_handle_t image_handle
);
791 (*exit_boot_services
) (grub_efi_handle_t image_handle
,
792 grub_efi_uintn_t map_key
);
795 (*get_next_monotonic_count
) (grub_efi_uint64_t
*count
);
798 (*stall
) (grub_efi_uintn_t microseconds
);
801 (*set_watchdog_timer
) (grub_efi_uintn_t timeout
,
802 grub_efi_uint64_t watchdog_code
,
803 grub_efi_uintn_t data_size
,
804 grub_efi_char16_t
*watchdog_data
);
807 (*connect_controller
) (grub_efi_handle_t controller_handle
,
808 grub_efi_handle_t
*driver_image_handle
,
809 grub_efi_device_path_protocol_t
*remaining_device_path
,
810 grub_efi_boolean_t recursive
);
813 (*disconnect_controller
) (grub_efi_handle_t controller_handle
,
814 grub_efi_handle_t driver_image_handle
,
815 grub_efi_handle_t child_handle
);
818 (*open_protocol
) (grub_efi_handle_t handle
,
819 grub_efi_guid_t
*protocol
,
821 grub_efi_handle_t agent_handle
,
822 grub_efi_handle_t controller_handle
,
823 grub_efi_uint32_t attributes
);
826 (*close_protocol
) (grub_efi_handle_t handle
,
827 grub_efi_guid_t
*protocol
,
828 grub_efi_handle_t agent_handle
,
829 grub_efi_handle_t controller_handle
);
832 (*open_protocol_information
) (grub_efi_handle_t handle
,
833 grub_efi_guid_t
*protocol
,
834 grub_efi_open_protocol_information_entry_t
**entry_buffer
,
835 grub_efi_uintn_t
*entry_count
);
838 (*protocols_per_handle
) (grub_efi_handle_t handle
,
839 grub_efi_guid_t
***protocol_buffer
,
840 grub_efi_uintn_t
*protocol_buffer_count
);
843 (*locate_handle_buffer
) (grub_efi_locate_search_type_t search_type
,
844 grub_efi_guid_t
*protocol
,
846 grub_efi_uintn_t
*no_handles
,
847 grub_efi_handle_t
**buffer
);
850 (*locate_protocol
) (grub_efi_guid_t
*protocol
,
855 (*install_multiple_protocol_interfaces
) (grub_efi_handle_t
*handle
, ...);
858 (*uninstall_multiple_protocol_interfaces
) (grub_efi_handle_t handle
, ...);
861 (*calculate_crc32
) (void *data
,
862 grub_efi_uintn_t data_size
,
863 grub_efi_uint32_t
*crc32
);
866 (*copy_mem
) (void *destination
, void *source
, grub_efi_uintn_t length
);
869 (*set_mem
) (void *buffer
, grub_efi_uintn_t size
, grub_efi_uint8_t value
);
871 typedef struct grub_efi_boot_services grub_efi_boot_services_t
;
873 struct grub_efi_runtime_services
875 grub_efi_table_header_t hdr
;
878 (*get_time
) (grub_efi_time_t
*time
,
879 grub_efi_time_capabilities_t
*capabilities
);
882 (*set_time
) (grub_efi_time_t
*time
);
885 (*get_wakeup_time
) (grub_efi_boolean_t
*enabled
,
886 grub_efi_boolean_t
*pending
,
887 grub_efi_time_t
*time
);
890 (*set_wakeup_time
) (grub_efi_boolean_t enabled
,
891 grub_efi_time_t
*time
);
894 (*set_virtual_address_map
) (grub_efi_uintn_t memory_map_size
,
895 grub_efi_uintn_t descriptor_size
,
896 grub_efi_uint32_t descriptor_version
,
897 grub_efi_memory_descriptor_t
*virtual_map
);
900 (*convert_pointer
) (grub_efi_uintn_t debug_disposition
, void **address
);
903 (*get_variable
) (grub_efi_char16_t
*variable_name
,
904 grub_efi_guid_t
*vendor_guid
,
905 grub_efi_uint32_t
*attributes
,
906 grub_efi_uintn_t
*data_size
,
910 (*get_next_variable_name
) (grub_efi_uintn_t
*variable_name_size
,
911 grub_efi_char16_t
*variable_name
,
912 grub_efi_guid_t
*vendor_guid
);
915 (*set_variable
) (grub_efi_char16_t
*variable_name
,
916 grub_efi_guid_t
*vendor_guid
,
917 grub_efi_uint32_t attributes
,
918 grub_efi_uintn_t data_size
,
922 (*get_next_high_monotonic_count
) (grub_efi_uint32_t
*high_count
);
925 (*reset_system
) (grub_efi_reset_type_t reset_type
,
926 grub_efi_status_t reset_status
,
927 grub_efi_uintn_t data_size
,
928 grub_efi_char16_t
*reset_data
);
930 typedef struct grub_efi_runtime_services grub_efi_runtime_services_t
;
932 struct grub_efi_configuration_table
934 grub_efi_guid_t vendor_guid
;
936 } __attribute__ ((packed
));
937 typedef struct grub_efi_configuration_table grub_efi_configuration_table_t
;
939 #define GRUB_EFIEMU_SYSTEM_TABLE_SIGNATURE 0x5453595320494249LL
940 #define GRUB_EFIEMU_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552LL
942 struct grub_efi_simple_input_interface
945 (*reset
) (struct grub_efi_simple_input_interface
*this,
946 grub_efi_boolean_t extended_verification
);
949 (*read_key_stroke
) (struct grub_efi_simple_input_interface
*this,
950 grub_efi_input_key_t
*key
);
952 grub_efi_event_t wait_for_key
;
954 typedef struct grub_efi_simple_input_interface grub_efi_simple_input_interface_t
;
956 struct grub_efi_simple_text_output_interface
959 (*reset
) (struct grub_efi_simple_text_output_interface
*this,
960 grub_efi_boolean_t extended_verification
);
963 (*output_string
) (struct grub_efi_simple_text_output_interface
*this,
964 grub_efi_char16_t
*string
);
967 (*test_string
) (struct grub_efi_simple_text_output_interface
*this,
968 grub_efi_char16_t
*string
);
971 (*query_mode
) (struct grub_efi_simple_text_output_interface
*this,
972 grub_efi_uintn_t mode_number
,
973 grub_efi_uintn_t
*columns
,
974 grub_efi_uintn_t
*rows
);
977 (*set_mode
) (struct grub_efi_simple_text_output_interface
*this,
978 grub_efi_uintn_t mode_number
);
981 (*set_attributes
) (struct grub_efi_simple_text_output_interface
*this,
982 grub_efi_uintn_t attribute
);
985 (*clear_screen
) (struct grub_efi_simple_text_output_interface
*this);
988 (*set_cursor_position
) (struct grub_efi_simple_text_output_interface
*this,
989 grub_efi_uintn_t column
,
990 grub_efi_uintn_t row
);
993 (*enable_cursor
) (struct grub_efi_simple_text_output_interface
*this,
994 grub_efi_boolean_t visible
);
996 grub_efi_simple_text_output_mode_t
*mode
;
998 typedef struct grub_efi_simple_text_output_interface grub_efi_simple_text_output_interface_t
;
1000 #define GRUB_EFI_BLACK 0x00
1001 #define GRUB_EFI_BLUE 0x01
1002 #define GRUB_EFI_GREEN 0x02
1003 #define GRUB_EFI_CYAN 0x03
1004 #define GRUB_EFI_RED 0x04
1005 #define GRUB_EFI_MAGENTA 0x05
1006 #define GRUB_EFI_BROWN 0x06
1007 #define GRUB_EFI_LIGHTGRAY 0x07
1008 #define GRUB_EFI_BRIGHT 0x08
1009 #define GRUB_EFI_DARKGRAY 0x08
1010 #define GRUB_EFI_LIGHTBLUE 0x09
1011 #define GRUB_EFI_LIGHTGREEN 0x0A
1012 #define GRUB_EFI_LIGHTCYAN 0x0B
1013 #define GRUB_EFI_LIGHTRED 0x0C
1014 #define GRUB_EFI_LIGHTMAGENTA 0x0D
1015 #define GRUB_EFI_YELLOW 0x0E
1016 #define GRUB_EFI_WHITE 0x0F
1018 #define GRUB_EFI_BACKGROUND_BLACK 0x00
1019 #define GRUB_EFI_BACKGROUND_BLUE 0x10
1020 #define GRUB_EFI_BACKGROUND_GREEN 0x20
1021 #define GRUB_EFI_BACKGROUND_CYAN 0x30
1022 #define GRUB_EFI_BACKGROUND_RED 0x40
1023 #define GRUB_EFI_BACKGROUND_MAGENTA 0x50
1024 #define GRUB_EFI_BACKGROUND_BROWN 0x60
1025 #define GRUB_EFI_BACKGROUND_LIGHTGRAY 0x70
1027 #define GRUB_EFI_TEXT_ATTR(fg, bg) ((fg) | ((bg)))
1029 struct grub_efi_system_table
1031 grub_efi_table_header_t hdr
;
1032 grub_efi_char16_t
*firmware_vendor
;
1033 grub_efi_uint32_t firmware_revision
;
1034 grub_efi_handle_t console_in_handler
;
1035 grub_efi_simple_input_interface_t
*con_in
;
1036 grub_efi_handle_t console_out_handler
;
1037 grub_efi_simple_text_output_interface_t
*con_out
;
1038 grub_efi_handle_t standard_error_handle
;
1039 grub_efi_simple_text_output_interface_t
*std_err
;
1040 grub_efi_runtime_services_t
*runtime_services
;
1041 grub_efi_boot_services_t
*boot_services
;
1042 grub_efi_uintn_t num_table_entries
;
1043 grub_efi_configuration_table_t
*configuration_table
;
1045 typedef struct grub_efi_system_table grub_efi_system_table_t
;
1047 struct grub_efi_loaded_image
1049 grub_efi_uint32_t revision
;
1050 grub_efi_handle_t parent_handle
;
1051 grub_efi_system_table_t
*system_table
;
1053 grub_efi_handle_t device_handle
;
1054 grub_efi_device_path_t
*file_path
;
1057 grub_efi_uint32_t load_options_size
;
1061 grub_efi_uint64_t image_size
;
1062 grub_efi_memory_type_t image_code_type
;
1063 grub_efi_memory_type_t image_data_type
;
1065 grub_efi_status_t (*unload
) (grub_efi_handle_t image_handle
);
1067 typedef struct grub_efi_loaded_image grub_efi_loaded_image_t
;
1069 struct grub_efi_disk_io
1071 grub_efi_uint64_t revision
;
1072 grub_efi_status_t (*read
) (struct grub_efi_disk_io
*this,
1073 grub_efi_uint32_t media_id
,
1074 grub_efi_uint64_t offset
,
1075 grub_efi_uintn_t buffer_size
,
1077 grub_efi_status_t (*write
) (struct grub_efi_disk_io
*this,
1078 grub_efi_uint32_t media_id
,
1079 grub_efi_uint64_t offset
,
1080 grub_efi_uintn_t buffer_size
,
1083 typedef struct grub_efi_disk_io grub_efi_disk_io_t
;
1085 struct grub_efi_block_io_media
1087 grub_efi_uint32_t media_id
;
1088 grub_efi_boolean_t removable_media
;
1089 grub_efi_boolean_t media_present
;
1090 grub_efi_boolean_t logical_partition
;
1091 grub_efi_boolean_t read_only
;
1092 grub_efi_boolean_t write_caching
;
1093 grub_efi_uint8_t pad
[3];
1094 grub_efi_uint32_t block_size
;
1095 grub_efi_uint32_t io_align
;
1096 grub_efi_uint8_t pad2
[4];
1097 grub_efi_lba_t last_block
;
1099 typedef struct grub_efi_block_io_media grub_efi_block_io_media_t
;
1101 struct grub_efi_block_io
1103 grub_efi_uint64_t revision
;
1104 grub_efi_block_io_media_t
*media
;
1105 grub_efi_status_t (*reset
) (struct grub_efi_block_io
*this,
1106 grub_efi_boolean_t extended_verification
);
1107 grub_efi_status_t (*read_blocks
) (struct grub_efi_block_io
*this,
1108 grub_efi_uint32_t media_id
,
1110 grub_efi_uintn_t buffer_size
,
1112 grub_efi_status_t (*write_blocks
) (struct grub_efi_block_io
*this,
1113 grub_efi_uint32_t media_id
,
1115 grub_efi_uintn_t buffer_size
,
1117 grub_efi_status_t (*flush_blocks
) (struct grub_efi_block_io
*this);
1119 typedef struct grub_efi_block_io grub_efi_block_io_t
;
1121 #if GRUB_TARGET_SIZEOF_VOID_P == 4
1123 #define efi_call_0(func) func()
1124 #define efi_call_1(func, a) func(a)
1125 #define efi_call_2(func, a, b) func(a, b)
1126 #define efi_call_3(func, a, b, c) func(a, b, c)
1127 #define efi_call_4(func, a, b, c, d) func(a, b, c, d)
1128 #define efi_call_5(func, a, b, c, d, e) func(a, b, c, d, e)
1129 #define efi_call_6(func, a, b, c, d, e, f) func(a, b, c, d, e, f)
1130 #define efi_call_10(func, a, b, c, d, e, f, g, h, i, j) func(a, b, c, d, e, f, g, h, i, j)
1134 #define efi_call_0(func) \
1136 #define efi_call_1(func, a) \
1137 efi_wrap_1(func, (grub_uint64_t) a)
1138 #define efi_call_2(func, a, b) \
1139 efi_wrap_2(func, (grub_uint64_t) a, (grub_uint64_t) b)
1140 #define efi_call_3(func, a, b, c) \
1141 efi_wrap_3(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c)
1142 #define efi_call_4(func, a, b, c, d) \
1143 efi_wrap_4(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c, \
1145 #define efi_call_5(func, a, b, c, d, e) \
1146 efi_wrap_5(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c, \
1147 (grub_uint64_t) d, (grub_uint64_t) e)
1148 #define efi_call_6(func, a, b, c, d, e, f) \
1149 efi_wrap_6(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c, \
1150 (grub_uint64_t) d, (grub_uint64_t) e, (grub_uint64_t) f)
1151 #define efi_call_10(func, a, b, c, d, e, f, g, h, i, j) \
1152 efi_wrap_10(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c, \
1153 (grub_uint64_t) d, (grub_uint64_t) e, (grub_uint64_t) f, (grub_uint64_t) g, \
1154 (grub_uint64_t) h, (grub_uint64_t) i, (grub_uint64_t) j)
1156 grub_uint64_t
EXPORT_FUNC(efi_wrap_0
) (void *func
);
1157 grub_uint64_t
EXPORT_FUNC(efi_wrap_1
) (void *func
, grub_uint64_t arg1
);
1158 grub_uint64_t
EXPORT_FUNC(efi_wrap_2
) (void *func
, grub_uint64_t arg1
,
1159 grub_uint64_t arg2
);
1160 grub_uint64_t
EXPORT_FUNC(efi_wrap_3
) (void *func
, grub_uint64_t arg1
,
1161 grub_uint64_t arg2
, grub_uint64_t arg3
);
1162 grub_uint64_t
EXPORT_FUNC(efi_wrap_4
) (void *func
, grub_uint64_t arg1
,
1163 grub_uint64_t arg2
, grub_uint64_t arg3
,
1164 grub_uint64_t arg4
);
1165 grub_uint64_t
EXPORT_FUNC(efi_wrap_5
) (void *func
, grub_uint64_t arg1
,
1166 grub_uint64_t arg2
, grub_uint64_t arg3
,
1167 grub_uint64_t arg4
, grub_uint64_t arg5
);
1168 grub_uint64_t
EXPORT_FUNC(efi_wrap_6
) (void *func
, grub_uint64_t arg1
,
1169 grub_uint64_t arg2
, grub_uint64_t arg3
,
1170 grub_uint64_t arg4
, grub_uint64_t arg5
,
1171 grub_uint64_t arg6
);
1172 grub_uint64_t
EXPORT_FUNC(efi_wrap_10
) (void *func
, grub_uint64_t arg1
,
1173 grub_uint64_t arg2
, grub_uint64_t arg3
,
1174 grub_uint64_t arg4
, grub_uint64_t arg5
,
1175 grub_uint64_t arg6
, grub_uint64_t arg7
,
1176 grub_uint64_t arg8
, grub_uint64_t arg9
,
1177 grub_uint64_t arg10
);
1180 #endif /* ! GRUB_EFI_API_HEADER */