1
#ifndef _IPXE_EFI_HII_H
2
#define _IPXE_EFI_HII_H
6
* EFI human interface infrastructure
9
FILE_LICENCE ( GPL2_OR_LATER );
11
#include <ipxe/efi/Uefi/UefiInternalFormRepresentation.h>
12
#include <ipxe/efi/Guid/MdeModuleHii.h>
15
* Define an EFI IFR form set type
17
* @v num_class_guids Number of class GUIDs
18
* @ret type Form set type
20
#define EFI_IFR_FORM_SET_TYPE( num_class_guids ) \
22
EFI_IFR_FORM_SET FormSet; \
23
EFI_GUID ClassGuid[num_class_guids]; \
24
} __attribute__ (( packed ))
27
* Define an EFI IFR form set
30
* @v title Title string
32
* @v type Form set type (as returned by EFI_IFR_FORM_SET_TYPE())
35
* This definition opens a new scope, which must be closed by an
38
#define EFI_IFR_FORM_SET( guid, title, help, type, ... ) { \
41
.OpCode = EFI_IFR_FORM_SET_OP, \
42
.Length = sizeof ( type ), \
46
.FormSetTitle = title, \
48
.Flags = ( sizeof ( ( ( type * ) NULL )->ClassGuid ) / \
49
sizeof ( ( ( type * ) NULL )->ClassGuid[0] ) ), \
57
* Define an EFI IFR GUID class
62
#define EFI_IFR_GUID_CLASS( class ) { \
64
.OpCode = EFI_IFR_GUID_OP, \
65
.Length = sizeof ( EFI_IFR_GUID_CLASS ), \
67
.Guid = EFI_IFR_TIANO_GUID, \
68
.ExtendOpCode = EFI_IFR_EXTEND_OP_CLASS, \
73
* Define an EFI IFR GUID subclass
75
* @v subclass Subclass
76
* @ret ifr GUID subclass
78
#define EFI_IFR_GUID_SUBCLASS( subclass ) { \
80
.OpCode = EFI_IFR_GUID_OP, \
81
.Length = sizeof ( EFI_IFR_GUID_SUBCLASS ), \
83
.Guid = EFI_IFR_TIANO_GUID, \
84
.ExtendOpCode = EFI_IFR_EXTEND_OP_SUBCLASS, \
85
.SubClass = subclass, \
89
* Define an EFI IFR form
92
* @v title Title string
95
* This definition opens a new scope, which must be closed by an
98
#define EFI_IFR_FORM( formid, title ) { \
100
.OpCode = EFI_IFR_FORM_OP, \
101
.Length = sizeof ( EFI_IFR_FORM ), \
105
.FormTitle = title, \
109
* Define an EFI IFR text widget
111
* @v prompt Prompt string
112
* @v help Help string
113
* @v text Text string
114
* @ret ifr Text widget
116
#define EFI_IFR_TEXT( prompt, help, text ) { \
118
.OpCode = EFI_IFR_TEXT_OP, \
119
.Length = sizeof ( EFI_IFR_TEXT ), \
129
* Define an EFI IFR end marker
131
* @ret ifr End marker
133
#define EFI_IFR_END() { \
135
.OpCode = EFI_IFR_END_OP, \
136
.Length = sizeof ( EFI_IFR_END ), \
140
#endif /* _IPXE_EFI_HII_H */