-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
UefiInternalFormRepresentation.h
1690 lines (1441 loc) · 49.4 KB
/
UefiInternalFormRepresentation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/** @file
This file defines the encoding for the VFR (Visual Form Representation) language.
IFR is primarily consumed by the EFI presentation engine, and produced by EFI
internal application and drivers as well as all add-in card option-ROM drivers
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
These definitions are from UEFI 2.6
**/
#ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__
#define __UEFI_INTERNAL_FORMREPRESENTATION_H__
#define EFI_HII_PLATFORM_SETUP_FORMSET_GUID \
{ 0x93039971, 0x8545, 0x4b04, { 0xb4, 0x5e, 0x32, 0xeb, 0x83, 0x26, 0x4, 0xe } }
//
// The following types are currently defined:
//
typedef UINT32 RELOFST;
typedef VOID* EFI_HII_HANDLE;
typedef CHAR16* EFI_STRING;
typedef UINT16 EFI_IMAGE_ID;
typedef UINT16 EFI_QUESTION_ID;
typedef UINT16 EFI_STRING_ID;
typedef UINT16 EFI_FORM_ID;
typedef UINT16 EFI_VARSTORE_ID;
typedef UINT16 EFI_DEFAULT_ID;
typedef UINT32 EFI_HII_FONT_STYLE;
#pragma pack(1)
//
// HII package list
//
typedef struct {
EFI_GUID PackageListGuid;
UINT32 PackageLength;
} EFI_HII_PACKAGE_LIST_HEADER;
/**
Each package starts with a header, as defined above, which
indicates the size and type of the package. When added to a
pointer pointing to the start of the header, Length points at
the next package. The package lists form a package list when
concatenated together and terminated with an
EFI_HII_PACKAGE_HEADER with a Type of EFI_HII_PACKAGE_END. The
type EFI_HII_PACKAGE_TYPE_GUID is used for vendor-defined HII
packages, whose contents are determined by the Guid. The range
of package types starting with EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN
through EFI_HII_PACKAGE_TYPE_SYSTEM_END are reserved for system
firmware implementers.
@param Length The size of the package in bytes.
@param Type The package type. See EFI_HII_PACKAGE_TYPE_x,
below.
@param Data The package data, the format of which is
determined by Type.
**/
typedef struct {
UINT32 Length:24;
UINT32 Type:8;
// UINT8 Data[...];
} EFI_HII_PACKAGE_HEADER;
//
// EFI_HII_PACKAGE_TYPE_x.
//
#define EFI_HII_PACKAGE_TYPE_ALL 0x00
#define EFI_HII_PACKAGE_TYPE_GUID 0x01
#define EFI_HII_PACKAGE_FORM 0x02
#define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x03
#define EFI_HII_PACKAGE_STRINGS 0x04
#define EFI_HII_PACKAGE_FONTS 0x05
#define EFI_HII_PACKAGE_IMAGES 0x06
#define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
#define EFI_HII_PACKAGE_DEVICE_PATH 0x08
#define EFI_HII_PACKAGE_END 0xDF
#define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
#define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
//
// Simplified Font Package
//
#define EFI_GLYPH_HEIGHT 19
#define EFI_GLYPH_WIDTH 8
//
// Contents of EFI_NARROW_GLYPH.Attributes
//
#define EFI_GLYPH_NON_SPACING 0x01
#define EFI_GLYPH_WIDE 0x02
typedef struct {
CHAR16 UnicodeWeight;
UINT8 Attributes;
UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
} EFI_NARROW_GLYPH;
typedef struct {
CHAR16 UnicodeWeight;
UINT8 Attributes;
UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
UINT8 GlyphCol2[EFI_GLYPH_HEIGHT];
UINT8 Pad[3];
} EFI_WIDE_GLYPH;
typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
EFI_HII_PACKAGE_HEADER Header;
UINT16 NumberOfNarrowGlyphs;
UINT16 NumberOfWideGlyphs;
// EFI_NARROW_GLYPH NarrowGlyphs[];
// EFI_WIDE_GLYPH WideGlyphs[];
} EFI_HII_SIMPLE_FONT_PACKAGE_HDR;
//
// Font Package
//
#define EFI_HII_FONT_STYLE_BOLD 0x00000001
#define EFI_HII_FONT_STYLE_ITALIC 0x00000002
#define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
#define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
#define EFI_HII_FONT_STYLE_SHADOW 0x00040000
#define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
#define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
typedef struct _EFI_HII_GLYPH_INFO {
UINT16 Width;
UINT16 Height;
INT16 OffsetX;
INT16 OffsetY;
INT16 AdvanceX;
} EFI_HII_GLYPH_INFO;
typedef struct _EFI_HII_FONT_PACKAGE_HDR {
EFI_HII_PACKAGE_HEADER Header;
UINT32 HdrSize;
UINT32 GlyphBlockOffset;
EFI_HII_GLYPH_INFO Cell;
EFI_HII_FONT_STYLE FontStyle;
CHAR16 FontFamily[1];
} EFI_HII_FONT_PACKAGE_HDR;
#define EFI_HII_GIBT_END 0x00
#define EFI_HII_GIBT_GLYPH 0x10
#define EFI_HII_GIBT_GLYPHS 0x11
#define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
#define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
#define EFI_HII_GIBT_GLYPH_VARIABILITY 0x14
#define EFI_HII_GIBT_DUPLICATE 0x20
#define EFI_HII_GIBT_SKIP2 0x21
#define EFI_HII_GIBT_SKIP1 0x22
#define EFI_HII_GIBT_DEFAULTS 0x23
#define EFI_HII_GIBT_EXT1 0x30
#define EFI_HII_GIBT_EXT2 0x31
#define EFI_HII_GIBT_EXT4 0x32
typedef struct _EFI_HII_GLYPH_BLOCK {
UINT8 BlockType;
} EFI_HII_GLYPH_BLOCK;
typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
EFI_HII_GLYPH_INFO Cell;
} EFI_HII_GIBT_DEFAULTS_BLOCK;
typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
CHAR16 CharValue;
} EFI_HII_GIBT_DUPLICATE_BLOCK;
typedef struct _EFI_GLYPH_GIBT_END_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
} EFI_GLYPH_GIBT_END_BLOCK;
typedef struct _EFI_HII_GIBT_EXT1_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
UINT8 BlockType2;
UINT8 Length;
} EFI_HII_GIBT_EXT1_BLOCK;
typedef struct _EFI_HII_GIBT_EXT2_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
UINT8 BlockType2;
UINT16 Length;
} EFI_HII_GIBT_EXT2_BLOCK;
typedef struct _EFI_HII_GIBT_EXT4_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
UINT8 BlockType2;
UINT32 Length;
} EFI_HII_GIBT_EXT4_BLOCK;
typedef struct _EFI_HII_GIBT_GLYPH_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
EFI_HII_GLYPH_INFO Cell;
UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Cell.Width+7)/8)*Cell.Height
} EFI_HII_GIBT_GLYPH_BLOCK;
typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
EFI_HII_GLYPH_INFO Cell;
UINT16 Count;
UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Cell.Width+7)/8)*Cell.Height
} EFI_HII_GIBT_GLYPHS_BLOCK;
typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Global.Cell.Width+7)/8)*Global.Cell.Height
} EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK;
typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
UINT16 Count;
UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Global.Cell.Width+7)/8)*Global.Cell.Height
} EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;
typedef struct _EFI_HII_GIBT_VARIABILITY_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
EFI_HII_GLYPH_INFO Cell;
UINT8 GlyphPackInBits;
UINT8 BitmapData [1];
} EFI_HII_GIBT_VARIABILITY_BLOCK;
typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
UINT8 SkipCount;
} EFI_HII_GIBT_SKIP1_BLOCK;
typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
UINT16 SkipCount;
} EFI_HII_GIBT_SKIP2_BLOCK;
//
// Device Path Package
//
typedef struct _EFI_HII_DEVICE_PATH_PACKAGE {
EFI_HII_PACKAGE_HEADER Header;
// EFI_DEVICE_PATH_PROTOCOL DevicePath[];
} EFI_HII_DEVICE_PATH_PACKAGE;
//
// GUID Package
//
typedef struct _EFI_HII_GUID_PACKAGE_HDR {
EFI_HII_PACKAGE_HEADER Header;
EFI_GUID Guid;
// Data per GUID definition may follow
} EFI_HII_GUID_PACKAGE_HDR;
//
// String Package
//
#define UEFI_CONFIG_LANG "x-UEFI"
#define UEFI_CONFIG_LANG2 "x-i-UEFI"
typedef struct _EFI_HII_STRING_PACKAGE_HDR {
EFI_HII_PACKAGE_HEADER Header;
UINT32 HdrSize;
UINT32 StringInfoOffset;
CHAR16 LanguageWindow[16];
EFI_STRING_ID LanguageName;
CHAR8 Language[1];
} EFI_HII_STRING_PACKAGE_HDR;
typedef struct {
UINT8 BlockType;
} EFI_HII_STRING_BLOCK;
#define EFI_HII_SIBT_END 0x00
#define EFI_HII_SIBT_STRING_SCSU 0x10
#define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
#define EFI_HII_SIBT_STRINGS_SCSU 0x12
#define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
#define EFI_HII_SIBT_STRING_UCS2 0x14
#define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
#define EFI_HII_SIBT_STRINGS_UCS2 0x16
#define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
#define EFI_HII_SIBT_DUPLICATE 0x20
#define EFI_HII_SIBT_SKIP2 0x21
#define EFI_HII_SIBT_SKIP1 0x22
#define EFI_HII_SIBT_EXT1 0x30
#define EFI_HII_SIBT_EXT2 0x31
#define EFI_HII_SIBT_EXT4 0x32
#define EFI_HII_SIBT_FONT 0x40
typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK {
EFI_HII_STRING_BLOCK Header;
EFI_STRING_ID StringId;
} EFI_HII_SIBT_DUPLICATE_BLOCK;
typedef struct _EFI_HII_SIBT_END_BLOCK {
EFI_HII_STRING_BLOCK Header;
} EFI_HII_SIBT_END_BLOCK;
typedef struct _EFI_HII_SIBT_EXT1_BLOCK {
EFI_HII_STRING_BLOCK Header;
UINT8 BlockType2;
UINT8 Length;
} EFI_HII_SIBT_EXT1_BLOCK;
typedef struct _EFI_HII_SIBT_EXT2_BLOCK {
EFI_HII_STRING_BLOCK Header;
UINT8 BlockType2;
UINT16 Length;
} EFI_HII_SIBT_EXT2_BLOCK;
typedef struct _EFI_HII_SIBT_EXT4_BLOCK {
EFI_HII_STRING_BLOCK Header;
UINT8 BlockType2;
UINT32 Length;
} EFI_HII_SIBT_EXT4_BLOCK;
typedef struct _EFI_HII_SIBT_FONT_BLOCK {
EFI_HII_SIBT_EXT2_BLOCK Header;
UINT8 FontId;
UINT16 FontSize;
EFI_HII_FONT_STYLE FontStyle;
CHAR16 FontName[1];
} EFI_HII_SIBT_FONT_BLOCK;
typedef struct _EFI_HII_SIBT_SKIP1_BLOCK {
EFI_HII_STRING_BLOCK Header;
UINT8 SkipCount;
} EFI_HII_SIBT_SKIP1_BLOCK;
typedef struct _EFI_HII_SIBT_SKIP2_BLOCK {
EFI_HII_STRING_BLOCK Header;
UINT16 SkipCount;
} EFI_HII_SIBT_SKIP2_BLOCK;
typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK {
EFI_HII_STRING_BLOCK Header;
UINT8 StringText[1];
} EFI_HII_SIBT_STRING_SCSU_BLOCK;
typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK {
EFI_HII_STRING_BLOCK Header;
UINT8 FontIdentifier;
UINT8 StringText[1];
} EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK;
typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK {
EFI_HII_STRING_BLOCK Header;
UINT16 StringCount;
UINT8 StringText[1];
} EFI_HII_SIBT_STRINGS_SCSU_BLOCK;
typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK {
EFI_HII_STRING_BLOCK Header;
UINT8 FontIdentifier;
UINT16 StringCount;
UINT8 StringText[1];
} EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK;
typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK {
EFI_HII_STRING_BLOCK Header;
CHAR16 StringText[1];
} EFI_HII_SIBT_STRING_UCS2_BLOCK;
typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK {
EFI_HII_STRING_BLOCK Header;
UINT8 FontIdentifier;
CHAR16 StringText[1];
} EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK;
typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK {
EFI_HII_STRING_BLOCK Header;
UINT16 StringCount;
CHAR16 StringText[1];
} EFI_HII_SIBT_STRINGS_UCS2_BLOCK;
typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK {
EFI_HII_STRING_BLOCK Header;
UINT8 FontIdentifier;
UINT16 StringCount;
CHAR16 StringText[1];
} EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK;
//
// Image Packages
//
typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {
EFI_HII_PACKAGE_HEADER Header;
UINT32 ImageInfoOffset;
UINT32 PaletteInfoOffset;
} EFI_HII_IMAGE_PACKAGE_HDR;
typedef struct _EFI_HII_IMAGE_BLOCK {
UINT8 BlockType;
} EFI_HII_IMAGE_BLOCK;
#define EFI_HII_IIBT_END 0x00
#define EFI_HII_IIBT_IMAGE_1BIT 0x10
#define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
#define EFI_HII_IIBT_IMAGE_4BIT 0x12
#define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
#define EFI_HII_IIBT_IMAGE_8BIT 0x14
#define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
#define EFI_HII_IIBT_IMAGE_24BIT 0x16
#define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
#define EFI_HII_IIBT_IMAGE_JPEG 0x18
#define EFI_HII_IIBT_IMAGE_PNG 0x19
#define EFI_HII_IIBT_DUPLICATE 0x20
#define EFI_HII_IIBT_SKIP2 0x21
#define EFI_HII_IIBT_SKIP1 0x22
#define EFI_HII_IIBT_EXT1 0x30
#define EFI_HII_IIBT_EXT2 0x31
#define EFI_HII_IIBT_EXT4 0x32
typedef struct _EFI_HII_IIBT_END_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
} EFI_HII_IIBT_END_BLOCK;
typedef struct _EFI_HII_IIBT_EXT1_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT8 BlockType2;
UINT8 Length;
} EFI_HII_IIBT_EXT1_BLOCK;
typedef struct _EFI_HII_IIBT_EXT2_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT8 BlockType2;
UINT16 Length;
} EFI_HII_IIBT_EXT2_BLOCK;
typedef struct _EFI_HII_IIBT_EXT4_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT8 BlockType2;
UINT32 Length;
} EFI_HII_IIBT_EXT4_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE {
UINT16 Width;
UINT16 Height;
UINT8 Data[1];
} EFI_HII_IIBT_IMAGE_1BIT_BASE;
typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT8 PaletteIndex;
EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_1BIT_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT8 PaletteIndex;
EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK;
typedef struct _EFI_HII_RGB_PIXEL {
UINT8 b;
UINT8 g;
UINT8 r;
} EFI_HII_RGB_PIXEL;
typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE {
UINT16 Width;
UINT16 Height;
EFI_HII_RGB_PIXEL Bitmap[1];
} EFI_HII_IIBT_IMAGE_24BIT_BASE;
typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_24BIT_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE {
UINT16 Width;
UINT16 Height;
UINT8 Data[1];
} EFI_HII_IIBT_IMAGE_4BIT_BASE;
typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT8 PaletteIndex;
EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_4BIT_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT8 PaletteIndex;
EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE {
UINT16 Width;
UINT16 Height;
UINT8 Data[1];
} EFI_HII_IIBT_IMAGE_8BIT_BASE;
typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT8 PaletteIndex;
EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_8BIT_BLOCK;
typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT8 PaletteIndex;
EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
} EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK;
typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
EFI_IMAGE_ID ImageId;
} EFI_HII_IIBT_DUPLICATE_BLOCK;
typedef struct _EFI_HII_IIBT_JPEG_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT32 Size;
UINT8 Data[1];
} EFI_HII_IIBT_JPEG_BLOCK;
typedef struct _EFI_HII_IIBT_PNG_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT32 Size;
UINT8 Data[1];
} EFI_HII_IIBT_PNG_BLOCK;
typedef struct _EFI_HII_IIBT_SKIP1_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT8 SkipCount;
} EFI_HII_IIBT_SKIP1_BLOCK;
typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
UINT16 SkipCount;
} EFI_HII_IIBT_SKIP2_BLOCK;
typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {
UINT16 PaletteCount;
} EFI_HII_IMAGE_PALETTE_INFO_HEADER;
typedef struct _EFI_HII_IMAGE_PALETTE_INFO {
UINT16 PaletteSize;
EFI_HII_RGB_PIXEL PaletteValue[1];
} EFI_HII_IMAGE_PALETTE_INFO;
//
// Forms Package
//
typedef struct _EFI_HII_FORM_PACKAGE {
EFI_HII_PACKAGE_HEADER Header;
// EFI_IFR_OP_HEADER OpCodeHeader;
// More op-codes follow
} EFI_HII_FORM_PACKAGE;
typedef struct {
UINT8 Hour;
UINT8 Minute;
UINT8 Second;
} EFI_HII_TIME;
typedef struct {
UINT16 Year;
UINT8 Month;
UINT8 Day;
} EFI_HII_DATE;
typedef struct {
EFI_QUESTION_ID QuestionId;
EFI_FORM_ID FormId;
EFI_GUID FormSetGuid;
EFI_STRING_ID DevicePath;
} EFI_HII_REF;
typedef union {
UINT8 u8;
UINT16 u16;
UINT32 u32;
UINT64 u64;
BOOLEAN b;
EFI_HII_TIME time;
EFI_HII_DATE date;
EFI_STRING_ID string;
EFI_HII_REF ref;
} EFI_IFR_TYPE_VALUE;
#define EFI_IFR_FORM_OP 0x01
#define EFI_IFR_SUBTITLE_OP 0x02
#define EFI_IFR_TEXT_OP 0x03
#define EFI_IFR_IMAGE_OP 0x04
#define EFI_IFR_ONE_OF_OP 0x05
#define EFI_IFR_CHECKBOX_OP 0x06
#define EFI_IFR_NUMERIC_OP 0x07
#define EFI_IFR_PASSWORD_OP 0x08
#define EFI_IFR_ONE_OF_OPTION_OP 0x09
#define EFI_IFR_SUPPRESS_IF_OP 0x0A
#define EFI_IFR_LOCKED_OP 0x0B
#define EFI_IFR_ACTION_OP 0x0C
#define EFI_IFR_RESET_BUTTON_OP 0x0D
#define EFI_IFR_FORM_SET_OP 0x0E
#define EFI_IFR_REF_OP 0x0F
#define EFI_IFR_NO_SUBMIT_IF_OP 0x10
#define EFI_IFR_INCONSISTENT_IF_OP 0x11
#define EFI_IFR_EQ_ID_VAL_OP 0x12
#define EFI_IFR_EQ_ID_ID_OP 0x13
#define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14
#define EFI_IFR_AND_OP 0x15
#define EFI_IFR_OR_OP 0x16
#define EFI_IFR_NOT_OP 0x17
#define EFI_IFR_RULE_OP 0x18
#define EFI_IFR_GRAY_OUT_IF_OP 0x19
#define EFI_IFR_DATE_OP 0x1A
#define EFI_IFR_TIME_OP 0x1B
#define EFI_IFR_STRING_OP 0x1C
#define EFI_IFR_REFRESH_OP 0x1D
#define EFI_IFR_DISABLE_IF_OP 0x1E
#define EFI_IFR_TO_LOWER_OP 0x20
#define EFI_IFR_TO_UPPER_OP 0x21
#define EFI_IFR_MAP_OP 0x22
#define EFI_IFR_ORDERED_LIST_OP 0x23
#define EFI_IFR_VARSTORE_OP 0x24
#define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
#define EFI_IFR_VARSTORE_EFI_OP 0x26
#define EFI_IFR_VARSTORE_DEVICE_OP 0x27
#define EFI_IFR_VERSION_OP 0x28
#define EFI_IFR_END_OP 0x29
#define EFI_IFR_MATCH_OP 0x2A
#define EFI_IFR_GET_OP 0x2B
#define EFI_IFR_SET_OP 0x2C
#define EFI_IFR_READ_OP 0x2D
#define EFI_IFR_WRITE_OP 0x2E
#define EFI_IFR_EQUAL_OP 0x2F
#define EFI_IFR_NOT_EQUAL_OP 0x30
#define EFI_IFR_GREATER_THAN_OP 0x31
#define EFI_IFR_GREATER_EQUAL_OP 0x32
#define EFI_IFR_LESS_THAN_OP 0x33
#define EFI_IFR_LESS_EQUAL_OP 0x34
#define EFI_IFR_BITWISE_AND_OP 0x35
#define EFI_IFR_BITWISE_OR_OP 0x36
#define EFI_IFR_BITWISE_NOT_OP 0x37
#define EFI_IFR_SHIFT_LEFT_OP 0x38
#define EFI_IFR_SHIFT_RIGHT_OP 0x39
#define EFI_IFR_ADD_OP 0x3A
#define EFI_IFR_SUBTRACT_OP 0x3B
#define EFI_IFR_MULTIPLY_OP 0x3C
#define EFI_IFR_DIVIDE_OP 0x3D
#define EFI_IFR_MODULO_OP 0x3E
#define EFI_IFR_RULE_REF_OP 0x3F
#define EFI_IFR_QUESTION_REF1_OP 0x40
#define EFI_IFR_QUESTION_REF2_OP 0x41
#define EFI_IFR_UINT8_OP 0x42
#define EFI_IFR_UINT16_OP 0x43
#define EFI_IFR_UINT32_OP 0x44
#define EFI_IFR_UINT64_OP 0x45
#define EFI_IFR_TRUE_OP 0x46
#define EFI_IFR_FALSE_OP 0x47
#define EFI_IFR_TO_UINT_OP 0x48
#define EFI_IFR_TO_STRING_OP 0x49
#define EFI_IFR_TO_BOOLEAN_OP 0x4A
#define EFI_IFR_MID_OP 0x4B
#define EFI_IFR_FIND_OP 0x4C
#define EFI_IFR_TOKEN_OP 0x4D
#define EFI_IFR_STRING_REF1_OP 0x4E
#define EFI_IFR_STRING_REF2_OP 0x4F
#define EFI_IFR_CONDITIONAL_OP 0x50
#define EFI_IFR_QUESTION_REF3_OP 0x51
#define EFI_IFR_ZERO_OP 0x52
#define EFI_IFR_ONE_OP 0x53
#define EFI_IFR_ONES_OP 0x54
#define EFI_IFR_UNDEFINED_OP 0x55
#define EFI_IFR_LENGTH_OP 0x56
#define EFI_IFR_DUP_OP 0x57
#define EFI_IFR_THIS_OP 0x58
#define EFI_IFR_SPAN_OP 0x59
#define EFI_IFR_VALUE_OP 0x5A
#define EFI_IFR_DEFAULT_OP 0x5B
#define EFI_IFR_DEFAULTSTORE_OP 0x5C
#define EFI_IFR_FORM_MAP_OP 0x5D
#define EFI_IFR_CATENATE_OP 0x5E
#define EFI_IFR_GUID_OP 0x5F
#define EFI_IFR_SECURITY_OP 0x60
#define EFI_IFR_MODAL_TAG_OP 0x61
#define EFI_IFR_REFRESH_ID_OP 0x62
#define EFI_IFR_WARNING_IF_OP 0x63
#define EFI_IFR_MATCH2_OP 0x64
typedef struct _EFI_IFR_OP_HEADER {
UINT8 OpCode;
UINT8 Length:7;
UINT8 Scope:1;
} EFI_IFR_OP_HEADER;
typedef struct _EFI_IFR_STATEMENT_HEADER {
EFI_STRING_ID Prompt;
EFI_STRING_ID Help;
} EFI_IFR_STATEMENT_HEADER;
typedef struct _EFI_IFR_QUESTION_HEADER {
EFI_IFR_STATEMENT_HEADER Header;
EFI_QUESTION_ID QuestionId;
EFI_VARSTORE_ID VarStoreId;
union {
EFI_STRING_ID VarName;
UINT16 VarOffset;
} VarStoreInfo;
UINT8 Flags;
} EFI_IFR_QUESTION_HEADER;
#define EFI_IFR_FLAG_READ_ONLY 0x01
#define EFI_IFR_FLAG_CALLBACK 0x04
#define EFI_IFR_FLAG_RESET_REQUIRED 0x10
#define EFI_IFR_FLAG_REST_STYLE 0x20
#define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
typedef struct _EFI_IFR_DEFAULTSTORE {
EFI_IFR_OP_HEADER Header;
EFI_STRING_ID DefaultName;
UINT16 DefaultId;
} EFI_IFR_DEFAULTSTORE;
#define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
#define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
#define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
#define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
#define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
#define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
#define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
#define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
#define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
typedef struct _EFI_IFR_VARSTORE {
EFI_IFR_OP_HEADER Header;
EFI_GUID Guid;
EFI_VARSTORE_ID VarStoreId;
UINT16 Size;
UINT8 Name[1];
} EFI_IFR_VARSTORE;
typedef struct _EFI_IFR_VARSTORE_EFI {
EFI_IFR_OP_HEADER Header;
EFI_VARSTORE_ID VarStoreId;
EFI_GUID Guid;
UINT32 Attributes;
UINT16 Size;
UINT8 Name[1];
} EFI_IFR_VARSTORE_EFI;
typedef struct _EFI_IFR_VARSTORE_NAME_VALUE {
EFI_IFR_OP_HEADER Header;
EFI_VARSTORE_ID VarStoreId;
EFI_GUID Guid;
} EFI_IFR_VARSTORE_NAME_VALUE;
typedef struct _EFI_IFR_FORM_SET {
EFI_IFR_OP_HEADER Header;
EFI_GUID Guid;
EFI_STRING_ID FormSetTitle;
EFI_STRING_ID Help;
UINT8 Flags;
// EFI_GUID ClassGuid[];
} EFI_IFR_FORM_SET;
typedef struct _EFI_IFR_END {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_END;
typedef struct _EFI_IFR_FORM {
EFI_IFR_OP_HEADER Header;
UINT16 FormId;
EFI_STRING_ID FormTitle;
} EFI_IFR_FORM;
typedef struct _EFI_IFR_IMAGE {
EFI_IFR_OP_HEADER Header;
EFI_IMAGE_ID Id;
} EFI_IFR_IMAGE;
typedef struct _EFI_IFR_MODAL_TAG {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_MODAL_TAG;
typedef struct _EFI_IFR_LOCKED {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_LOCKED;
typedef struct _EFI_IFR_RULE {
EFI_IFR_OP_HEADER Header;
UINT8 RuleId;
} EFI_IFR_RULE;
typedef struct _EFI_IFR_DEFAULT {
EFI_IFR_OP_HEADER Header;
UINT16 DefaultId;
UINT8 Type;
EFI_IFR_TYPE_VALUE Value;
} EFI_IFR_DEFAULT;
typedef struct _EFI_IFR_DEFAULT_2 {
EFI_IFR_OP_HEADER Header;
UINT16 DefaultId;
UINT8 Type;
} EFI_IFR_DEFAULT_2;
typedef struct _EFI_IFR_VALUE {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_VALUE;
typedef struct _EFI_IFR_SUBTITLE {
EFI_IFR_OP_HEADER Header;
EFI_IFR_STATEMENT_HEADER Statement;
UINT8 Flags;
} EFI_IFR_SUBTITLE;
#define EFI_IFR_FLAGS_HORIZONTAL 0x01
typedef struct _EFI_IFR_CHECKBOX {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
UINT8 Flags;
} EFI_IFR_CHECKBOX;
#define EFI_IFR_CHECKBOX_DEFAULT 0x01
#define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
typedef struct _EFI_IFR_TEXT {
EFI_IFR_OP_HEADER Header;
EFI_IFR_STATEMENT_HEADER Statement;
EFI_STRING_ID TextTwo;
} EFI_IFR_TEXT;
typedef struct _EFI_IFR_REF {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
EFI_FORM_ID FormId;
} EFI_IFR_REF;
typedef struct _EFI_IFR_REF2 {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
EFI_FORM_ID FormId;
EFI_QUESTION_ID QuestionId;
} EFI_IFR_REF2;
typedef struct _EFI_IFR_REF3 {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
EFI_FORM_ID FormId;
EFI_QUESTION_ID QuestionId;
EFI_GUID FormSetId;
} EFI_IFR_REF3;
typedef struct _EFI_IFR_REF4 {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
EFI_FORM_ID FormId;
EFI_QUESTION_ID QuestionId;
EFI_GUID FormSetId;
EFI_STRING_ID DevicePath;
} EFI_IFR_REF4;
typedef struct _EFI_IFR_REF5 {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
} EFI_IFR_REF5;
typedef struct _EFI_IFR_RESET_BUTTON {
EFI_IFR_OP_HEADER Header;
EFI_IFR_STATEMENT_HEADER Statement;
EFI_DEFAULT_ID DefaultId;
} EFI_IFR_RESET_BUTTON;
typedef struct _EFI_IFR_ACTION {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
EFI_STRING_ID QuestionConfig;
} EFI_IFR_ACTION;
typedef struct _EFI_IFR_ACTION_1 {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
} EFI_IFR_ACTION_1;
typedef struct _EFI_IFR_DATE {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
UINT8 Flags;
} EFI_IFR_DATE;
#define EFI_QF_DATE_YEAR_SUPPRESS 0x01
#define EFI_QF_DATE_MONTH_SUPPRESS 0x02
#define EFI_QF_DATE_DAY_SUPPRESS 0x04
#define EFI_QF_DATE_STORAGE 0x30
#define QF_DATE_STORAGE_NORMAL 0x00
#define QF_DATE_STORAGE_TIME 0x10
#define QF_DATE_STORAGE_WAKEUP 0x20
typedef union {
struct {
UINT8 MinValue;
UINT8 MaxValue;
UINT8 Step;
} u8;
struct {
UINT16 MinValue;
UINT16 MaxValue;
UINT16 Step;
} u16;
struct {
UINT32 MinValue;
UINT32 MaxValue;
UINT32 Step;
} u32;
struct {
UINT64 MinValue;
UINT64 MaxValue;
UINT64 Step;
} u64;
} MINMAXSTEP_DATA;
typedef struct _EFI_IFR_NUMERIC {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
UINT8 Flags;
MINMAXSTEP_DATA data;
} EFI_IFR_NUMERIC;
#define EFI_IFR_NUMERIC_SIZE 0x03
#define EFI_IFR_NUMERIC_SIZE_1 0x00
#define EFI_IFR_NUMERIC_SIZE_2 0x01
#define EFI_IFR_NUMERIC_SIZE_4 0x02
#define EFI_IFR_NUMERIC_SIZE_8 0x03
#define EFI_IFR_DISPLAY 0x30
#define EFI_IFR_DISPLAY_INT_DEC 0x00
#define EFI_IFR_DISPLAY_UINT_DEC 0x10
#define EFI_IFR_DISPLAY_UINT_HEX 0x20
typedef struct _EFI_IFR_ONE_OF {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
UINT8 Flags;
MINMAXSTEP_DATA data;
} EFI_IFR_ONE_OF;
typedef struct _EFI_IFR_STRING {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
UINT8 MinSize;
UINT8 MaxSize;
UINT8 Flags;
} EFI_IFR_STRING;
#define EFI_IFR_STRING_MULTI_LINE 0x01
typedef struct _EFI_IFR_PASSWORD {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
UINT16 MinSize;
UINT16 MaxSize;
} EFI_IFR_PASSWORD;
typedef struct _EFI_IFR_ORDERED_LIST {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
UINT8 MaxContainers;
UINT8 Flags;
} EFI_IFR_ORDERED_LIST;
#define EFI_IFR_UNIQUE_SET 0x01
#define EFI_IFR_NO_EMPTY_SET 0x02
typedef struct _EFI_IFR_TIME {
EFI_IFR_OP_HEADER Header;
EFI_IFR_QUESTION_HEADER Question;
UINT8 Flags;
} EFI_IFR_TIME;
#define QF_TIME_HOUR_SUPPRESS 0x01
#define QF_TIME_MINUTE_SUPPRESS 0x02