efi_loader: EFI_UNICODE_COLLATION_PROTOCOL

The patch implements the EFI_UNICODE_COLLATION_PROTOCOL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Heinrich Schuchardt 2018-09-04 19:34:58 +02:00 committed by Alexander Graf
parent 1a1012a1c6
commit 0bc4b0da7b
8 changed files with 455 additions and 3 deletions

View file

@ -31,6 +31,7 @@ enum efi_timer_delay {
EFI_TIMER_RELATIVE = 2
};
#define efi_intn_t ssize_t
#define efi_uintn_t size_t
typedef uint16_t *efi_string_t;
@ -958,4 +959,24 @@ struct efi_driver_binding_protocol {
efi_handle_t driver_binding_handle;
};
#define EFI_UNICODE_COLLATION_PROTOCOL2_GUID \
EFI_GUID(0xa4c751fc, 0x23ae, 0x4c3e, \
0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49)
struct efi_unicode_collation_protocol {
efi_intn_t (EFIAPI *stri_coll)(
struct efi_unicode_collation_protocol *this, u16 *s1, u16 *s2);
bool (EFIAPI *metai_match)(struct efi_unicode_collation_protocol *this,
const u16 *string, const u16 *patter);
void (EFIAPI *str_lwr)(struct efi_unicode_collation_protocol
*this, u16 *string);
void (EFIAPI *str_upr)(struct efi_unicode_collation_protocol *this,
u16 *string);
void (EFIAPI *fat_to_str)(struct efi_unicode_collation_protocol *this,
efi_uintn_t fat_size, char *fat, u16 *string);
bool (EFIAPI *str_to_fat)(struct efi_unicode_collation_protocol *this,
const u16 *string, efi_uintn_t fat_size,
char *fat);
char *supported_languages;
};
#endif