summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-09-12 17:35:46 +0300
committerTom Rini <trini@konsulko.com>2019-09-12 17:35:46 +0300
commit3ee0284a163f7c3a20c8598e319ba1b5cddf6519 (patch)
tree5b21ac6490c7d07ef627d240da2a57580ee53b76 /include
parent5ba8b1254311d00e2bdd9e227b78bdb7e89e69dd (diff)
parent8262578535f18cdab95318828e6fd6464721ac54 (diff)
downloadu-boot-3ee0284a163f7c3a20c8598e319ba1b5cddf6519.tar.xz
Merge tag 'efi-2019-10-rc4-4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for v2019.10-rc4 (4) Fixes for the EFI_FILE_PROTOCOL: * correctly iterate over directories * correct Unicode conversion of file names * parameter checks
Diffstat (limited to 'include')
-rw-r--r--include/efi_api.h24
-rw-r--r--include/efi_loader.h16
2 files changed, 20 insertions, 20 deletions
diff --git a/include/efi_api.h b/include/efi_api.h
index cb895f31e5..37e56da460 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -1461,6 +1461,12 @@ struct efi_pxe_base_code_protocol {
#define EFI_FILE_PROTOCOL_REVISION2 0x00020000
#define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2
+struct efi_file_io_token {
+ struct efi_event *event;
+ efi_status_t status;
+ efi_uintn_t buffer_size;
+ void *buffer;};
+
struct efi_file_handle {
u64 rev;
efi_status_t (EFIAPI *open)(struct efi_file_handle *file,
@@ -1483,10 +1489,16 @@ struct efi_file_handle {
const efi_guid_t *info_type, efi_uintn_t buffer_size,
void *buffer);
efi_status_t (EFIAPI *flush)(struct efi_file_handle *file);
- /*
- * TODO: We currently only support EFI file protocol revision 0x00010000
- * while UEFI specs 2.4 - 2.7 prescribe revision 0x00020000.
- */
+ efi_status_t (EFIAPI *open_ex)(struct efi_file_handle *file,
+ struct efi_file_handle **new_handle,
+ u16 *file_name, u64 open_mode, u64 attributes,
+ struct efi_file_io_token *token);
+ efi_status_t (EFIAPI *read_ex)(struct efi_file_handle *file,
+ struct efi_file_io_token *token);
+ efi_status_t (EFIAPI *write_ex)(struct efi_file_handle *file,
+ struct efi_file_io_token *token);
+ efi_status_t (EFIAPI *flush_ex)(struct efi_file_handle *file,
+ struct efi_file_io_token *token);
};
#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION 0x00010000
@@ -1505,6 +1517,10 @@ struct efi_simple_file_system_protocol {
EFI_GUID(0x09576e93, 0x6d3f, 0x11d2, \
0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
+#define EFI_FILE_SYSTEM_VOLUME_LABEL_ID \
+ EFI_GUID(0xdb47d7d3, 0xfe81, 0x11d3, \
+ 0x9a, 0x35, 0x00, 0x90, 0x27, 0x3f, 0xC1, 0x4d)
+
#define EFI_FILE_MODE_READ 0x0000000000000001
#define EFI_FILE_MODE_WRITE 0x0000000000000002
#define EFI_FILE_MODE_CREATE 0x8000000000000000
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 00eba8afa4..dd24a2746c 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -555,22 +555,6 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr,
(((_dp)->type == DEVICE_PATH_TYPE_##_type) && \
((_dp)->sub_type == DEVICE_PATH_SUB_TYPE_##_subtype))
-/**
- * ascii2unicode() - convert ASCII string to UTF-16 string
- *
- * A zero terminated ASCII string is converted to a zero terminated UTF-16
- * string. The output buffer must be preassigned.
- *
- * @unicode: preassigned output buffer for UTF-16 string
- * @ascii: ASCII string to be converted
- */
-static inline void ascii2unicode(u16 *unicode, const char *ascii)
-{
- while (*ascii)
- *(unicode++) = *(ascii++);
- *unicode = 0;
-}
-
static inline int guidcmp(const void *g1, const void *g2)
{
return memcmp(g1, g2, sizeof(efi_guid_t));