diff options
author | xypron.glpk@gmx.de <xypron.glpk@gmx.de> | 2017-07-11 22:06:25 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2017-07-19 14:14:40 +0200 |
commit | cc5b70812f5e3b13ea9072c2dacc939818ef8e66 (patch) | |
tree | 122757ca40162ca3b81b02ad56e2031a20ff30d7 /include | |
parent | 88adae5ef057845f6bc69c63123df4332fe835b1 (diff) | |
download | u-boot-cc5b70812f5e3b13ea9072c2dacc939818ef8e66.tar.gz |
efi_loader: implement EFI_DEVICE_PATH_TO_TEXT_PROTOCOL
ConvertPathToText is implemented for
* type 4 - media device path
* subtype 4 - file path
This is the kind of device path we hand out for block devices.
All other cases may be implemented later.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[agraf: fix whitespace]
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/efi_api.h | 24 | ||||
-rw-r--r-- | include/efi_loader.h | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/include/efi_api.h b/include/efi_api.h index 42cd47ff08..ea63e80b47 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -395,6 +395,30 @@ struct efi_console_control_protocol uint16_t *password); }; +#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \ + EFI_GUID(0x8b843e20, 0x8132, 0x4852, \ + 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c) + +struct efi_device_path_protocol +{ + uint8_t type; + uint8_t sub_type; + uint16_t length; + uint8_t data[]; +}; + +struct efi_device_path_to_text_protocol +{ + uint16_t *(EFIAPI *convert_device_node_to_text)( + struct efi_device_path_protocol *device_node, + bool display_only, + bool allow_shortcuts); + uint16_t *(EFIAPI *convert_device_path_to_text)( + struct efi_device_path_protocol *device_path, + bool display_only, + bool allow_shortcuts); +}; + #define EFI_GOP_GUID \ EFI_GUID(0x9042a9de, 0x23dc, 0x4a38, \ 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a) diff --git a/include/efi_loader.h b/include/efi_loader.h index 6ea6e9ee4d..d7847d23e5 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -28,10 +28,12 @@ extern struct efi_system_table systab; extern const struct efi_simple_text_output_protocol efi_con_out; extern const struct efi_simple_input_interface efi_con_in; extern const struct efi_console_control_protocol efi_console_control; +extern const struct efi_device_path_to_text_protocol efi_device_path_to_text; 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 unsigned int __efi_runtime_start, __efi_runtime_stop; extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop; |