[U-Boot] [PATCH v1 02/12] efi_loader: add stub HII protocols
Heinrich Schuchardt
xypron.glpk at gmx.de
Wed Oct 4 17:45:43 UTC 2017
On 09/10/2017 03:22 PM, Rob Clark wrote:
> From: Leif Lindholm <leif.lindholm at linaro.org>
>
> EfiHiiConfigRoutingProtocolGuid
> EfiHiiDatabaseProtocol
> EfiHiiStringProtocol
Please, provide a proper commit message.
Resolve all issues reported by checkpatch.
>
> Signed-off-by: Leif Lindholm <leif.lindholm at linaro.org>
> ---
> include/efi_api.h | 204 ++++++++++++++++++++++++++++
> include/efi_loader.h | 6 +
> lib/efi_loader/Makefile | 2 +-
> lib/efi_loader/efi_boottime.c | 9 ++
> lib/efi_loader/efi_hii.c | 303 ++++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 523 insertions(+), 1 deletion(-)
> create mode 100644 lib/efi_loader/efi_hii.c
>
> diff --git a/include/efi_api.h b/include/efi_api.h
> index 57468dd972..932a3429a8 100644
> --- a/include/efi_api.h
> +++ b/include/efi_api.h
> @@ -536,6 +536,210 @@ struct efi_device_path_utilities_protocol
> const struct efi_device_path *device_path);
> };
>
> +#define EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID \
> + EFI_GUID(0x587e72d7, 0xcc50, 0x4f79, \
> + 0x82, 0x09, 0xca, 0x29, 0x1f, 0xc1, 0xa1, 0x0f)
> +
> +struct efi_hii_config_routing_protocol
> +{
ERROR: open brace '{' following struct go on the same line
#34: FILE: include/efi_api.h:544:
+struct efi_hii_config_routing_protocol
+{
> + efi_status_t(EFIAPI *extract_config)(
> + const struct efi_hii_config_routing_protocol *this,
> + const efi_string_t request,
> + efi_string_t *progress,
> + efi_string_t *results);
> + efi_status_t(EFIAPI *export_config)(
> + const struct efi_hii_config_routing_protocol *this,
> + efi_string_t *results);
> + efi_status_t(EFIAPI *route_config)(
> + const struct efi_hii_config_routing_protocol *this,
> + const efi_string_t configuration,
> + efi_string_t *progress);
> + efi_status_t(EFIAPI *block_to_config)(
> + const struct efi_hii_config_routing_protocol *this,
> + const efi_string_t config_request,
> + const uint8_t *block,
> + const UINTN block_size,
> + efi_string_t *config,
> + efi_string_t *progress);
> + efi_status_t(EFIAPI *config_to_block)(
> + const struct efi_hii_config_routing_protocol *this,
> + const efi_string_t config_resp,
> + const uint8_t *block,
> + const UINTN *block_size,
> + efi_string_t *progress);
> + efi_status_t(EFIAPI *get_alt_config)(
> + const struct efi_hii_config_routing_protocol *this,
> + const efi_string_t config_resp,
> + const efi_guid_t *guid,
> + const efi_string_t name,
> + const struct efi_device_path *device_path,
> + const efi_string_t alt_cfg_id,
> + efi_string_t *alt_cfg_resp);
> +};
> +
> +#define EFI_HII_DATABASE_PROTOCOL_GUID \
> + EFI_GUID(0xef9fc172, 0xa1b2, 0x4693, \
> + 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42)
> +
> +typedef enum {
We do not use CamelCase.
> + EfiKeyLCtrl, EfiKeyA0, EfiKeyLAlt, EfiKeySpaceBar,
> + EfiKeyA2, EfiKeyA3, EfiKeyA4, EfiKeyRCtrl, EfiKeyLeftArrow,
> + EfiKeyDownArrow, EfiKeyRightArrow, EfiKeyZero,
> + EfiKeyPeriod, EfiKeyEnter, EfiKeyLShift, EfiKeyB0,
> + EfiKeyB1, EfiKeyB2, EfiKeyB3, EfiKeyB4, EfiKeyB5, EfiKeyB6,
> + EfiKeyB7, EfiKeyB8, EfiKeyB9, EfiKeyB10, EfiKeyRShift,
> + EfiKeyUpArrow, EfiKeyOne, EfiKeyTwo, EfiKeyThree,
> + EfiKeyCapsLock, EfiKeyC1, EfiKeyC2, EfiKeyC3, EfiKeyC4,
> + EfiKeyC5, EfiKeyC6, EfiKeyC7, EfiKeyC8, EfiKeyC9,
> + EfiKeyC10, EfiKeyC11, EfiKeyC12, EfiKeyFour, EfiKeyFive,
> + EfiKeySix, EfiKeyPlus, EfiKeyTab, EfiKeyD1, EfiKeyD2,
> + EfiKeyD3, EfiKeyD4, EfiKeyD5, EfiKeyD6, EfiKeyD7, EfiKeyD8,
> + EfiKeyD9, EfiKeyD10, EfiKeyD11, EfiKeyD12, EfiKeyD13,
> + EfiKeyDel, EfiKeyEnd, EfiKeyPgDn, EfiKeySeven, EfiKeyEight,
> + EfiKeyNine, EfiKeyE0, EfiKeyE1, EfiKeyE2, EfiKeyE3,
> + EfiKeyE4, EfiKeyE5, EfiKeyE6, EfiKeyE7, EfiKeyE8, EfiKeyE9,
> + EfiKeyE10, EfiKeyE11, EfiKeyE12, EfiKeyBackSpace,
> + EfiKeyIns, EfiKeyHome, EfiKeyPgUp, EfiKeyNLck, EfiKeySlash,
> + EfiKeyAsterisk, EfiKeyMinus, EfiKeyEsc, EfiKeyF1, EfiKeyF2,
> + EfiKeyF3, EfiKeyF4, EfiKeyF5, EfiKeyF6, EfiKeyF7, EfiKeyF8,
> + EfiKeyF9, EfiKeyF10, EfiKeyF11, EfiKeyF12, EfiKeyPrint,
> + EfiKeySLck, EfiKeyPause
> +} efi_key;
> +
> +struct efi_key_descriptor
> +{
> + efi_key key;
> + uint16_t unicode;
> + uint16_t shifted_unicode;
> + uint16_t alt_gr_unicode;
> + uint16_t shifted_alt_gr_unicode;
> + uint16_t modifier;
> + uint16_t affected_attribute;
> +};
> +
> +struct efi_hii_keyboard_layout
> +{
> + uint16_t layout_length;
> + efi_guid_t guid;
> + uint32_t layout_descriptor_string_offset;
> + uint8_t descriptor_count;
> + struct efi_key_descriptor descriptors[];
> +};
> +
> +struct efi_hii_package_list_header
> +{
> + efi_guid_t package_list_guid;
> + uint32_t package_length;
> +};
> +
> +typedef void *efi_hii_handle_t;
> +
> +struct efi_hii_database_protocol
> +{
> + efi_status_t(EFIAPI *new_package_list)(
> + const struct efi_hii_database_protocol *this,
> + const struct efi_hii_package_list_header *package_list,
> + const efi_handle_t driver_handle,
> + efi_hii_handle_t *handle);
> + efi_status_t(EFIAPI *remove_package_list)(
> + const struct efi_hii_database_protocol *this,
> + efi_hii_handle_t handle);
> + efi_status_t(EFIAPI *update_package_list)(
> + const struct efi_hii_database_protocol *this,
> + efi_hii_handle_t handle,
> + const struct efi_hii_package_list_header *package_list);
> + efi_status_t(EFIAPI *list_package_lists)(
> + const struct efi_hii_database_protocol *this,
> + uint8_t package_type,
> + const efi_guid_t *package_guid,
> + UINTN *handle_buffer_length,
> + efi_hii_handle_t *handle);
> + efi_status_t(EFIAPI *export_package_lists)(
> + const struct efi_hii_database_protocol *this,
> + efi_hii_handle_t handle,
> + UINTN *buffer_size,
> + struct efi_hii_package_list_header *buffer);
> + efi_status_t(EFIAPI *register_package_notify)(
> + const struct efi_hii_database_protocol *this,
> + uint8_t package_type,
> + const efi_guid_t *package_guid,
> + const void *package_notify_fn,
> + UINTN notify_type,
> + efi_handle_t *notify_handle);
> + efi_status_t(EFIAPI *unregister_package_notify)(
> + const struct efi_hii_database_protocol *this,
> + efi_handle_t notification_handle
> + );
> + efi_status_t(EFIAPI *find_keyboard_layouts)(
> + const struct efi_hii_database_protocol *this,
> + uint16_t *key_guid_buffer_length,
> + efi_guid_t *key_guid_buffer);
> + efi_status_t(EFIAPI *get_keyboard_layout)(
> + const struct efi_hii_database_protocol *this,
> + efi_guid_t *key_guid,
> + uint16_t *keyboard_layout_length,
> + struct efi_hii_keyboard_layout *keyboard_layout);
> + efi_status_t(EFIAPI *set_keyboard_layout)(
> + const struct efi_hii_database_protocol *this,
> + efi_guid_t *key_guid);
> + efi_status_t(EFIAPI *get_package_list_handle)(
> + const struct efi_hii_database_protocol *this,
> + efi_hii_handle_t package_list_handle,
> + efi_handle_t *driver_handle);
> +};
> +
> +#define EFI_HII_STRING_PROTOCOL_GUID \
> + EFI_GUID(0x0fd96974, 0x23aa, 0x4cdc, \
> + 0xb9, 0xcb, 0x98, 0xd1, 0x77, 0x50, 0x32, 0x2a)
> +
> +typedef uint32_t efi_hii_font_style_t;
> +typedef uint16_t efi_string_id_t;
> +
> +struct efi_font_info
> +{
> + efi_hii_font_style_t font_style;
> + uint16_t font_size;
> + uint16_t font_name[1];
> +};
> +
> +struct efi_hii_string_protocol
> +{
> + efi_status_t(EFIAPI *new_string)(
> + const struct efi_hii_string_protocol *this,
> + efi_hii_handle_t package_list,
> + efi_string_id_t *string_id,
> + const uint8_t *language,
> + const uint16_t *language_name,
> + const efi_string_t string,
> + const struct efi_font_info *string_font_info);
> + efi_status_t(EFIAPI *get_string)(
> + const struct efi_hii_string_protocol *this,
> + const uint8_t *language,
> + efi_hii_handle_t package_list,
> + efi_string_id_t string_id,
> + efi_string_t string,
> + UINTN *string_size,
> + struct efi_font_info **string_font_info);
> + efi_status_t(EFIAPI *set_string)(
> + const struct efi_hii_string_protocol *this,
> + efi_hii_handle_t package_list,
> + efi_string_id_t string_id,
> + const uint8_t *language,
> + const efi_string_t string,
> + const struct efi_font_info *string_font_info);
> + efi_status_t(EFIAPI *get_languages)(
> + const struct efi_hii_string_protocol *this,
> + efi_hii_handle_t package_list,
> + uint8_t *languages,
> + UINTN *languages_size);
> + efi_status_t(EFIAPI *get_secondary_languages)(
> + const struct efi_hii_string_protocol *this,
> + efi_hii_handle_t package_list,
> + const uint8_t *primary_language,
> + uint8_t *secondary_languages,
> + UINTN *secondary_languages_size);
> +};
> +
> #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 c009828db9..a89bb2fcd9 100644
> --- a/include/efi_loader.h
> +++ b/include/efi_loader.h
> @@ -59,6 +59,9 @@ extern 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 struct efi_device_path_utilities_protocol efi_device_path_utilities;
> +extern const struct efi_hii_config_routing_protocol efi_hii_config_routing;
> +extern const struct efi_hii_database_protocol efi_hii_database;
> +extern const struct efi_hii_string_protocol efi_hii_string;
>
> uint16_t *efi_dp_str(struct efi_device_path *dp);
>
> @@ -70,6 +73,9 @@ 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 const efi_guid_t efi_guid_device_path_utilities_protocol;
> +extern const efi_guid_t efi_guid_hii_config_routing_protocol;
> +extern const efi_guid_t efi_guid_hii_database_protocol;
> +extern const efi_guid_t efi_guid_hii_string_protocol;
>
> extern unsigned int __efi_runtime_start, __efi_runtime_stop;
> extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop;
> diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile
> index f5e69dd078..e8fd6823a3 100644
> --- a/lib/efi_loader/Makefile
> +++ b/lib/efi_loader/Makefile
> @@ -16,7 +16,7 @@ always := $(efiprogs-y)
> obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o
> obj-y += efi_image_loader.o efi_boottime.o efi_runtime.o efi_console.o
> obj-y += efi_memory.o efi_device_path_to_text.o efi_device_path.o
> -obj-y += efi_device_path_utilities.o
> +obj-y += efi_device_path_utilities.o efi_hii.o
> obj-y += efi_file.o efi_variable.o efi_bootmgr.o
> obj-$(CONFIG_LCD) += efi_gop.o
> obj-$(CONFIG_DM_VIDEO) += efi_gop.o
> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
> index 8bb243d673..4d1a16051b 100644
> --- a/lib/efi_loader/efi_boottime.c
> +++ b/lib/efi_loader/efi_boottime.c
> @@ -779,6 +779,15 @@ void efi_setup_loaded_image(struct efi_loaded_image *info, struct efi_object *ob
> obj->protocols[4].protocol_interface =
> (void *)&efi_device_path_utilities;
>
> + obj->protocols[5].guid = &efi_guid_hii_string_protocol;
> + obj->protocols[5].protocol_interface = (void *)&efi_hii_string;
> +
> + obj->protocols[6].guid = &efi_guid_hii_database_protocol;
> + obj->protocols[6].protocol_interface = (void *)&efi_hii_database;
> +
> + obj->protocols[7].guid = &efi_guid_hii_config_routing_protocol;
> + obj->protocols[7].protocol_interface = (void *)&efi_hii_config_routing;
> +
> info->file_path = file_path;
> info->device_handle = efi_dp_find_obj(device_path, NULL);
>
> diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c
> new file mode 100644
> index 0000000000..cc68a28d2b
> --- /dev/null
> +++ b/lib/efi_loader/efi_hii.c
> @@ -0,0 +1,303 @@
> +/*
> + * EFI Human Interface Infrastructure ... interface
> + *
> + * Copyright (c) 2017 Leif Lindholm
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#include <common.h>
> +#include <efi_loader.h>
> +
> +const efi_guid_t efi_guid_hii_config_routing_protocol =
> + EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID;
> +const efi_guid_t efi_guid_hii_database_protocol = EFI_HII_DATABASE_PROTOCOL_GUID;
> +const efi_guid_t efi_guid_hii_string_protocol = EFI_HII_STRING_PROTOCOL_GUID;
> +
> +
> +/*
> + * EFI_HII_CONFIG_ROUTING_PROTOCOL
> + */
None of the functions below matches the definitions in the structures.
Please, add the missing EFIAPI.
Regards
Heinrich
> +
> +static efi_status_t extract_config(
> + const struct efi_hii_config_routing_protocol *this,
> + const efi_string_t request,
> + efi_string_t *progress,
> + efi_string_t *results)
> +{
> + EFI_ENTRY("%p, \"%ls\", %p, %p", this, request, progress, results);
> + return EFI_EXIT(EFI_OUT_OF_RESOURCES);
> +}
> +
> +static efi_status_t export_config(
> + const struct efi_hii_config_routing_protocol *this,
> + efi_string_t *results)
> +{
> + EFI_ENTRY("%p, %p", this, results);
> + return EFI_EXIT(EFI_OUT_OF_RESOURCES);
> +}
> +
> +static efi_status_t route_config(
> + const struct efi_hii_config_routing_protocol *this,
> + const efi_string_t configuration,
> + efi_string_t *progress)
> +{
> + EFI_ENTRY("%p, \"%ls\", %p", this, configuration, progress);
> + return EFI_EXIT(EFI_OUT_OF_RESOURCES);
> +}
> +
> +static efi_status_t block_to_config(
> + const struct efi_hii_config_routing_protocol *this,
> + const efi_string_t config_request,
> + const uint8_t *block,
> + const UINTN block_size,
> + efi_string_t *config,
> + efi_string_t *progress)
> +{
> + EFI_ENTRY("%p, \"%ls\", %p, %lu, %p, %p", this, config_request, block,
> + block_size, config, progress);
> + return EFI_EXIT(EFI_OUT_OF_RESOURCES);
> +}
> +
> +static efi_status_t config_to_block(
> + const struct efi_hii_config_routing_protocol *this,
> + const efi_string_t config_resp,
> + const uint8_t *block,
> + const UINTN *block_size,
> + efi_string_t *progress)
> +{
> + EFI_ENTRY("%p, \"%ls\", %p, %p, %p", this, config_resp, block,
> + block_size, progress);
> + return EFI_EXIT(EFI_OUT_OF_RESOURCES);
> +}
> +
> +static efi_status_t get_alt_config(
> + const struct efi_hii_config_routing_protocol *this,
> + const efi_string_t config_resp,
> + const efi_guid_t *guid,
> + const efi_string_t name,
> + const struct efi_device_path *device_path,
> + const efi_string_t alt_cfg_id,
> + efi_string_t *alt_cfg_resp)
> +{
> + EFI_ENTRY("%p, \"%ls\", %pUl, \"%ls\", %p, \"%ls\", %p", this,
> + config_resp, guid, name, device_path, alt_cfg_id,
> + alt_cfg_resp);
> + return EFI_EXIT(EFI_OUT_OF_RESOURCES);
> +}
> +
> +
> +/*
> + * EFI_HII_DATABASE_PROTOCOL
> + */
> +
> +static efi_status_t new_package_list(
> + const struct efi_hii_database_protocol *this,
> + const struct efi_hii_package_list_header *package_list,
> + const efi_handle_t driver_handle,
> + efi_hii_handle_t *handle)
> +{
> + /* Current shell start failure. */
> + /* Invoked from MdeModulePkg/Library/UefiHiiLib/HiiLib.c : HiiAddPackages */
> + /* (Via autogenerated .c file.) */
> + EFI_ENTRY("%p, %p, %p, %p", this, package_list, driver_handle, handle);
> + return EFI_EXIT(EFI_OUT_OF_RESOURCES);
> +}
> +
> +static efi_status_t remove_package_list(
> + const struct efi_hii_database_protocol *this,
> + efi_hii_handle_t handle)
> +{
> + EFI_ENTRY("%p, %p", this, handle);
> + return EFI_EXIT(EFI_NOT_FOUND);
> +}
> +
> +static efi_status_t update_package_list(
> + const struct efi_hii_database_protocol *this,
> + efi_hii_handle_t handle,
> + const struct efi_hii_package_list_header *package_list)
> +{
> + EFI_ENTRY("%p, %p, %p", this, handle, package_list);
> + return EFI_EXIT(EFI_NOT_FOUND);
> +}
> +
> +static efi_status_t list_package_lists(
> + const struct efi_hii_database_protocol *this,
> + uint8_t package_type,
> + const efi_guid_t *package_guid,
> + UINTN *handle_buffer_length,
> + efi_hii_handle_t *handle)
> +{
> + EFI_ENTRY("%p, %u, %pUl, %p, %p", this, package_type, package_guid,
> + handle_buffer_length, handle);
> + return EFI_EXIT(EFI_NOT_FOUND);
> +}
> +
> +static efi_status_t export_package_lists(
> + const struct efi_hii_database_protocol *this,
> + efi_hii_handle_t handle,
> + UINTN *buffer_size,
> + struct efi_hii_package_list_header *buffer)
> +{
> + EFI_ENTRY("%p, %p, %p, %p", this, handle, buffer_size, buffer);
> + return EFI_EXIT(EFI_NOT_FOUND);
> +}
> +
> +static efi_status_t register_package_notify(
> + const struct efi_hii_database_protocol *this,
> + uint8_t package_type,
> + const efi_guid_t *package_guid,
> + const void *package_notify_fn,
> + UINTN notify_type,
> + efi_handle_t *notify_handle)
> +{
> + EFI_ENTRY("%p, %u, %pUl, %p, %lu, %p", this, package_type,
> + package_guid, package_notify_fn, notify_type,
> + notify_handle);
> + return EFI_EXIT(EFI_OUT_OF_RESOURCES);
> +}
> +
> +static efi_status_t unregister_package_notify(
> + const struct efi_hii_database_protocol *this,
> + efi_handle_t notification_handle)
> +{
> + EFI_ENTRY("%p, %p", this, notification_handle);
> + return EFI_EXIT(EFI_NOT_FOUND);
> +}
> +
> +static efi_status_t find_keyboard_layouts(
> + const struct efi_hii_database_protocol *this,
> + uint16_t *key_guid_buffer_length,
> + efi_guid_t *key_guid_buffer)
> +{
> + EFI_ENTRY("%p, %p, %p", this, key_guid_buffer_length, key_guid_buffer);
> + return EFI_EXIT(EFI_NOT_FOUND); /* Invalid */
> +}
> +
> +static efi_status_t get_keyboard_layout(
> + const struct efi_hii_database_protocol *this,
> + efi_guid_t *key_guid,
> + uint16_t *keyboard_layout_length,
> + struct efi_hii_keyboard_layout *keyboard_layout)
> +{
> + EFI_ENTRY("%p, %pUl, %p, %p", this, key_guid, keyboard_layout_length,
> + keyboard_layout);
> + return EFI_EXIT(EFI_NOT_FOUND);
> +}
> +
> +static efi_status_t set_keyboard_layout(
> + const struct efi_hii_database_protocol *this,
> + efi_guid_t *key_guid)
> +{
> + EFI_ENTRY("%p, %pUl", this, key_guid);
> + return EFI_EXIT(EFI_NOT_FOUND);
> +}
> +
> +static efi_status_t get_package_list_handle(
> + const struct efi_hii_database_protocol *this,
> + efi_hii_handle_t package_list_handle,
> + efi_handle_t *driver_handle)
> +{
> + EFI_ENTRY("%p, %p, %p", this, package_list_handle, driver_handle);
> + return EFI_EXIT(EFI_INVALID_PARAMETER);
> +}
> +
> +
> +/*
> + * EFI_HII_STRING_PROTOCOL
> + */
> +
> +static efi_status_t new_string(
> + const struct efi_hii_string_protocol *this,
> + efi_hii_handle_t package_list,
> + efi_string_id_t *string_id,
> + const uint8_t *language,
> + const uint16_t *language_name,
> + const efi_string_t string,
> + const struct efi_font_info *string_font_info)
> +{
> + EFI_ENTRY("%p, %p, %p, %p, %p, \"%ls\", %p", this, package_list,
> + string_id, language, language_name, string,
> + string_font_info);
> + return EFI_EXIT(EFI_NOT_FOUND);
> +}
> +
> +static efi_status_t get_string(
> + const struct efi_hii_string_protocol *this,
> + const uint8_t *language,
> + efi_hii_handle_t package_list,
> + efi_string_id_t string_id,
> + efi_string_t string,
> + UINTN *string_size,
> + struct efi_font_info **string_font_info)
> +{
> + EFI_ENTRY("%p, %p, %p, %u, \"%ls\", %p, %p", this, language,
> + package_list, string_id, string, string_size,
> + string_font_info);
> + return EFI_EXIT(EFI_NOT_FOUND);
> +}
> +
> +static efi_status_t set_string(
> + const struct efi_hii_string_protocol *this,
> + efi_hii_handle_t package_list,
> + efi_string_id_t string_id,
> + const uint8_t *language,
> + const efi_string_t string,
> + const struct efi_font_info *string_font_info)
> +{
> + EFI_ENTRY("%p, %p, %u, %p, \"%ls\", %p", this, package_list, string_id,
> + language, string, string_font_info);
> + return EFI_EXIT(EFI_NOT_FOUND);
> +}
> +
> +static efi_status_t get_languages(
> + const struct efi_hii_string_protocol *this,
> + efi_hii_handle_t package_list,
> + uint8_t *languages,
> + UINTN *languages_size)
> +{
> + EFI_ENTRY("%p, %p, %p, %p", this, package_list, languages,
> + languages_size);
> + return EFI_EXIT(EFI_NOT_FOUND);
> +}
> +
> +static efi_status_t get_secondary_languages(
> + const struct efi_hii_string_protocol *this,
> + efi_hii_handle_t package_list,
> + const uint8_t *primary_language,
> + uint8_t *secondary_languages,
> + UINTN *secondary_languages_size)
> +{
> + EFI_ENTRY("%p, %p, %p, %p, %p", this, package_list, primary_language,
> + secondary_languages, secondary_languages_size);
> + return EFI_EXIT(EFI_NOT_FOUND);
> +}
> +
> +const struct efi_hii_config_routing_protocol efi_hii_config_routing = {
> + .extract_config = extract_config,
> + .export_config = export_config,
> + .route_config = route_config,
> + .block_to_config = block_to_config,
> + .config_to_block = config_to_block,
> + .get_alt_config = get_alt_config
> +};
> +const struct efi_hii_database_protocol efi_hii_database = {
> + .new_package_list = new_package_list,
> + .remove_package_list = remove_package_list,
> + .update_package_list = update_package_list,
> + .list_package_lists = list_package_lists,
> + .export_package_lists = export_package_lists,
> + .register_package_notify = register_package_notify,
> + .unregister_package_notify = unregister_package_notify,
> + .find_keyboard_layouts = find_keyboard_layouts,
> + .get_keyboard_layout = get_keyboard_layout,
> + .set_keyboard_layout = set_keyboard_layout,
> + .get_package_list_handle = get_package_list_handle
> +};
> +const struct efi_hii_string_protocol efi_hii_string = {
> + .new_string = new_string,
> + .get_string = get_string,
> + .set_string = set_string,
> + .get_languages = get_languages,
> + .get_secondary_languages = get_secondary_languages
> +};
>
More information about the U-Boot
mailing list