blob: ae0f3ecd3b182cf3deb357b611a474649fa8e55c [file] [log] [blame]
AKASHI Takahiroca8aa712019-01-21 12:13:00 +09001// SPDX-License-Identifier: GPL-2.0+
2/*
Heinrich Schuchardt2a2654f2020-12-07 18:20:57 +01003 * EFI Human Interface Infrastructure ... Configuration
4 *
5 * Copyright (c) 2017 Leif Lindholm
6 * Copyright (c) 2018 AKASHI Takahiro, Linaro Limited
AKASHI Takahiroca8aa712019-01-21 12:13:00 +09007 *
Heinrich Schuchardt2a2654f2020-12-07 18:20:57 +01008 * 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 Takahiroca8aa712019-01-21 12:13:00 +090011 */
12
AKASHI Takahiroca8aa712019-01-21 12:13:00 +090013#include <efi_loader.h>
14
15const efi_guid_t efi_guid_hii_config_routing_protocol
16 = EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID;
17const efi_guid_t efi_guid_hii_config_access_protocol
18 = EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID;
19
20/*
21 * EFI_HII_CONFIG_ROUTING_PROTOCOL
22 */
23
24static efi_status_t EFIAPI
25extract_config(const struct efi_hii_config_routing_protocol *this,
26 const efi_string_t request,
27 efi_string_t *progress,
28 efi_string_t *results)
29{
30 EFI_ENTRY("%p, \"%ls\", %p, %p", this, request, progress, results);
31
32 return EFI_EXIT(EFI_OUT_OF_RESOURCES);
33}
34
35static efi_status_t EFIAPI
36export_config(const struct efi_hii_config_routing_protocol *this,
37 efi_string_t *results)
38{
39 EFI_ENTRY("%p, %p", this, results);
40
41 return EFI_EXIT(EFI_OUT_OF_RESOURCES);
42}
43
44static efi_status_t EFIAPI
45route_config(const struct efi_hii_config_routing_protocol *this,
46 const efi_string_t configuration,
47 efi_string_t *progress)
48{
49 EFI_ENTRY("%p, \"%ls\", %p", this, configuration, progress);
50
51 return EFI_EXIT(EFI_OUT_OF_RESOURCES);
52}
53
54static efi_status_t EFIAPI
55block_to_config(const struct efi_hii_config_routing_protocol *this,
56 const efi_string_t config_request,
57 const u8 *block,
58 const efi_uintn_t block_size,
59 efi_string_t *config,
60 efi_string_t *progress)
61{
62 EFI_ENTRY("%p, \"%ls\", %p, %zu, %p, %p", this, config_request,
63 block, block_size, config, progress);
64
65 return EFI_EXIT(EFI_OUT_OF_RESOURCES);
66}
67
68static efi_status_t EFIAPI
69config_to_block(const struct efi_hii_config_routing_protocol *this,
70 const efi_string_t config_resp,
71 const u8 *block,
72 const efi_uintn_t *block_size,
73 efi_string_t *progress)
74{
75 EFI_ENTRY("%p, \"%ls\", %p, %p, %p", this, config_resp,
76 block, block_size, progress);
77
78 return EFI_EXIT(EFI_OUT_OF_RESOURCES);
79}
80
81static efi_status_t EFIAPI
82get_alt_config(const struct efi_hii_config_routing_protocol *this,
83 const efi_string_t config_resp,
84 const efi_guid_t *guid,
85 const efi_string_t name,
86 const struct efi_device_path *device_path,
87 const efi_string_t alt_cfg_id,
88 efi_string_t *alt_cfg_resp)
89{
Heinrich Schuchardt282249d2022-01-16 14:15:31 +010090 EFI_ENTRY("%p, \"%ls\", %pUs, \"%ls\", %p, \"%ls\", %p",
AKASHI Takahiroca8aa712019-01-21 12:13:00 +090091 this, config_resp, guid, name, device_path,
92 alt_cfg_id, alt_cfg_resp);
93
94 return EFI_EXIT(EFI_OUT_OF_RESOURCES);
95}
96
97/*
98 * EFI_HII_ACCESS_PROTOCOL
99 */
100
101efi_status_t EFIAPI
102extract_config_access(const struct efi_hii_config_access_protocol *this,
103 const efi_string_t request,
104 efi_string_t *progress,
105 efi_string_t *results)
106{
107 EFI_ENTRY("%p, \"%ls\", %p, %p", this, request, progress, results);
108
109 return EFI_EXIT(EFI_OUT_OF_RESOURCES);
110};
111
112efi_status_t EFIAPI
113route_config_access(const struct efi_hii_config_access_protocol *this,
114 const efi_string_t configuration,
115 efi_string_t *progress)
116{
117 EFI_ENTRY("%p, \"%ls\", %p", this, configuration, progress);
118
119 return EFI_EXIT(EFI_OUT_OF_RESOURCES);
120};
121
122efi_status_t EFIAPI
123form_callback(const struct efi_hii_config_access_protocol *this,
124 efi_browser_action_t action,
125 efi_question_id_t question_id,
126 u8 type,
127 union efi_ifr_type_value *value,
128 efi_browser_action_request_t *action_request)
129{
Heinrich Schuchardt4b6f19f2019-01-23 22:55:36 +0100130 EFI_ENTRY("%p, 0x%zx, 0x%x, 0x%x, %p, %p", this, action,
AKASHI Takahiroca8aa712019-01-21 12:13:00 +0900131 question_id, type, value, action_request);
132
133 return EFI_EXIT(EFI_DEVICE_ERROR);
134};
135
136const struct efi_hii_config_routing_protocol efi_hii_config_routing = {
137 .extract_config = extract_config,
138 .export_config = export_config,
139 .route_config = route_config,
140 .block_to_config = block_to_config,
141 .config_to_block = config_to_block,
142 .get_alt_config = get_alt_config
143};
144
145const struct efi_hii_config_access_protocol efi_hii_config_access = {
146 .extract_config_access = extract_config_access,
147 .route_config_access = route_config_access,
148 .form_callback = form_callback
149};