From 2a92080d8c4463f2ddbf4e3110c25ab55ef6ca3f Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 13 Sep 2017 18:05:34 -0400 Subject: efi_loader: add file/filesys support fallback.efi (and probably other things) use UEFI's simple-file-system protocol and file support to search for OS's to boot. Signed-off-by: Rob Clark [agraf: whitespace fixes, unsigned fixes] Signed-off-by: Alexander Graf --- include/efi_loader.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/efi_loader.h') diff --git a/include/efi_loader.h b/include/efi_loader.h index 8752bcf..9cb0644 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -86,6 +86,8 @@ extern const efi_guid_t efi_guid_console_control; extern const efi_guid_t efi_guid_device_path; extern const efi_guid_t efi_guid_loaded_image; extern const efi_guid_t efi_guid_device_path_to_text_protocol; +extern const efi_guid_t efi_simple_file_system_protocol_guid; +extern const efi_guid_t efi_file_info_guid; extern unsigned int __efi_runtime_start, __efi_runtime_stop; extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop; @@ -163,6 +165,9 @@ int efi_net_register(void); /* Called by bootefi to make SMBIOS tables available */ void efi_smbios_register(void); +struct efi_simple_file_system_protocol * +efi_fs_from_path(struct efi_device_path *fp); + /* Called by networking code to memorize the dhcp ack package */ void efi_net_set_dhcp_ack(void *pkt, int len); @@ -191,6 +196,14 @@ efi_status_t efi_set_timer(struct efi_event *event, enum efi_timer_delay type, /* Call this to signal an event */ void efi_signal_event(struct efi_event *event); +/* open file system: */ +struct efi_simple_file_system_protocol *efi_simple_file_system( + struct blk_desc *desc, int part, struct efi_device_path *dp); + +/* open file from device-path: */ +struct efi_file_handle *efi_file_from_path(struct efi_device_path *fp); + + /* Generic EFI memory allocator, call this to get memory */ void *efi_alloc(uint64_t len, int memory_type); /* More specific EFI memory allocator, called by EFI payloads */ -- cgit v1.1