blob: 31b0c97eb286147ff9cfd1bc14948c5ebf4628dd [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
13#include <common.h>
14#include <efi_loader.h>
15
16const efi_guid_t efi_guid_hii_config_routing_protocol
17 = EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID;
18const 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
25static efi_status_t EFIAPI
26extract_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
36static efi_status_t EFIAPI
37export_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
45static efi_status_t EFIAPI
46route_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
55static efi_status_t EFIAPI
56block_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
69static efi_status_t EFIAPI
70config_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
82static efi_status_t EFIAPI
83get_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{
Heinrich Schuchardt282249d2022-01-16 14:15:31 +010091 EFI_ENTRY("%p, \"%ls\", %pUs, \"%ls\", %p, \"%ls\", %p",
AKASHI Takahiroca8aa712019-01-21 12:13:00 +090092 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
102efi_status_t EFIAPI
103extract_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
113efi_status_t EFIAPI
114route_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
123efi_status_t EFIAPI
124form_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 Schuchardt4b6f19f2019-01-23 22:55:36 +0100131 EFI_ENTRY("%p, 0x%zx, 0x%x, 0x%x, %p, %p", this, action,
AKASHI Takahiroca8aa712019-01-21 12:13:00 +0900132 question_id, type, value, action_request);
133
134 return EFI_EXIT(EFI_DEVICE_ERROR);
135};
136
137const 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
146const 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};