diff options
author | Matt Fleming <matt.fleming@intel.com> | 2011-08-11 05:28:06 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-12-09 20:35:51 -0500 |
commit | 55839d515495e766605d7aaabd9c2758370a8d27 (patch) | |
tree | ea38cabedd89edfeed5239e7623663104ac3aad8 | |
parent | e2527a7cbec073b69a251193f200a88efbced7ad (diff) |
efi: Add EFI file I/O data types
The x86 EFI stub needs to access files, for example when loading
initrd's. Add the required data types.
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Link: http://lkml.kernel.org/r/1318848017-12301-1-git-send-email-matt@console-pimps.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | include/linux/efi.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index d407c88f955f..37c300712e02 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -307,6 +307,12 @@ typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **capsules, | |||
307 | #define EFI_PCI_IO_PROTOCOL_GUID \ | 307 | #define EFI_PCI_IO_PROTOCOL_GUID \ |
308 | EFI_GUID( 0x4cf5b200, 0x68b8, 0x4ca5, 0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x2, 0x9a ) | 308 | EFI_GUID( 0x4cf5b200, 0x68b8, 0x4ca5, 0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x2, 0x9a ) |
309 | 309 | ||
310 | #define EFI_FILE_INFO_ID \ | ||
311 | EFI_GUID( 0x9576e92, 0x6d3f, 0x11d2, 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b ) | ||
312 | |||
313 | #define EFI_FILE_SYSTEM_GUID \ | ||
314 | EFI_GUID( 0x964e5b22, 0x6459, 0x11d2, 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b ) | ||
315 | |||
310 | typedef struct { | 316 | typedef struct { |
311 | efi_guid_t guid; | 317 | efi_guid_t guid; |
312 | unsigned long table; | 318 | unsigned long table; |
@@ -362,6 +368,40 @@ typedef struct { | |||
362 | unsigned long unload; | 368 | unsigned long unload; |
363 | } efi_loaded_image_t; | 369 | } efi_loaded_image_t; |
364 | 370 | ||
371 | typedef struct { | ||
372 | u64 revision; | ||
373 | void *open_volume; | ||
374 | } efi_file_io_interface_t; | ||
375 | |||
376 | typedef struct { | ||
377 | u64 size; | ||
378 | u64 file_size; | ||
379 | u64 phys_size; | ||
380 | efi_time_t create_time; | ||
381 | efi_time_t last_access_time; | ||
382 | efi_time_t modification_time; | ||
383 | __aligned_u64 attribute; | ||
384 | efi_char16_t filename[1]; | ||
385 | } efi_file_info_t; | ||
386 | |||
387 | typedef struct { | ||
388 | u64 revision; | ||
389 | void *open; | ||
390 | void *close; | ||
391 | void *delete; | ||
392 | void *read; | ||
393 | void *write; | ||
394 | void *get_position; | ||
395 | void *set_position; | ||
396 | void *get_info; | ||
397 | void *set_info; | ||
398 | void *flush; | ||
399 | } efi_file_handle_t; | ||
400 | |||
401 | #define EFI_FILE_MODE_READ 0x0000000000000001 | ||
402 | #define EFI_FILE_MODE_WRITE 0x0000000000000002 | ||
403 | #define EFI_FILE_MODE_CREATE 0x8000000000000000 | ||
404 | |||
365 | #define EFI_INVALID_TABLE_ADDR (~0UL) | 405 | #define EFI_INVALID_TABLE_ADDR (~0UL) |
366 | 406 | ||
367 | /* | 407 | /* |