[{"id":1780018,"web_url":"http://patchwork.ozlabs.org/comment/1780018/","msgid":"<2e72feae-cb3a-f0ab-4a06-09308e2e8b8e@gmx.de>","list_archive_url":null,"date":"2017-10-04T17:45:43","subject":"Re: [U-Boot] [PATCH v1 02/12] efi_loader: add stub HII protocols","submitter":{"id":61270,"url":"http://patchwork.ozlabs.org/api/people/61270/","name":"Heinrich Schuchardt","email":"xypron.glpk@gmx.de"},"content":"On 09/10/2017 03:22 PM, Rob Clark wrote:\n> From: Leif Lindholm <leif.lindholm@linaro.org>\n> \n> EfiHiiConfigRoutingProtocolGuid\n> EfiHiiDatabaseProtocol\n> EfiHiiStringProtocol\n\nPlease, provide a proper commit message.\n\nResolve all issues reported by checkpatch.\n\n> \n> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>\n> ---\n>  include/efi_api.h             | 204 ++++++++++++++++++++++++++++\n>  include/efi_loader.h          |   6 +\n>  lib/efi_loader/Makefile       |   2 +-\n>  lib/efi_loader/efi_boottime.c |   9 ++\n>  lib/efi_loader/efi_hii.c      | 303 ++++++++++++++++++++++++++++++++++++++++++\n>  5 files changed, 523 insertions(+), 1 deletion(-)\n>  create mode 100644 lib/efi_loader/efi_hii.c\n> \n> diff --git a/include/efi_api.h b/include/efi_api.h\n> index 57468dd972..932a3429a8 100644\n> --- a/include/efi_api.h\n> +++ b/include/efi_api.h\n> @@ -536,6 +536,210 @@ struct efi_device_path_utilities_protocol\n>  \t\tconst struct efi_device_path *device_path);\n>  };\n>  \n> +#define EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID \\\n> +\tEFI_GUID(0x587e72d7, 0xcc50, 0x4f79, \\\n> +\t\t 0x82, 0x09, 0xca, 0x29, 0x1f, 0xc1, 0xa1, 0x0f)\n> +\n> +struct efi_hii_config_routing_protocol\n> +{\n\nERROR: open brace '{' following struct go on the same line\n#34: FILE: include/efi_api.h:544:\n+struct efi_hii_config_routing_protocol\n+{\n\n\n> +\tefi_status_t(EFIAPI *extract_config)(\n> +\t\tconst struct efi_hii_config_routing_protocol *this,\n> +\t\tconst efi_string_t request,\n> +\t\tefi_string_t *progress,\n> +\t\tefi_string_t *results);\n> +\tefi_status_t(EFIAPI *export_config)(\n> +\t\tconst struct efi_hii_config_routing_protocol *this,\n> +\t\tefi_string_t *results);\n> +\tefi_status_t(EFIAPI *route_config)(\n> +\t\tconst struct efi_hii_config_routing_protocol *this,\n> +\t\tconst efi_string_t configuration,\n> +\t\tefi_string_t *progress);\n> +\tefi_status_t(EFIAPI *block_to_config)(\n> +\t\tconst struct efi_hii_config_routing_protocol *this,\n> +\t\tconst efi_string_t config_request,\n> +\t\tconst uint8_t *block,\n> +\t\tconst UINTN block_size,\n> +\t\tefi_string_t *config,\n> +\t\tefi_string_t *progress);\n> +\tefi_status_t(EFIAPI *config_to_block)(\n> +\t\tconst struct efi_hii_config_routing_protocol *this,\n> +\t\tconst efi_string_t config_resp,\n> +\t\tconst uint8_t *block,\n> +\t\tconst UINTN *block_size,\n> +\t\tefi_string_t *progress);\n> +\tefi_status_t(EFIAPI *get_alt_config)(\n> +\t\tconst struct efi_hii_config_routing_protocol *this,\n> +\t\tconst efi_string_t config_resp,\n> +\t\tconst efi_guid_t *guid,\n> +\t\tconst efi_string_t name,\n> +\t\tconst struct efi_device_path *device_path,\n> +\t\tconst efi_string_t alt_cfg_id,\n> +\t\tefi_string_t *alt_cfg_resp);\n> +};\n> +\n> +#define EFI_HII_DATABASE_PROTOCOL_GUID\t     \\\n> +\tEFI_GUID(0xef9fc172, 0xa1b2, 0x4693, \\\n> +\t\t 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42)\n> +\n> +typedef enum {\n\nWe do not use CamelCase.\n\n> +\tEfiKeyLCtrl, EfiKeyA0, EfiKeyLAlt, EfiKeySpaceBar,\n> +\tEfiKeyA2, EfiKeyA3, EfiKeyA4, EfiKeyRCtrl, EfiKeyLeftArrow,\n> +\tEfiKeyDownArrow, EfiKeyRightArrow, EfiKeyZero,\n> +\tEfiKeyPeriod, EfiKeyEnter, EfiKeyLShift, EfiKeyB0,\n> +\tEfiKeyB1, EfiKeyB2, EfiKeyB3, EfiKeyB4, EfiKeyB5, EfiKeyB6,\n> +\tEfiKeyB7, EfiKeyB8, EfiKeyB9, EfiKeyB10, EfiKeyRShift,\n> +\tEfiKeyUpArrow, EfiKeyOne, EfiKeyTwo, EfiKeyThree,\n> +\tEfiKeyCapsLock, EfiKeyC1, EfiKeyC2, EfiKeyC3, EfiKeyC4,\n> +\tEfiKeyC5, EfiKeyC6, EfiKeyC7, EfiKeyC8, EfiKeyC9,\n> +\tEfiKeyC10, EfiKeyC11, EfiKeyC12, EfiKeyFour, EfiKeyFive,\n> +\tEfiKeySix, EfiKeyPlus, EfiKeyTab, EfiKeyD1, EfiKeyD2,\n> +\tEfiKeyD3, EfiKeyD4, EfiKeyD5, EfiKeyD6, EfiKeyD7, EfiKeyD8,\n> +\tEfiKeyD9, EfiKeyD10, EfiKeyD11, EfiKeyD12, EfiKeyD13,\n> +\tEfiKeyDel, EfiKeyEnd, EfiKeyPgDn, EfiKeySeven, EfiKeyEight,\n> +\tEfiKeyNine, EfiKeyE0, EfiKeyE1, EfiKeyE2, EfiKeyE3,\n> +\tEfiKeyE4, EfiKeyE5, EfiKeyE6, EfiKeyE7, EfiKeyE8, EfiKeyE9,\n> +\tEfiKeyE10, EfiKeyE11, EfiKeyE12, EfiKeyBackSpace,\n> +\tEfiKeyIns, EfiKeyHome, EfiKeyPgUp, EfiKeyNLck, EfiKeySlash,\n> +\tEfiKeyAsterisk, EfiKeyMinus, EfiKeyEsc, EfiKeyF1, EfiKeyF2,\n> +\tEfiKeyF3, EfiKeyF4, EfiKeyF5, EfiKeyF6, EfiKeyF7, EfiKeyF8,\n> +\tEfiKeyF9, EfiKeyF10, EfiKeyF11, EfiKeyF12, EfiKeyPrint,\n> +\tEfiKeySLck, EfiKeyPause\n> +} efi_key;\n> +\n> +struct efi_key_descriptor\n> +{\n> +\tefi_key key;\n> +\tuint16_t unicode;\n> +\tuint16_t shifted_unicode;\n> +\tuint16_t alt_gr_unicode;\n> +\tuint16_t shifted_alt_gr_unicode;\n> +\tuint16_t modifier;\n> +\tuint16_t affected_attribute;\n> +};\n> +\n> +struct efi_hii_keyboard_layout\n> +{\n> +\tuint16_t layout_length;\n> +\tefi_guid_t guid;\n> +\tuint32_t layout_descriptor_string_offset;\n> +\tuint8_t descriptor_count;\n> +\tstruct efi_key_descriptor descriptors[];\n> +};\n> +\n> +struct efi_hii_package_list_header\n> +{\n> +\tefi_guid_t package_list_guid;\n> +\tuint32_t package_length;\n> +};\n> +\n> +typedef void *efi_hii_handle_t;\n> +\n> +struct efi_hii_database_protocol\n> +{\n> +\tefi_status_t(EFIAPI *new_package_list)(\n> +\t\tconst struct efi_hii_database_protocol *this,\n> +\t\tconst struct efi_hii_package_list_header *package_list,\n> +\t\tconst efi_handle_t driver_handle,\n> +\t\tefi_hii_handle_t *handle);\n> +\tefi_status_t(EFIAPI *remove_package_list)(\n> +\t\tconst struct efi_hii_database_protocol *this,\n> +\t\tefi_hii_handle_t handle);\n> +\tefi_status_t(EFIAPI *update_package_list)(\n> +\t\tconst struct efi_hii_database_protocol *this,\n> +\t\tefi_hii_handle_t handle,\n> +\t\tconst struct efi_hii_package_list_header *package_list);\n> +\tefi_status_t(EFIAPI *list_package_lists)(\n> +\t\tconst struct efi_hii_database_protocol *this,\n> +\t\tuint8_t package_type,\n> +\t\tconst efi_guid_t *package_guid,\n> +\t\tUINTN *handle_buffer_length,\n> +\t\tefi_hii_handle_t *handle);\n> +\tefi_status_t(EFIAPI *export_package_lists)(\n> +\t\tconst struct efi_hii_database_protocol *this,\n> +\t\tefi_hii_handle_t handle,\n> +\t\tUINTN *buffer_size,\n> +\t\tstruct efi_hii_package_list_header *buffer);\n> +\tefi_status_t(EFIAPI *register_package_notify)(\n> +\t\tconst struct efi_hii_database_protocol *this,\n> +\t\tuint8_t package_type,\n> +\t\tconst efi_guid_t *package_guid,\n> +\t\tconst void *package_notify_fn,\n> +\t\tUINTN notify_type,\n> +\t\tefi_handle_t *notify_handle);\n> +\tefi_status_t(EFIAPI *unregister_package_notify)(\n> +\t\tconst struct efi_hii_database_protocol *this,\n> +\t\tefi_handle_t notification_handle\n> +\t\t);\n> +\tefi_status_t(EFIAPI *find_keyboard_layouts)(\n> +\t\tconst struct efi_hii_database_protocol *this,\n> +\t\tuint16_t *key_guid_buffer_length,\n> +\t\tefi_guid_t *key_guid_buffer);\n> +\tefi_status_t(EFIAPI *get_keyboard_layout)(\n> +\t\tconst struct efi_hii_database_protocol *this,\n> +\t\tefi_guid_t *key_guid,\n> +\t\tuint16_t *keyboard_layout_length,\n> +\t\tstruct efi_hii_keyboard_layout *keyboard_layout);\n> +\tefi_status_t(EFIAPI *set_keyboard_layout)(\n> +\t\tconst struct efi_hii_database_protocol *this,\n> +\t\tefi_guid_t *key_guid);\n> +\tefi_status_t(EFIAPI *get_package_list_handle)(\n> +\t\tconst struct efi_hii_database_protocol *this,\n> +\t\tefi_hii_handle_t package_list_handle,\n> +\t\tefi_handle_t *driver_handle);\n> +};\n> +\n> +#define EFI_HII_STRING_PROTOCOL_GUID \\\n> +\tEFI_GUID(0x0fd96974, 0x23aa, 0x4cdc, \\\n> +\t\t 0xb9, 0xcb, 0x98, 0xd1, 0x77, 0x50, 0x32, 0x2a)\n> +\n> +typedef uint32_t efi_hii_font_style_t;\n> +typedef uint16_t efi_string_id_t;\n> +\n> +struct efi_font_info\n> +{\n> +\tefi_hii_font_style_t font_style;\n> +\tuint16_t font_size;\n> +\tuint16_t font_name[1];\n> +};\n> +\n> +struct efi_hii_string_protocol\n> +{\n> +\tefi_status_t(EFIAPI *new_string)(\n> +\t\tconst struct efi_hii_string_protocol *this,\n> +\t\tefi_hii_handle_t package_list,\n> +\t\tefi_string_id_t *string_id,\n> +\t\tconst uint8_t *language,\n> +\t\tconst uint16_t *language_name,\n> +\t\tconst efi_string_t string,\n> +\t\tconst struct efi_font_info *string_font_info);\n> +\tefi_status_t(EFIAPI *get_string)(\n> +\t\tconst struct efi_hii_string_protocol *this,\n> +\t\tconst uint8_t *language,\n> +\t\tefi_hii_handle_t package_list,\n> +\t\tefi_string_id_t string_id,\n> +\t\tefi_string_t string,\n> +\t\tUINTN *string_size,\n> +\t\tstruct efi_font_info **string_font_info);\n> +\tefi_status_t(EFIAPI *set_string)(\n> +\t\tconst struct efi_hii_string_protocol *this,\n> +\t\tefi_hii_handle_t package_list,\n> +\t\tefi_string_id_t string_id,\n> +\t\tconst uint8_t *language,\n> +\t\tconst efi_string_t string,\n> +\t\tconst struct efi_font_info *string_font_info);\n> +\tefi_status_t(EFIAPI *get_languages)(\n> +\t\tconst struct efi_hii_string_protocol *this,\n> +\t\tefi_hii_handle_t package_list,\n> +\t\tuint8_t *languages,\n> +\t\tUINTN *languages_size);\n> +\tefi_status_t(EFIAPI *get_secondary_languages)(\n> +\t\tconst struct efi_hii_string_protocol *this,\n> +\t\tefi_hii_handle_t package_list,\n> +\t\tconst uint8_t *primary_language,\n> +\t\tuint8_t *secondary_languages,\n> +\t\tUINTN *secondary_languages_size);\n> +};\n> +\n>  #define EFI_GOP_GUID \\\n>  \tEFI_GUID(0x9042a9de, 0x23dc, 0x4a38, \\\n>  \t\t 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a)\n> diff --git a/include/efi_loader.h b/include/efi_loader.h\n> index c009828db9..a89bb2fcd9 100644\n> --- a/include/efi_loader.h\n> +++ b/include/efi_loader.h\n> @@ -59,6 +59,9 @@ extern struct efi_simple_input_interface efi_con_in;\n>  extern const struct efi_console_control_protocol efi_console_control;\n>  extern const struct efi_device_path_to_text_protocol efi_device_path_to_text;\n>  extern const struct efi_device_path_utilities_protocol efi_device_path_utilities;\n> +extern const struct efi_hii_config_routing_protocol efi_hii_config_routing;\n> +extern const struct efi_hii_database_protocol efi_hii_database;\n> +extern const struct efi_hii_string_protocol efi_hii_string;\n>  \n>  uint16_t *efi_dp_str(struct efi_device_path *dp);\n>  \n> @@ -70,6 +73,9 @@ extern const efi_guid_t efi_guid_device_path_to_text_protocol;\n>  extern const efi_guid_t efi_simple_file_system_protocol_guid;\n>  extern const efi_guid_t efi_file_info_guid;\n>  extern const efi_guid_t efi_guid_device_path_utilities_protocol;\n> +extern const efi_guid_t efi_guid_hii_config_routing_protocol;\n> +extern const efi_guid_t efi_guid_hii_database_protocol;\n> +extern const efi_guid_t efi_guid_hii_string_protocol;\n>  \n>  extern unsigned int __efi_runtime_start, __efi_runtime_stop;\n>  extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop;\n> diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile\n> index f5e69dd078..e8fd6823a3 100644\n> --- a/lib/efi_loader/Makefile\n> +++ b/lib/efi_loader/Makefile\n> @@ -16,7 +16,7 @@ always := $(efiprogs-y)\n>  obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o\n>  obj-y += efi_image_loader.o efi_boottime.o efi_runtime.o efi_console.o\n>  obj-y += efi_memory.o efi_device_path_to_text.o efi_device_path.o\n> -obj-y += efi_device_path_utilities.o\n> +obj-y += efi_device_path_utilities.o efi_hii.o\n>  obj-y += efi_file.o efi_variable.o efi_bootmgr.o\n>  obj-$(CONFIG_LCD) += efi_gop.o\n>  obj-$(CONFIG_DM_VIDEO) += efi_gop.o\n> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\n> index 8bb243d673..4d1a16051b 100644\n> --- a/lib/efi_loader/efi_boottime.c\n> +++ b/lib/efi_loader/efi_boottime.c\n> @@ -779,6 +779,15 @@ void efi_setup_loaded_image(struct efi_loaded_image *info, struct efi_object *ob\n>  \tobj->protocols[4].protocol_interface =\n>  \t\t(void *)&efi_device_path_utilities;\n>  \n> +\tobj->protocols[5].guid = &efi_guid_hii_string_protocol;\n> +\tobj->protocols[5].protocol_interface = (void *)&efi_hii_string;\n> +\n> +\tobj->protocols[6].guid = &efi_guid_hii_database_protocol;\n> +\tobj->protocols[6].protocol_interface = (void *)&efi_hii_database;\n> +\n> +\tobj->protocols[7].guid = &efi_guid_hii_config_routing_protocol;\n> +\tobj->protocols[7].protocol_interface = (void *)&efi_hii_config_routing;\n> +\n>  \tinfo->file_path = file_path;\n>  \tinfo->device_handle = efi_dp_find_obj(device_path, NULL);\n>  \n> diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c\n> new file mode 100644\n> index 0000000000..cc68a28d2b\n> --- /dev/null\n> +++ b/lib/efi_loader/efi_hii.c\n> @@ -0,0 +1,303 @@\n> +/*\n> + *  EFI Human Interface Infrastructure ... interface\n> + *\n> + *  Copyright (c) 2017 Leif Lindholm\n> + *\n> + *  SPDX-License-Identifier:     GPL-2.0+\n> + */\n> +\n> +#include <common.h>\n> +#include <efi_loader.h>\n> +\n> +const efi_guid_t efi_guid_hii_config_routing_protocol =\n> +\tEFI_HII_CONFIG_ROUTING_PROTOCOL_GUID;\n> +const efi_guid_t efi_guid_hii_database_protocol = EFI_HII_DATABASE_PROTOCOL_GUID;\n> +const efi_guid_t efi_guid_hii_string_protocol = EFI_HII_STRING_PROTOCOL_GUID;\n> +\n> +\n> +/*\n> + * EFI_HII_CONFIG_ROUTING_PROTOCOL\n> + */\n\nNone of the functions below matches the definitions in the structures.\nPlease, add the missing EFIAPI.\n\nRegards\n\nHeinrich\n\n> +\n> +static efi_status_t extract_config(\n> +\tconst struct efi_hii_config_routing_protocol *this,\n> +\tconst efi_string_t request,\n> +\tefi_string_t *progress,\n> +\tefi_string_t *results)\n> +{\n> +\tEFI_ENTRY(\"%p, \\\"%ls\\\", %p, %p\", this, request, progress, results);\n> +\treturn EFI_EXIT(EFI_OUT_OF_RESOURCES);\n> +}\n> +\n> +static efi_status_t export_config(\n> +\tconst struct efi_hii_config_routing_protocol *this,\n> +\tefi_string_t *results)\n> +{\n> +\tEFI_ENTRY(\"%p, %p\", this, results);\n> +\treturn EFI_EXIT(EFI_OUT_OF_RESOURCES);\n> +}\n> +\n> +static efi_status_t route_config(\n> +\tconst struct efi_hii_config_routing_protocol *this,\n> +\tconst efi_string_t configuration,\n> +\tefi_string_t *progress)\n> +{\n> +\tEFI_ENTRY(\"%p, \\\"%ls\\\", %p\", this, configuration, progress);\n> +\treturn EFI_EXIT(EFI_OUT_OF_RESOURCES);\n> +}\n> +\n> +static efi_status_t block_to_config(\n> +\tconst struct efi_hii_config_routing_protocol *this,\n> +\tconst efi_string_t config_request,\n> +\tconst uint8_t *block,\n> +\tconst UINTN block_size,\n> +\tefi_string_t *config,\n> +\tefi_string_t *progress)\n> +{\n> +\tEFI_ENTRY(\"%p, \\\"%ls\\\", %p, %lu, %p, %p\", this, config_request, block,\n> +\t\t  block_size, config, progress);\n> +\treturn EFI_EXIT(EFI_OUT_OF_RESOURCES);\n> +}\n> +\n> +static efi_status_t config_to_block(\n> +\tconst struct efi_hii_config_routing_protocol *this,\n> +\tconst efi_string_t config_resp,\n> +\tconst uint8_t *block,\n> +\tconst UINTN *block_size,\n> +\tefi_string_t *progress)\n> +{\n> +\tEFI_ENTRY(\"%p, \\\"%ls\\\", %p, %p, %p\", this, config_resp, block,\n> +\t\t  block_size, progress);\n> +\treturn EFI_EXIT(EFI_OUT_OF_RESOURCES);\n> +}\n> +\n> +static efi_status_t get_alt_config(\n> +\tconst struct efi_hii_config_routing_protocol *this,\n> +\tconst efi_string_t config_resp,\n> +\tconst efi_guid_t *guid,\n> +\tconst efi_string_t name,\n> +\tconst struct efi_device_path *device_path,\n> +\tconst efi_string_t alt_cfg_id,\n> +\tefi_string_t *alt_cfg_resp)\n> +{\n> +\tEFI_ENTRY(\"%p, \\\"%ls\\\", %pUl, \\\"%ls\\\", %p, \\\"%ls\\\", %p\", this,\n> +\t\t  config_resp, guid, name, device_path, alt_cfg_id,\n> +\t\t  alt_cfg_resp);\n> +\treturn EFI_EXIT(EFI_OUT_OF_RESOURCES);\n> +}\n> +\n> +\n> +/*\n> + * EFI_HII_DATABASE_PROTOCOL\n> + */\n> +\n> +static efi_status_t new_package_list(\n> +\tconst struct efi_hii_database_protocol *this,\n> +\tconst struct efi_hii_package_list_header *package_list,\n> +\tconst efi_handle_t driver_handle,\n> +\tefi_hii_handle_t *handle)\n> +{\n> +\t/* Current shell start failure. */\n> +\t/* Invoked from MdeModulePkg/Library/UefiHiiLib/HiiLib.c : HiiAddPackages */\n> +\t/* (Via autogenerated .c file.) */\n> +\tEFI_ENTRY(\"%p, %p, %p, %p\", this, package_list, driver_handle, handle);\n> +\treturn EFI_EXIT(EFI_OUT_OF_RESOURCES);\n> +}\n> +\n> +static efi_status_t remove_package_list(\n> +\tconst struct efi_hii_database_protocol *this,\n> +\tefi_hii_handle_t handle)\n> +{\n> +\tEFI_ENTRY(\"%p, %p\", this, handle);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND);\n> +}\n> +\n> +static efi_status_t update_package_list(\n> +\tconst struct efi_hii_database_protocol *this,\n> +\tefi_hii_handle_t handle,\n> +\tconst struct efi_hii_package_list_header *package_list)\n> +{\n> +\tEFI_ENTRY(\"%p, %p, %p\", this, handle, package_list);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND);\n> +}\n> +\n> +static efi_status_t list_package_lists(\n> +\tconst struct efi_hii_database_protocol *this,\n> +\tuint8_t package_type,\n> +\tconst efi_guid_t *package_guid,\n> +\tUINTN *handle_buffer_length,\n> +\tefi_hii_handle_t *handle)\n> +{\n> +\tEFI_ENTRY(\"%p, %u, %pUl, %p, %p\", this, package_type, package_guid,\n> +\t\t  handle_buffer_length, handle);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND);\n> +}\n> +\n> +static efi_status_t export_package_lists(\n> +\tconst struct efi_hii_database_protocol *this,\n> +\tefi_hii_handle_t handle,\n> +\tUINTN *buffer_size,\n> +\tstruct efi_hii_package_list_header *buffer)\n> +{\n> +\tEFI_ENTRY(\"%p, %p, %p, %p\", this, handle, buffer_size, buffer);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND);\n> +}\n> +\n> +static efi_status_t register_package_notify(\n> +\tconst struct efi_hii_database_protocol *this,\n> +\tuint8_t package_type,\n> +\tconst efi_guid_t *package_guid,\n> +\tconst void *package_notify_fn,\n> +\tUINTN notify_type,\n> +\tefi_handle_t *notify_handle)\n> +{\n> +\tEFI_ENTRY(\"%p, %u, %pUl, %p, %lu, %p\", this, package_type,\n> +\t\t  package_guid, package_notify_fn, notify_type,\n> +\t\t  notify_handle);\n> +\treturn EFI_EXIT(EFI_OUT_OF_RESOURCES);\n> +}\n> +\n> +static efi_status_t unregister_package_notify(\n> +\tconst struct efi_hii_database_protocol *this,\n> +\tefi_handle_t notification_handle)\n> +{\n> +\tEFI_ENTRY(\"%p, %p\", this, notification_handle);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND);\n> +}\n> +\n> +static efi_status_t find_keyboard_layouts(\n> +\tconst struct efi_hii_database_protocol *this,\n> +\tuint16_t *key_guid_buffer_length,\n> +\tefi_guid_t *key_guid_buffer)\n> +{\n> +\tEFI_ENTRY(\"%p, %p, %p\", this, key_guid_buffer_length, key_guid_buffer);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND); /* Invalid */\n> +}\n> +\n> +static efi_status_t get_keyboard_layout(\n> +\tconst struct efi_hii_database_protocol *this,\n> +\tefi_guid_t *key_guid,\n> +\tuint16_t *keyboard_layout_length,\n> +\tstruct efi_hii_keyboard_layout *keyboard_layout)\n> +{\n> +\tEFI_ENTRY(\"%p, %pUl, %p, %p\", this, key_guid, keyboard_layout_length,\n> +\t\t  keyboard_layout);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND);\n> +}\n> +\n> +static efi_status_t set_keyboard_layout(\n> +\tconst struct efi_hii_database_protocol *this,\n> +\tefi_guid_t *key_guid)\n> +{\n> +\tEFI_ENTRY(\"%p, %pUl\", this, key_guid);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND);\n> +}\n> +\n> +static efi_status_t get_package_list_handle(\n> +\tconst struct efi_hii_database_protocol *this,\n> +\tefi_hii_handle_t package_list_handle,\n> +\tefi_handle_t *driver_handle)\n> +{\n> +\tEFI_ENTRY(\"%p, %p, %p\", this, package_list_handle, driver_handle);\n> +\treturn EFI_EXIT(EFI_INVALID_PARAMETER);\n> +}\n> +\n> +\n> +/*\n> + * EFI_HII_STRING_PROTOCOL\n> + */\n> +\n> +static efi_status_t new_string(\n> +\tconst struct efi_hii_string_protocol *this,\n> +\tefi_hii_handle_t package_list,\n> +\tefi_string_id_t *string_id,\n> +\tconst uint8_t *language,\n> +\tconst uint16_t *language_name,\n> +\tconst efi_string_t string,\n> +\tconst struct efi_font_info *string_font_info)\n> +{\n> +\tEFI_ENTRY(\"%p, %p, %p, %p, %p, \\\"%ls\\\", %p\", this, package_list,\n> +\t\t  string_id, language, language_name, string,\n> +\t\t  string_font_info);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND);\n> +}\n> +\n> +static efi_status_t get_string(\n> +\tconst struct efi_hii_string_protocol *this,\n> +\tconst uint8_t *language,\n> +\tefi_hii_handle_t package_list,\n> +\tefi_string_id_t string_id,\n> +\tefi_string_t string,\n> +\tUINTN *string_size,\n> +\tstruct efi_font_info **string_font_info)\n> +{\n> +\tEFI_ENTRY(\"%p, %p, %p, %u, \\\"%ls\\\", %p, %p\", this, language,\n> +\t\t  package_list, string_id, string, string_size,\n> +\t\t  string_font_info);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND);\n> +}\n> +\n> +static efi_status_t set_string(\n> +\tconst struct efi_hii_string_protocol *this,\n> +\tefi_hii_handle_t package_list,\n> +\tefi_string_id_t string_id,\n> +\tconst uint8_t *language,\n> +\tconst efi_string_t string,\n> +\tconst struct efi_font_info *string_font_info)\n> +{\n> +\tEFI_ENTRY(\"%p, %p, %u, %p, \\\"%ls\\\", %p\", this, package_list, string_id,\n> +\t\t  language, string, string_font_info);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND);\n> +}\n> +\n> +static efi_status_t get_languages(\n> +\tconst struct efi_hii_string_protocol *this,\n> +\tefi_hii_handle_t package_list,\n> +\tuint8_t *languages,\n> +\tUINTN *languages_size)\n> +{\n> +\tEFI_ENTRY(\"%p, %p, %p, %p\", this, package_list, languages,\n> +\t\t  languages_size);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND);\n> +}\n> +\n> +static efi_status_t get_secondary_languages(\n> +\tconst struct efi_hii_string_protocol *this,\n> +\tefi_hii_handle_t package_list,\n> +\tconst uint8_t *primary_language,\n> +\tuint8_t *secondary_languages,\n> +\tUINTN *secondary_languages_size)\n> +{\n> +\tEFI_ENTRY(\"%p, %p, %p, %p, %p\", this, package_list, primary_language,\n> +\t\t  secondary_languages, secondary_languages_size);\n> +\treturn EFI_EXIT(EFI_NOT_FOUND);\n> +}\n> +\n> +const struct efi_hii_config_routing_protocol efi_hii_config_routing = {\n> +\t.extract_config = extract_config,\n> +\t.export_config = export_config,\n> +\t.route_config = route_config,\n> +\t.block_to_config = block_to_config,\n> +\t.config_to_block = config_to_block,\n> +\t.get_alt_config = get_alt_config\n> +};\n> +const struct efi_hii_database_protocol efi_hii_database = {\n> +\t.new_package_list = new_package_list,\n> +\t.remove_package_list = remove_package_list,\n> +\t.update_package_list = update_package_list,\n> +\t.list_package_lists = list_package_lists,\n> +\t.export_package_lists = export_package_lists,\n> +\t.register_package_notify = register_package_notify,\n> +\t.unregister_package_notify = unregister_package_notify,\n> +\t.find_keyboard_layouts = find_keyboard_layouts,\n> +\t.get_keyboard_layout = get_keyboard_layout,\n> +\t.set_keyboard_layout = set_keyboard_layout,\n> +\t.get_package_list_handle = get_package_list_handle\n> +};\n> +const struct efi_hii_string_protocol efi_hii_string = {\n> +\t.new_string = new_string,\n> +\t.get_string = get_string,\n> +\t.set_string = set_string,\n> +\t.get_languages = get_languages,\n> +\t.get_secondary_languages = get_secondary_languages\n> +};\n>","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y6jyp2bG5z9t75\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  5 Oct 2017 04:47:12 +1100 (AEDT)","by lists.denx.de (Postfix, from userid 105)\n\tid C2115C21F98; Wed,  4 Oct 2017 17:47:09 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id BF234C21DA6;\n\tWed,  4 Oct 2017 17:47:02 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 02ECCC21DA6; Wed,  4 Oct 2017 17:47:01 +0000 (UTC)","from mout.gmx.net (mout.gmx.net [212.227.17.22])\n\tby lists.denx.de (Postfix) with ESMTPS id 7178EC21DA0\n\tfor <u-boot@lists.denx.de>; Wed,  4 Oct 2017 17:47:01 +0000 (UTC)","from [192.168.123.82] ([94.114.42.150]) by mail.gmx.com (mrgmx102\n\t[212.227.17.168]) with ESMTPSA (Nemesis) id\n\t0M6P5z-1d7G8A4BWF-00yMfQ; Wed, 04 Oct 2017 19:46:50 +0200"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=FREEMAIL_FROM\n\tautolearn=unavailable autolearn_force=no version=3.4.0","To":"Rob Clark <robdclark@gmail.com>,\n\tU-Boot Mailing List <u-boot@lists.denx.de>","References":"<20170910132236.14318-1-robdclark@gmail.com>\n\t<20170910132236.14318-3-robdclark@gmail.com>","From":"Heinrich Schuchardt <xypron.glpk@gmx.de>","Message-ID":"<2e72feae-cb3a-f0ab-4a06-09308e2e8b8e@gmx.de>","Date":"Wed, 4 Oct 2017 19:45:43 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170910132236.14318-3-robdclark@gmail.com>","Content-Language":"en-US","X-Provags-ID":"V03:K0:YypEv80n2BGBML+TkaD6uzyCk9E16wKEOqhuzWjBAaQXAF8YOyO\n\tCs0iBaIORB8lVlAVOCv1pCdIeMLta336mC8ELir4/62/6QdLoheAVyXHH501+K3tDRdzH6q\n\tze7fnp0vinOJSg/17kqTkIVRlj5eVrFpcdsti9GbhPgg1MQR9QGDvRraWzotsc0qAs1kgDw\n\tFtI7r9HBv098Rdjk0Cacw==","X-UI-Out-Filterresults":"notjunk:1; V01:K0:cjrB8N0dt48=:EBC+dGIKd++TAN+SIP+JXe\n\td6ME+tZwD97muYAKlCia8wkSfEbzyur49Hj9A2qmAmfgmWBKi7CsDKb0BhjbRa1ycrhMIfCA9\n\touV5tGr7aschdyLDhaRrwEW5yJ4WoetEV25P99YqIdp/OK06C7b6ZS1rWC43+e42gaFx4fKXO\n\tabzZzq33Bopj0qADswp/Echtmq86vya5muonMbBz6UfqF63nru0CsbcEzvDDCDOyoh4Fdg6Ch\n\tTzXK3E9vfaNyWZqWf754KNgSsxiw5Sh16SqlYacc0XhoPeQCy5PHPIILBMVr03G9AtMJ1BppP\n\t+TWqqhanF5TPCtBez7Re748QJHfIpugrhyzL9Nxe8FK5efRgCQEoNOo6q7ZMn8qJh2bnIJ9yN\n\tajMm2lfw+fAPLXmDW4Ke8ybebNYOO6PeIvtoRX1PRoboBjaJdBz8C7EjC8IhUIdk5MO7ME3xk\n\tuSjN6MkeztJ3nqMZvMMJ2x7ne+O2ReoFapKBMcVTZZhUuwtsS/+gfxJyci1GiiPfJBlHzyEUS\n\t+mNZg52WpjusN79abTdJufxxQOee92XkBxAy7IK1mCwJVDJrRCC2kbBEMpepLBaXBMpdde1gx\n\tzNAJOhvNkKBYVoqzfOlVRuCPVQwDeMZFsuqRi67UIwl6dNAZOonBgkICiZSuVms6Ukz6rIjUY\n\t6mtBOdrPQ7iuAZIyAXrXh5szl29kVOVoz14xX2uSLP7a7oR8x7rBB6i8rL3x2pTSAu9aiLC/D\n\tSpSzkcvh1k+8s5n8PTieifHA2AjRrqzmjhP6suomokeoKapUULUKSsC7MwF3GqOS7Y8mJVSvT\n\thOxHFHTyDv2KGsLScGjda5T6sGF0+1e0B9y7Hhah3fXhiH4y2w=","Cc":"Peter Jones <pjones@redhat.com>, Leif Lindholm <leif.lindholm@linaro.org>","Subject":"Re: [U-Boot] [PATCH v1 02/12] efi_loader: add stub HII protocols","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1780024,"web_url":"http://patchwork.ozlabs.org/comment/1780024/","msgid":"<9f4a5b3f-ca33-ad09-0a52-b39fe2d1b984@gmx.de>","list_archive_url":null,"date":"2017-10-04T17:59:03","subject":"Re: [U-Boot] [PATCH v1 02/12] efi_loader: add stub HII protocols","submitter":{"id":61270,"url":"http://patchwork.ozlabs.org/api/people/61270/","name":"Heinrich Schuchardt","email":"xypron.glpk@gmx.de"},"content":"On 10/04/2017 07:45 PM, Heinrich Schuchardt wrote:\n> On 09/10/2017 03:22 PM, Rob Clark wrote:\n>> From: Leif Lindholm <leif.lindholm@linaro.org>\n>>\n>> EfiHiiConfigRoutingProtocolGuid\n>> EfiHiiDatabaseProtocol\n>> EfiHiiStringProtocol\n> \n> Please, provide a proper commit message.\n> \n> Resolve all issues reported by checkpatch.\n> \n>>\n>> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>\n>> ---\n>>  include/efi_api.h             | 204 ++++++++++++++++++++++++++++\n>>  include/efi_loader.h          |   6 +\n>>  lib/efi_loader/Makefile       |   2 +-\n\n<snip>\n\n>> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\n>> index 8bb243d673..4d1a16051b 100644\n>> --- a/lib/efi_loader/efi_boottime.c\n>> +++ b/lib/efi_loader/efi_boottime.c\n>> @@ -779,6 +779,15 @@ void efi_setup_loaded_image(struct efi_loaded_image *info, struct efi_object *ob\n>>  \tobj->protocols[4].protocol_interface =\n>>  \t\t(void *)&efi_device_path_utilities;\n>>  \n>> +\tobj->protocols[5].guid = &efi_guid_hii_string_protocol;\n>> +\tobj->protocols[5].protocol_interface = (void *)&efi_hii_string;\n>> +\n>> +\tobj->protocols[6].guid = &efi_guid_hii_database_protocol;\n>> +\tobj->protocols[6].protocol_interface = (void *)&efi_hii_database;\n>> +\n>> +\tobj->protocols[7].guid = &efi_guid_hii_config_routing_protocol;\n>> +\tobj->protocols[7].protocol_interface = (void *)&efi_hii_config_routing;\n>> +\n\nDo not add a protocol that is not properly implemented yet.\n\nRegards\n\nHeinrich","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y6kG63RH7z9sRm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  5 Oct 2017 05:00:29 +1100 (AEDT)","by lists.denx.de (Postfix, from userid 105)\n\tid 0E28FC21EBC; Wed,  4 Oct 2017 18:00:24 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id BCFA8C21DA6;\n\tWed,  4 Oct 2017 18:00:22 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid C8679C21DA6; Wed,  4 Oct 2017 18:00:21 +0000 (UTC)","from mout.gmx.net (mout.gmx.net [212.227.17.21])\n\tby lists.denx.de (Postfix) with ESMTPS id 7C3F4C21DA0\n\tfor <u-boot@lists.denx.de>; Wed,  4 Oct 2017 18:00:21 +0000 (UTC)","from [192.168.123.82] ([94.114.42.150]) by mail.gmx.com (mrgmx103\n\t[212.227.17.168]) with ESMTPSA (Nemesis) id\n\t0MOfQw-1dusYP3vgU-0069x9; Wed, 04 Oct 2017 20:00:12 +0200"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","From":"Heinrich Schuchardt <xypron.glpk@gmx.de>","To":"Rob Clark <robdclark@gmail.com>,\n\tU-Boot Mailing List <u-boot@lists.denx.de>","References":"<20170910132236.14318-1-robdclark@gmail.com>\n\t<20170910132236.14318-3-robdclark@gmail.com>\n\t<2e72feae-cb3a-f0ab-4a06-09308e2e8b8e@gmx.de>","Message-ID":"<9f4a5b3f-ca33-ad09-0a52-b39fe2d1b984@gmx.de>","Date":"Wed, 4 Oct 2017 19:59:03 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<2e72feae-cb3a-f0ab-4a06-09308e2e8b8e@gmx.de>","Content-Language":"en-US","X-Provags-ID":"V03:K0:42pTSdFa04igSZwaDNJXCCbCAJXOfYpznCai96jWY2v9af/aTVM\n\tNFp9yR/OEXOcj6vjUdGSRIViB9sMKoqkNUVvgm/e41bf2TNnYdj0kn4zdm9BUR5305D4ipd\n\tAZnIu2agNzJdxhXua6sqrgcUDmnhe3LXIgwgXQtfVHaCGaBE0dBVc0JC2kyR/CM/v/MiHOg\n\tUkf3TXYDvdC/Jfgg1l6zQ==","X-UI-Out-Filterresults":"notjunk:1; V01:K0:q+vp/9VyPtI=:Kjd5qmbhqBNXdjT+U6/oik\n\tNRtz6ySE9ejQNO710ShXeqJo97ylf0ZyWGLhdTpeQtRHzS3F13+FuyTRuRsL51cnrT6MrFIYA\n\tzhDKEm7fi3JVBCryHmv7NbUxjHScUt5zvIaaX/1wEiE3VfNsy+Hz5fNu9ls5jifvORQro4ViO\n\tnaS2VFHndfZPMHn/twty54rdeQmzi6dH/UqvpJgA+iJkJw7DPuHKq7yYthBnsXTrdrIb9hofn\n\t7AxRbj3myeS/aXQ5po5rBP3PZspGC/CuqAeeny+lj4BDw8qRAkoh09oIQJg5wAeif3G1wWBfB\n\tYJJ2SDwH4LW6BADHkTFab+uEq5uY5hxgBaXSLeIv3/uWXA9+xAjINrcSHh48wPd4XfdCg6HCp\n\t1Ad/PhLjvzQ+2kUlXIbVkOq/DD6RYPT+iw50wyQ9iyo1OhCs4mMzo8+BjUBrnEOHHYiiQJn0x\n\tK43GHA2sliTIAcSZOYZPSfwIS/wW2xjvGRDiUz3fFliyjsoY06skrswMnxoyY6E86phWhcGnR\n\tZlzxPMKCclUsQ+s2l0qc/lTd6+BOeSZD87ajBLHJLMTMLW0+rKUt4tuO5rHHF+ADos6yZFIRw\n\tbN5Kn/IxlOaXjD/Z1vFHS12Kiz+qcJLhgLEZr1pGxkd7YxhZQXxt9PzPFg5d+we/oiaICWWhi\n\tljVLcG30fmAqmiq/I3el1YBQWbTwD6Ecs0rVSfU9jMnubFLztlPJN4hf268YOngOe3bCCsEV1\n\tgtwaY/HnXCgxRWWmrxZy5cvYf7fR4+VTpo5sHQfiWdSvs51nT8xIVFkjaip5aGa8xXgC4u7s8\n\tgaIkEtTaoWBwWqXIg62wbnC3S8LY7ShtOIPEpQ1JnnkIdaJyJ0=","Cc":"Peter Jones <pjones@redhat.com>, Leif Lindholm <leif.lindholm@linaro.org>","Subject":"Re: [U-Boot] [PATCH v1 02/12] efi_loader: add stub HII protocols","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]