1
#ifndef _IPXE_EFI_HII_H
2
#define _IPXE_EFI_HII_H
6
* EFI human interface infrastructure
9
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
12
#include <ipxe/efi/Uefi/UefiInternalFormRepresentation.h>
13
#include <ipxe/efi/Guid/MdeModuleHii.h>
15
/** GUID indicating formset compliance for IBM Unified Configuration Manager */
16
#define EFI_HII_IBM_UCM_COMPLIANT_FORMSET_GUID \
17
{ 0x5c8e9746, 0xa5f7, 0x4593, \
18
{ 0xaf, 0x1f, 0x66, 0xa8, 0x2a, 0xa1, 0x9c, 0xb1 } }
20
/** An EFI IFR builder */
21
struct efi_ifr_builder {
23
EFI_IFR_OP_HEADER *ops;
24
/** Length of IFR opcodes */
27
EFI_HII_STRING_BLOCK *strings;
28
/** Length of strings */
30
/** Current string identifier */
31
unsigned int string_id;
32
/** Current variable store identifier */
33
unsigned int varstore_id;
34
/** Current form identifier */
36
/** An allocation has failed */
41
* Initialise IFR builder
45
* The caller must eventually call efi_ifr_free() to free the dynamic
46
* storage associated with the IFR builder.
48
static inline void efi_ifr_init ( struct efi_ifr_builder *ifr ) {
49
memset ( ifr, 0, sizeof ( *ifr ) );
52
extern unsigned int efi_ifr_string ( struct efi_ifr_builder *ifr,
53
const char *fmt, ... );
54
extern void efi_ifr_end_op ( struct efi_ifr_builder *ifr );
55
extern void efi_ifr_false_op ( struct efi_ifr_builder *ifr );
56
extern unsigned int efi_ifr_form_op ( struct efi_ifr_builder *ifr,
57
unsigned int title_id );
58
extern void efi_ifr_form_set_op ( struct efi_ifr_builder *ifr,
60
unsigned int title_id, unsigned int help_id,
62
void efi_ifr_get_op ( struct efi_ifr_builder *ifr, unsigned int varstore_id,
63
unsigned int varstore_info, unsigned int varstore_type );
64
extern void efi_ifr_guid_class_op ( struct efi_ifr_builder *ifr,
66
extern void efi_ifr_guid_subclass_op ( struct efi_ifr_builder *ifr,
67
unsigned int subclass );
68
extern void efi_ifr_numeric_op ( struct efi_ifr_builder *ifr,
69
unsigned int prompt_id,
70
unsigned int help_id, unsigned int question_id,
71
unsigned int varstore_id,
72
unsigned int varstore_info,
73
unsigned int vflags, unsigned long min_value,
74
unsigned long max_value, unsigned int step,
76
extern void efi_ifr_string_op ( struct efi_ifr_builder *ifr,
77
unsigned int prompt_id, unsigned int help_id,
78
unsigned int question_id,
79
unsigned int varstore_id,
80
unsigned int varstore_info, unsigned int vflags,
81
unsigned int min_size, unsigned int max_size,
83
extern void efi_ifr_suppress_if_op ( struct efi_ifr_builder *ifr );
84
extern void efi_ifr_text_op ( struct efi_ifr_builder *ifr,
85
unsigned int prompt_id, unsigned int help_id,
86
unsigned int text_id );
87
extern void efi_ifr_true_op ( struct efi_ifr_builder *ifr );
89
efi_ifr_varstore_name_value_op ( struct efi_ifr_builder *ifr,
90
const EFI_GUID *guid );
91
extern void efi_ifr_free ( struct efi_ifr_builder *ifr );
92
extern EFI_HII_PACKAGE_LIST_HEADER *
93
efi_ifr_package ( struct efi_ifr_builder *ifr, const EFI_GUID *guid,
94
const char *language, unsigned int language_id );
96
#endif /* _IPXE_EFI_HII_H */