AKASHI Takahiro | ca8aa71 | 2019-01-21 12:13:00 +0900 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
Heinrich Schuchardt | 2a2654f | 2020-12-07 18:20:57 +0100 | [diff] [blame] | 3 | * EFI Human Interface Infrastructure ... Configuration |
| 4 | * |
| 5 | * Copyright (c) 2017 Leif Lindholm |
| 6 | * Copyright (c) 2018 AKASHI Takahiro, Linaro Limited |
AKASHI Takahiro | ca8aa71 | 2019-01-21 12:13:00 +0900 | [diff] [blame] | 7 | * |
Heinrich Schuchardt | 2a2654f | 2020-12-07 18:20:57 +0100 | [diff] [blame] | 8 | * As this is still a non-working stub and the protocol is neither required |
| 9 | * by the EFI shell nor by the UEFI SCT this module has been removed from |
| 10 | * the Makefile. |
AKASHI Takahiro | ca8aa71 | 2019-01-21 12:13:00 +0900 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | #include <common.h> |
| 14 | #include <efi_loader.h> |
| 15 | |
| 16 | const efi_guid_t efi_guid_hii_config_routing_protocol |
| 17 | = EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID; |
| 18 | const efi_guid_t efi_guid_hii_config_access_protocol |
| 19 | = EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID; |
| 20 | |
| 21 | /* |
| 22 | * EFI_HII_CONFIG_ROUTING_PROTOCOL |
| 23 | */ |
| 24 | |
| 25 | static efi_status_t EFIAPI |
| 26 | extract_config(const struct efi_hii_config_routing_protocol *this, |
| 27 | const efi_string_t request, |
| 28 | efi_string_t *progress, |
| 29 | efi_string_t *results) |
| 30 | { |
| 31 | EFI_ENTRY("%p, \"%ls\", %p, %p", this, request, progress, results); |
| 32 | |
| 33 | return EFI_EXIT(EFI_OUT_OF_RESOURCES); |
| 34 | } |
| 35 | |
| 36 | static efi_status_t EFIAPI |
| 37 | export_config(const struct efi_hii_config_routing_protocol *this, |
| 38 | efi_string_t *results) |
| 39 | { |
| 40 | EFI_ENTRY("%p, %p", this, results); |
| 41 | |
| 42 | return EFI_EXIT(EFI_OUT_OF_RESOURCES); |
| 43 | } |
| 44 | |
| 45 | static efi_status_t EFIAPI |
| 46 | route_config(const struct efi_hii_config_routing_protocol *this, |
| 47 | const efi_string_t configuration, |
| 48 | efi_string_t *progress) |
| 49 | { |
| 50 | EFI_ENTRY("%p, \"%ls\", %p", this, configuration, progress); |
| 51 | |
| 52 | return EFI_EXIT(EFI_OUT_OF_RESOURCES); |
| 53 | } |
| 54 | |
| 55 | static efi_status_t EFIAPI |
| 56 | block_to_config(const struct efi_hii_config_routing_protocol *this, |
| 57 | const efi_string_t config_request, |
| 58 | const u8 *block, |
| 59 | const efi_uintn_t block_size, |
| 60 | efi_string_t *config, |
| 61 | efi_string_t *progress) |
| 62 | { |
| 63 | EFI_ENTRY("%p, \"%ls\", %p, %zu, %p, %p", this, config_request, |
| 64 | block, block_size, config, progress); |
| 65 | |
| 66 | return EFI_EXIT(EFI_OUT_OF_RESOURCES); |
| 67 | } |
| 68 | |
| 69 | static efi_status_t EFIAPI |
| 70 | config_to_block(const struct efi_hii_config_routing_protocol *this, |
| 71 | const efi_string_t config_resp, |
| 72 | const u8 *block, |
| 73 | const efi_uintn_t *block_size, |
| 74 | efi_string_t *progress) |
| 75 | { |
| 76 | EFI_ENTRY("%p, \"%ls\", %p, %p, %p", this, config_resp, |
| 77 | block, block_size, progress); |
| 78 | |
| 79 | return EFI_EXIT(EFI_OUT_OF_RESOURCES); |
| 80 | } |
| 81 | |
| 82 | static efi_status_t EFIAPI |
| 83 | get_alt_config(const struct efi_hii_config_routing_protocol *this, |
| 84 | const efi_string_t config_resp, |
| 85 | const efi_guid_t *guid, |
| 86 | const efi_string_t name, |
| 87 | const struct efi_device_path *device_path, |
| 88 | const efi_string_t alt_cfg_id, |
| 89 | efi_string_t *alt_cfg_resp) |
| 90 | { |
| 91 | EFI_ENTRY("%p, \"%ls\", %pUl, \"%ls\", %p, \"%ls\", %p", |
| 92 | this, config_resp, guid, name, device_path, |
| 93 | alt_cfg_id, alt_cfg_resp); |
| 94 | |
| 95 | return EFI_EXIT(EFI_OUT_OF_RESOURCES); |
| 96 | } |
| 97 | |
| 98 | /* |
| 99 | * EFI_HII_ACCESS_PROTOCOL |
| 100 | */ |
| 101 | |
| 102 | efi_status_t EFIAPI |
| 103 | extract_config_access(const struct efi_hii_config_access_protocol *this, |
| 104 | const efi_string_t request, |
| 105 | efi_string_t *progress, |
| 106 | efi_string_t *results) |
| 107 | { |
| 108 | EFI_ENTRY("%p, \"%ls\", %p, %p", this, request, progress, results); |
| 109 | |
| 110 | return EFI_EXIT(EFI_OUT_OF_RESOURCES); |
| 111 | }; |
| 112 | |
| 113 | efi_status_t EFIAPI |
| 114 | route_config_access(const struct efi_hii_config_access_protocol *this, |
| 115 | const efi_string_t configuration, |
| 116 | efi_string_t *progress) |
| 117 | { |
| 118 | EFI_ENTRY("%p, \"%ls\", %p", this, configuration, progress); |
| 119 | |
| 120 | return EFI_EXIT(EFI_OUT_OF_RESOURCES); |
| 121 | }; |
| 122 | |
| 123 | efi_status_t EFIAPI |
| 124 | form_callback(const struct efi_hii_config_access_protocol *this, |
| 125 | efi_browser_action_t action, |
| 126 | efi_question_id_t question_id, |
| 127 | u8 type, |
| 128 | union efi_ifr_type_value *value, |
| 129 | efi_browser_action_request_t *action_request) |
| 130 | { |
Heinrich Schuchardt | 4b6f19f | 2019-01-23 22:55:36 +0100 | [diff] [blame] | 131 | EFI_ENTRY("%p, 0x%zx, 0x%x, 0x%x, %p, %p", this, action, |
AKASHI Takahiro | ca8aa71 | 2019-01-21 12:13:00 +0900 | [diff] [blame] | 132 | question_id, type, value, action_request); |
| 133 | |
| 134 | return EFI_EXIT(EFI_DEVICE_ERROR); |
| 135 | }; |
| 136 | |
| 137 | const struct efi_hii_config_routing_protocol efi_hii_config_routing = { |
| 138 | .extract_config = extract_config, |
| 139 | .export_config = export_config, |
| 140 | .route_config = route_config, |
| 141 | .block_to_config = block_to_config, |
| 142 | .config_to_block = config_to_block, |
| 143 | .get_alt_config = get_alt_config |
| 144 | }; |
| 145 | |
| 146 | const struct efi_hii_config_access_protocol efi_hii_config_access = { |
| 147 | .extract_config_access = extract_config_access, |
| 148 | .route_config_access = route_config_access, |
| 149 | .form_callback = form_callback |
| 150 | }; |