]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / HiiDatabase.h
1 /** @file
2 Private structures definitions in HiiDatabase.
3
4 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef __HII_DATABASE_PRIVATE_H__
10 #define __HII_DATABASE_PRIVATE_H__
11
12 #include <Uefi.h>
13
14 #include <Protocol/DevicePath.h>
15 #include <Protocol/HiiFont.h>
16 #include <Protocol/HiiImage.h>
17 #include <Protocol/HiiImageEx.h>
18 #include <Protocol/HiiImageDecoder.h>
19 #include <Protocol/HiiString.h>
20 #include <Protocol/HiiDatabase.h>
21 #include <Protocol/HiiConfigRouting.h>
22 #include <Protocol/HiiConfigAccess.h>
23 #include <Protocol/HiiConfigKeyword.h>
24 #include <Protocol/SimpleTextOut.h>
25
26 #include <Guid/HiiKeyBoardLayout.h>
27 #include <Guid/GlobalVariable.h>
28 #include <Guid/MdeModuleHii.h>
29 #include <Guid/VariableFormat.h>
30 #include <Guid/PcdDataBaseSignatureGuid.h>
31
32 #include <Library/DebugLib.h>
33 #include <Library/BaseMemoryLib.h>
34 #include <Library/UefiDriverEntryPoint.h>
35 #include <Library/UefiBootServicesTableLib.h>
36 #include <Library/BaseLib.h>
37 #include <Library/DevicePathLib.h>
38 #include <Library/MemoryAllocationLib.h>
39 #include <Library/UefiLib.h>
40 #include <Library/PcdLib.h>
41 #include <Library/UefiRuntimeServicesTableLib.h>
42 #include <Library/PrintLib.h>
43
44 #define MAX_STRING_LENGTH 1024
45 #define MAX_FONT_NAME_LEN 256
46 #define NARROW_BASELINE 15
47 #define WIDE_BASELINE 14
48 #define SYS_FONT_INFO_MASK 0x37
49 #define REPLACE_UNKNOWN_GLYPH 0xFFFD
50 #define PROPORTIONAL_GLYPH 0x80
51 #define NARROW_GLYPH 0x40
52
53 #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))
54 #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))
55 #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))
56 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)
57
58 extern EFI_LOCK mHiiDatabaseLock;
59
60 //
61 // IFR data structure
62 //
63 // BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.
64
65 typedef struct {
66 LIST_ENTRY Entry; // Link to VarStorage Default Data
67 UINT16 DefaultId;
68 VARIABLE_STORE_HEADER *VariableStorage;
69 } VARSTORAGE_DEFAULT_DATA;
70
71 typedef struct {
72 LIST_ENTRY Entry; // Link to VarStorage
73 EFI_GUID Guid;
74 CHAR16 *Name;
75 UINT16 Size;
76 UINT8 Type;
77 LIST_ENTRY BlockEntry; // Link to its Block array
78 } IFR_VARSTORAGE_DATA;
79
80 typedef struct {
81 LIST_ENTRY Entry; // Link to Block array
82 UINT16 Offset;
83 UINT16 Width;
84 UINT16 BitOffset;
85 UINT16 BitWidth;
86 EFI_QUESTION_ID QuestionId;
87 UINT8 OpCode;
88 UINT8 Scope;
89 LIST_ENTRY DefaultValueEntry; // Link to its default value array
90 CHAR16 *Name;
91 BOOLEAN IsBitVar;
92 } IFR_BLOCK_DATA;
93
94 //
95 // Get default value from IFR data.
96 //
97 typedef enum {
98 DefaultValueFromDefault = 0, // Get from the minimum or first one when not set default value.
99 DefaultValueFromOtherDefault, // Get default vale from other default when no default(When other
100 // defaults are more than one, use the default with smallest default id).
101 DefaultValueFromFlag, // Get default value from the default flag.
102 DefaultValueFromOpcode // Get default value from default opcode, highest priority.
103 } DEFAULT_VALUE_TYPE;
104
105 typedef struct {
106 LIST_ENTRY Entry;
107 DEFAULT_VALUE_TYPE Type;
108 BOOLEAN Cleaned; // Whether this value is cleaned
109 // TRUE Cleaned, the value can't be used
110 // FALSE Not cleaned, the value can be used.
111 UINT16 DefaultId;
112 EFI_IFR_TYPE_VALUE Value;
113 } IFR_DEFAULT_DATA;
114
115 //
116 // Storage types
117 //
118 #define EFI_HII_VARSTORE_BUFFER 0
119 #define EFI_HII_VARSTORE_NAME_VALUE 1
120 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
121 #define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3
122
123 //
124 // Keyword handler protocol filter type.
125 //
126 #define EFI_KEYWORD_FILTER_READONY 0x01
127 #define EFI_KEYWORD_FILTER_REAWRITE 0x02
128 #define EFI_KEYWORD_FILTER_BUFFER 0x10
129 #define EFI_KEYWORD_FILTER_NUMERIC 0x20
130 #define EFI_KEYWORD_FILTER_NUMERIC_1 0x30
131 #define EFI_KEYWORD_FILTER_NUMERIC_2 0x40
132 #define EFI_KEYWORD_FILTER_NUMERIC_4 0x50
133 #define EFI_KEYWORD_FILTER_NUMERIC_8 0x60
134
135 #define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G')
136 typedef struct {
137 UINTN Signature;
138 LIST_ENTRY Entry;
139
140 EFI_HII_HANDLE HiiHandle;
141 EFI_HANDLE DriverHandle;
142
143 UINT8 Type; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
144 EFI_GUID Guid;
145 CHAR16 *Name;
146 UINT16 Size;
147 } HII_FORMSET_STORAGE;
148
149 //
150 // String Package definitions
151 //
152 #define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p')
153 typedef struct _HII_STRING_PACKAGE_INSTANCE {
154 UINTN Signature;
155 EFI_HII_STRING_PACKAGE_HDR *StringPkgHdr;
156 UINT8 *StringBlock;
157 LIST_ENTRY StringEntry;
158 LIST_ENTRY FontInfoList; // local font info list
159 UINT8 FontId;
160 EFI_STRING_ID MaxStringId; // record StringId
161 } HII_STRING_PACKAGE_INSTANCE;
162
163 //
164 // Form Package definitions
165 //
166 #define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p')
167 typedef struct _HII_IFR_PACKAGE_INSTANCE {
168 UINTN Signature;
169 EFI_HII_PACKAGE_HEADER FormPkgHdr;
170 UINT8 *IfrData;
171 LIST_ENTRY IfrEntry;
172 } HII_IFR_PACKAGE_INSTANCE;
173
174 //
175 // Simple Font Package definitions
176 //
177 #define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p')
178 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE {
179 UINTN Signature;
180 EFI_HII_SIMPLE_FONT_PACKAGE_HDR *SimpleFontPkgHdr;
181 LIST_ENTRY SimpleFontEntry;
182 } HII_SIMPLE_FONT_PACKAGE_INSTANCE;
183
184 //
185 // Font Package definitions
186 //
187 #define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p')
188 typedef struct _HII_FONT_PACKAGE_INSTANCE {
189 UINTN Signature;
190 EFI_HII_FONT_PACKAGE_HDR *FontPkgHdr;
191 UINT16 Height;
192 UINT16 BaseLine;
193 UINT8 *GlyphBlock;
194 LIST_ENTRY FontEntry;
195 LIST_ENTRY GlyphInfoList;
196 } HII_FONT_PACKAGE_INSTANCE;
197
198 #define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s')
199 typedef struct _HII_GLYPH_INFO {
200 UINTN Signature;
201 LIST_ENTRY Entry;
202 CHAR16 CharId;
203 EFI_HII_GLYPH_INFO Cell;
204 } HII_GLYPH_INFO;
205
206 #define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i')
207 typedef struct _HII_FONT_INFO {
208 UINTN Signature;
209 LIST_ENTRY Entry;
210 LIST_ENTRY *GlobalEntry;
211 UINT8 FontId;
212 } HII_FONT_INFO;
213
214 #define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i')
215 typedef struct _HII_GLOBAL_FONT_INFO {
216 UINTN Signature;
217 LIST_ENTRY Entry;
218 HII_FONT_PACKAGE_INSTANCE *FontPackage;
219 UINTN FontInfoSize;
220 EFI_FONT_INFO *FontInfo;
221 } HII_GLOBAL_FONT_INFO;
222
223 //
224 // Image Package definitions
225 //
226
227 #define HII_PIXEL_MASK 0x80
228
229 typedef struct _HII_IMAGE_PACKAGE_INSTANCE {
230 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr;
231 UINT32 ImageBlockSize;
232 UINT32 PaletteInfoSize;
233 EFI_HII_IMAGE_BLOCK *ImageBlock;
234 UINT8 *PaletteBlock;
235 } HII_IMAGE_PACKAGE_INSTANCE;
236
237 //
238 // Keyboard Layout Package definitions
239 //
240 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')
241 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE {
242 UINTN Signature;
243 UINT8 *KeyboardPkg;
244 LIST_ENTRY KeyboardEntry;
245 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE;
246
247 //
248 // Guid Package definitions
249 //
250 #define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p')
251 typedef struct _HII_GUID_PACKAGE_INSTANCE {
252 UINTN Signature;
253 UINT8 *GuidPkg;
254 LIST_ENTRY GuidEntry;
255 } HII_GUID_PACKAGE_INSTANCE;
256
257 //
258 // A package list can contain only one or less than one device path package.
259 // This rule also applies to image package since ImageId can not be duplicate.
260 //
261 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE {
262 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr;
263 LIST_ENTRY GuidPkgHdr;
264 LIST_ENTRY FormPkgHdr;
265 LIST_ENTRY KeyboardLayoutHdr;
266 LIST_ENTRY StringPkgHdr;
267 LIST_ENTRY FontPkgHdr;
268 HII_IMAGE_PACKAGE_INSTANCE *ImagePkg;
269 LIST_ENTRY SimpleFontPkgHdr;
270 UINT8 *DevicePathPkg;
271 } HII_DATABASE_PACKAGE_LIST_INSTANCE;
272
273 #define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l')
274
275 typedef struct {
276 UINTN Signature;
277 LIST_ENTRY Handle;
278 UINTN Key;
279 } HII_HANDLE;
280
281 #define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r')
282
283 typedef struct _HII_DATABASE_RECORD {
284 UINTN Signature;
285 HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList;
286 EFI_HANDLE DriverHandle;
287 EFI_HII_HANDLE Handle;
288 LIST_ENTRY DatabaseEntry;
289 } HII_DATABASE_RECORD;
290
291 #define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n')
292
293 typedef struct _HII_DATABASE_NOTIFY {
294 UINTN Signature;
295 EFI_HANDLE NotifyHandle;
296 UINT8 PackageType;
297 EFI_GUID *PackageGuid;
298 EFI_HII_DATABASE_NOTIFY PackageNotifyFn;
299 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType;
300 LIST_ENTRY DatabaseNotifyEntry;
301 } HII_DATABASE_NOTIFY;
302
303 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')
304
305 typedef struct _HII_DATABASE_PRIVATE_DATA {
306 UINTN Signature;
307 LIST_ENTRY DatabaseList;
308 LIST_ENTRY DatabaseNotifyList;
309 EFI_HII_FONT_PROTOCOL HiiFont;
310 EFI_HII_IMAGE_PROTOCOL HiiImage;
311 EFI_HII_IMAGE_EX_PROTOCOL HiiImageEx;
312 EFI_HII_STRING_PROTOCOL HiiString;
313 EFI_HII_DATABASE_PROTOCOL HiiDatabase;
314 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting;
315 EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL ConfigKeywordHandler;
316 LIST_ENTRY HiiHandleList;
317 INTN HiiHandleCount;
318 LIST_ENTRY FontInfoList; // global font info list
319 UINTN Attribute; // default system color
320 EFI_GUID CurrentLayoutGuid;
321 EFI_HII_KEYBOARD_LAYOUT *CurrentLayout;
322 } HII_DATABASE_PRIVATE_DATA;
323
324 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
325 CR (a, \
326 HII_DATABASE_PRIVATE_DATA, \
327 HiiFont, \
328 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
329 )
330
331 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
332 CR (a, \
333 HII_DATABASE_PRIVATE_DATA, \
334 HiiImage, \
335 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
336 )
337
338 #define HII_IMAGE_EX_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
339 CR (a, \
340 HII_DATABASE_PRIVATE_DATA, \
341 HiiImageEx, \
342 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
343 )
344
345 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
346 CR (a, \
347 HII_DATABASE_PRIVATE_DATA, \
348 HiiString, \
349 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
350 )
351
352 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
353 CR (a, \
354 HII_DATABASE_PRIVATE_DATA, \
355 HiiDatabase, \
356 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
357 )
358
359 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
360 CR (a, \
361 HII_DATABASE_PRIVATE_DATA, \
362 ConfigRouting, \
363 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
364 )
365
366 #define CONFIG_KEYWORD_HANDLER_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
367 CR (a, \
368 HII_DATABASE_PRIVATE_DATA, \
369 ConfigKeywordHandler, \
370 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
371 )
372
373 //
374 // Internal function prototypes.
375 //
376
377 /**
378 Generate a sub string then output it.
379
380 This is a internal function.
381
382 @param String A constant string which is the prefix of the to be
383 generated string, e.g. GUID=
384
385 @param BufferLen The length of the Buffer in bytes.
386
387 @param Buffer Points to a buffer which will be converted to be the
388 content of the generated string.
389
390 @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
391 UINT8 *; if 2, the buffer contains unicode string for the value of NAME;
392 if 3, the buffer contains other data.
393
394 @param SubStr Points to the output string. It's caller's
395 responsibility to free this buffer.
396
397
398 **/
399 VOID
400 GenerateSubStr (
401 IN CONST EFI_STRING String,
402 IN UINTN BufferLen,
403 IN VOID *Buffer,
404 IN UINT8 Flag,
405 OUT EFI_STRING *SubStr
406 );
407
408 /**
409 This function checks whether a handle is a valid EFI_HII_HANDLE.
410
411 @param Handle Pointer to a EFI_HII_HANDLE
412
413 @retval TRUE Valid
414 @retval FALSE Invalid
415
416 **/
417 BOOLEAN
418 IsHiiHandleValid (
419 EFI_HII_HANDLE Handle
420 );
421
422 /**
423 This function checks whether EFI_FONT_INFO exists in current database. If
424 FontInfoMask is specified, check what options can be used to make a match.
425 Note that the masks relate to where the system default should be supplied
426 are ignored by this function.
427
428 @param Private Hii database private structure.
429 @param FontInfo Points to EFI_FONT_INFO structure.
430 @param FontInfoMask If not NULL, describes what options can be used
431 to make a match between the font requested and
432 the font available. The caller must guarantee
433 this mask is valid.
434 @param FontHandle On entry, Points to the font handle returned by a
435 previous call to GetFontInfo() or NULL to start
436 with the first font.
437 @param GlobalFontInfo If not NULL, output the corresponding global font
438 info.
439
440 @retval TRUE Existed
441 @retval FALSE Not existed
442
443 **/
444 BOOLEAN
445 IsFontInfoExisted (
446 IN HII_DATABASE_PRIVATE_DATA *Private,
447 IN EFI_FONT_INFO *FontInfo,
448 IN EFI_FONT_INFO_MASK *FontInfoMask OPTIONAL,
449 IN EFI_FONT_HANDLE FontHandle OPTIONAL,
450 OUT HII_GLOBAL_FONT_INFO **GlobalFontInfo OPTIONAL
451 );
452
453 /**
454
455 This function invokes the matching registered function.
456
457 @param Private HII Database driver private structure.
458 @param NotifyType The type of change concerning the database.
459 @param PackageInstance Points to the package referred to by the notification.
460 @param PackageType Package type
461 @param Handle The handle of the package list which contains the specified package.
462
463 @retval EFI_SUCCESS Already checked all registered function and invoked
464 if matched.
465 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
466
467 **/
468 EFI_STATUS
469 InvokeRegisteredFunction (
470 IN HII_DATABASE_PRIVATE_DATA *Private,
471 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,
472 IN VOID *PackageInstance,
473 IN UINT8 PackageType,
474 IN EFI_HII_HANDLE Handle
475 )
476 ;
477
478 /**
479 Retrieve system default font and color.
480
481 @param Private HII database driver private data.
482 @param FontInfo Points to system default font output-related
483 information. It's caller's responsibility to free
484 this buffer.
485 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
486
487 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
488 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
489 task.
490 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
491
492 **/
493 EFI_STATUS
494 GetSystemFont (
495 IN HII_DATABASE_PRIVATE_DATA *Private,
496 OUT EFI_FONT_DISPLAY_INFO **FontInfo,
497 OUT UINTN *FontInfoSize OPTIONAL
498 );
499
500 /**
501 Parse all string blocks to find a String block specified by StringId.
502 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
503 within this string package and backup its information. If LastStringId is
504 specified, the string id of last string block will also be output.
505 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
506
507 @param Private Hii database private structure.
508 @param StringPackage Hii string package instance.
509 @param StringId The string's id, which is unique within
510 PackageList.
511 @param BlockType Output the block type of found string block.
512 @param StringBlockAddr Output the block address of found string block.
513 @param StringTextOffset Offset, relative to the found block address, of
514 the string text information.
515 @param LastStringId Output the last string id when StringId = 0 or StringId = -1.
516 @param StartStringId The first id in the skip block which StringId in the block.
517
518 @retval EFI_SUCCESS The string text and font is retrieved
519 successfully.
520 @retval EFI_NOT_FOUND The specified text or font info can not be found
521 out.
522 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
523 task.
524
525 **/
526 EFI_STATUS
527 FindStringBlock (
528 IN HII_DATABASE_PRIVATE_DATA *Private,
529 IN HII_STRING_PACKAGE_INSTANCE *StringPackage,
530 IN EFI_STRING_ID StringId,
531 OUT UINT8 *BlockType OPTIONAL,
532 OUT UINT8 **StringBlockAddr OPTIONAL,
533 OUT UINTN *StringTextOffset OPTIONAL,
534 OUT EFI_STRING_ID *LastStringId OPTIONAL,
535 OUT EFI_STRING_ID *StartStringId OPTIONAL
536 );
537
538 /**
539 Parse all glyph blocks to find a glyph block specified by CharValue.
540 If CharValue = (CHAR16) (-1), collect all default character cell information
541 within this font package and backup its information.
542
543 @param FontPackage Hii string package instance.
544 @param CharValue Unicode character value, which identifies a glyph
545 block.
546 @param GlyphBuffer Output the corresponding bitmap data of the found
547 block. It is the caller's responsibility to free
548 this buffer.
549 @param Cell Output cell information of the encoded bitmap.
550 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
551
552 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
553 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
554 database.
555 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
556 task.
557
558 **/
559 EFI_STATUS
560 FindGlyphBlock (
561 IN HII_FONT_PACKAGE_INSTANCE *FontPackage,
562 IN CHAR16 CharValue,
563 OUT UINT8 **GlyphBuffer OPTIONAL,
564 OUT EFI_HII_GLYPH_INFO *Cell OPTIONAL,
565 OUT UINTN *GlyphBufferLen OPTIONAL
566 );
567
568 /**
569 This function exports Form packages to a buffer.
570 This is a internal function.
571
572 @param Private Hii database private structure.
573 @param Handle Identification of a package list.
574 @param PackageList Pointer to a package list which will be exported.
575 @param UsedSize The length of buffer be used.
576 @param BufferSize Length of the Buffer.
577 @param Buffer Allocated space for storing exported data.
578 @param ResultSize The size of the already exported content of this
579 package list.
580
581 @retval EFI_SUCCESS Form Packages are exported successfully.
582 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
583
584 **/
585 EFI_STATUS
586 ExportFormPackages (
587 IN HII_DATABASE_PRIVATE_DATA *Private,
588 IN EFI_HII_HANDLE Handle,
589 IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList,
590 IN UINTN UsedSize,
591 IN UINTN BufferSize,
592 IN OUT VOID *Buffer,
593 IN OUT UINTN *ResultSize
594 );
595
596 //
597 // EFI_HII_FONT_PROTOCOL protocol interfaces
598 //
599
600 /**
601 Renders a string to a bitmap or to the display.
602
603 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
604 @param Flags Describes how the string is to be drawn.
605 @param String Points to the null-terminated string to be
606 displayed.
607 @param StringInfo Points to the string output information,
608 including the color and font. If NULL, then the
609 string will be output in the default system font
610 and color.
611 @param Blt If this points to a non-NULL on entry, this
612 points to the image, which is Width pixels wide
613 and Height pixels high. The string will be drawn
614 onto this image and
615 EFI_HII_OUT_FLAG_CLIP is implied. If this points
616 to a NULL on entry, then a buffer
617 will be allocated to hold the generated image and
618 the pointer updated on exit. It is the caller's
619 responsibility to free this buffer.
620 @param BltX Together with BltX, Specifies the offset from the left and top edge
621 of the image of the first character cell in the
622 image.
623 @param BltY Together with BltY, Specifies the offset from the left and top edge
624 of the image of the first character cell in the
625 image.
626 @param RowInfoArray If this is non-NULL on entry, then on exit, this
627 will point to an allocated buffer containing
628 row information and RowInfoArraySize will be
629 updated to contain the number of elements.
630 This array describes the characters which were at
631 least partially drawn and the heights of the
632 rows. It is the caller's responsibility to free
633 this buffer.
634 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
635 contains the number of elements in RowInfoArray.
636 @param ColumnInfoArray If this is non-NULL, then on return it will be
637 filled with the horizontal offset for each
638 character in the string on the row where it is
639 displayed. Non-printing characters will have
640 the offset ~0. The caller is responsible to
641 allocate a buffer large enough so that there
642 is one entry for each character in the string,
643 not including the null-terminator. It is possible
644 when character display is normalized that some
645 character cells overlap.
646
647 @retval EFI_SUCCESS The string was successfully rendered.
648 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
649 RowInfoArray or Blt.
650 @retval EFI_INVALID_PARAMETER The String or Blt.
651 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
652
653 **/
654 EFI_STATUS
655 EFIAPI
656 HiiStringToImage (
657 IN CONST EFI_HII_FONT_PROTOCOL *This,
658 IN EFI_HII_OUT_FLAGS Flags,
659 IN CONST EFI_STRING String,
660 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
661 IN OUT EFI_IMAGE_OUTPUT **Blt,
662 IN UINTN BltX,
663 IN UINTN BltY,
664 OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
665 OUT UINTN *RowInfoArraySize OPTIONAL,
666 OUT UINTN *ColumnInfoArray OPTIONAL
667 );
668
669 /**
670 Render a string to a bitmap or the screen containing the contents of the specified string.
671
672 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
673 @param Flags Describes how the string is to be drawn.
674 @param PackageList The package list in the HII database to search
675 for the specified string.
676 @param StringId The string's id, which is unique within
677 PackageList.
678 @param Language Points to the language for the retrieved string.
679 If NULL, then the current system language is
680 used.
681 @param StringInfo Points to the string output information,
682 including the color and font. If NULL, then the
683 string will be output in the default system font
684 and color.
685 @param Blt If this points to a non-NULL on entry, this
686 points to the image, which is Width pixels wide
687 and Height pixels high. The string will be drawn
688 onto this image and
689 EFI_HII_OUT_FLAG_CLIP is implied. If this points
690 to a NULL on entry, then a buffer
691 will be allocated to hold the generated image and
692 the pointer updated on exit. It is the caller's
693 responsibility to free this buffer.
694 @param BltX Together with BltX, Specifies the offset from the left and top edge
695 of the image of the first character cell in the
696 image.
697 @param BltY Together with BltY, Specifies the offset from the left and top edge
698 of the image of the first character cell in the
699 image.
700 @param RowInfoArray If this is non-NULL on entry, then on exit, this
701 will point to an allocated buffer containing
702 row information and RowInfoArraySize will be
703 updated to contain the number of elements.
704 This array describes the characters which were at
705 least partially drawn and the heights of the
706 rows. It is the caller's responsibility to free
707 this buffer.
708 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
709 contains the number of elements in RowInfoArray.
710 @param ColumnInfoArray If this is non-NULL, then on return it will be
711 filled with the horizontal offset for each
712 character in the string on the row where it is
713 displayed. Non-printing characters will have
714 the offset ~0. The caller is responsible to
715 allocate a buffer large enough so that there
716 is one entry for each character in the string,
717 not including the null-terminator. It is possible
718 when character display is normalized that some
719 character cells overlap.
720
721 @retval EFI_SUCCESS The string was successfully rendered.
722 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
723 RowInfoArray or Blt.
724 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
725 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
726 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
727 in the specified PackageList.
728
729 **/
730 EFI_STATUS
731 EFIAPI
732 HiiStringIdToImage (
733 IN CONST EFI_HII_FONT_PROTOCOL *This,
734 IN EFI_HII_OUT_FLAGS Flags,
735 IN EFI_HII_HANDLE PackageList,
736 IN EFI_STRING_ID StringId,
737 IN CONST CHAR8 *Language,
738 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
739 IN OUT EFI_IMAGE_OUTPUT **Blt,
740 IN UINTN BltX,
741 IN UINTN BltY,
742 OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
743 OUT UINTN *RowInfoArraySize OPTIONAL,
744 OUT UINTN *ColumnInfoArray OPTIONAL
745 );
746
747 /**
748 Convert the glyph for a single character into a bitmap.
749
750 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
751 @param Char Character to retrieve.
752 @param StringInfo Points to the string font and color information
753 or NULL if the string should use the default
754 system font and color.
755 @param Blt Thus must point to a NULL on entry. A buffer will
756 be allocated to hold the output and the pointer
757 updated on exit. It is the caller's
758 responsibility to free this buffer.
759 @param Baseline Number of pixels from the bottom of the bitmap to
760 the baseline.
761
762 @retval EFI_SUCCESS Glyph bitmap created.
763 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
764 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
765 glyph for Unicode character 0xFFFD.
766 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
767
768 **/
769 EFI_STATUS
770 EFIAPI
771 HiiGetGlyph (
772 IN CONST EFI_HII_FONT_PROTOCOL *This,
773 IN CHAR16 Char,
774 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo,
775 OUT EFI_IMAGE_OUTPUT **Blt,
776 OUT UINTN *Baseline OPTIONAL
777 );
778
779 /**
780 This function iterates through fonts which match the specified font, using
781 the specified criteria. If String is non-NULL, then all of the characters in
782 the string must exist in order for a candidate font to be returned.
783
784 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
785 @param FontHandle On entry, points to the font handle returned by a
786 previous call to GetFontInfo() or NULL to start
787 with the first font. On return, points to the
788 returned font handle or points to NULL if there
789 are no more matching fonts.
790 @param StringInfoIn Upon entry, points to the font to return information
791 about. If NULL, then the information about the system
792 default font will be returned.
793 @param StringInfoOut Upon return, contains the matching font's information.
794 If NULL, then no information is returned. This buffer
795 is allocated with a call to the Boot Service AllocatePool().
796 It is the caller's responsibility to call the Boot
797 Service FreePool() when the caller no longer requires
798 the contents of StringInfoOut.
799 @param String Points to the string which will be tested to
800 determine if all characters are available. If
801 NULL, then any font is acceptable.
802
803 @retval EFI_SUCCESS Matching font returned successfully.
804 @retval EFI_NOT_FOUND No matching font was found.
805 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
806 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
807 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
808 request.
809 **/
810 EFI_STATUS
811 EFIAPI
812 HiiGetFontInfo (
813 IN CONST EFI_HII_FONT_PROTOCOL *This,
814 IN OUT EFI_FONT_HANDLE *FontHandle,
815 IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn OPTIONAL,
816 OUT EFI_FONT_DISPLAY_INFO **StringInfoOut,
817 IN CONST EFI_STRING String OPTIONAL
818 );
819
820 //
821 // EFI_HII_IMAGE_PROTOCOL interfaces
822 //
823
824 /**
825 Get the image id of last image block: EFI_HII_IIBT_END_BLOCK when input
826 ImageId is zero, otherwise return the address of the
827 corresponding image block with identifier specified by ImageId.
828
829 This is a internal function.
830
831 @param ImageBlocks Points to the beginning of a series of image blocks stored in order.
832 @param ImageId If input ImageId is 0, output the image id of the EFI_HII_IIBT_END_BLOCK;
833 else use this id to find its corresponding image block address.
834
835 @return The image block address when input ImageId is not zero; otherwise return NULL.
836
837 **/
838 EFI_HII_IMAGE_BLOCK *
839 GetImageIdOrAddress (
840 IN EFI_HII_IMAGE_BLOCK *ImageBlocks,
841 IN OUT EFI_IMAGE_ID *ImageId
842 );
843
844 /**
845 Return the HII package list identified by PackageList HII handle.
846
847 @param Database Pointer to HII database list header.
848 @param PackageList HII handle of the package list to locate.
849
850 @retval The HII package list instance.
851 **/
852 HII_DATABASE_PACKAGE_LIST_INSTANCE *
853 LocatePackageList (
854 IN LIST_ENTRY *Database,
855 IN EFI_HII_HANDLE PackageList
856 );
857
858 /**
859 This function retrieves the image specified by ImageId which is associated with
860 the specified PackageList and copies it into the buffer specified by Image.
861
862 @param Database A pointer to the database list header.
863 @param PackageList Handle of the package list where this image will
864 be searched.
865 @param ImageId The image's id,, which is unique within
866 PackageList.
867 @param Image Points to the image.
868 @param BitmapOnly TRUE to only return the bitmap type image.
869 FALSE to locate image decoder instance to decode image.
870
871 @retval EFI_SUCCESS The new image was returned successfully.
872 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
873 database. The specified PackageList is not in the database.
874 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
875 hold the image.
876 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
877 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
878 enough memory.
879 **/
880 EFI_STATUS
881 IGetImage (
882 IN LIST_ENTRY *Database,
883 IN EFI_HII_HANDLE PackageList,
884 IN EFI_IMAGE_ID ImageId,
885 OUT EFI_IMAGE_INPUT *Image,
886 IN BOOLEAN BitmapOnly
887 );
888
889 /**
890 Return the first HII image decoder instance which supports the DecoderName.
891
892 @param BlockType The image block type.
893
894 @retval Pointer to the HII image decoder instance.
895 **/
896 EFI_HII_IMAGE_DECODER_PROTOCOL *
897 LocateHiiImageDecoder (
898 UINT8 BlockType
899 );
900
901 /**
902 This function adds the image Image to the group of images owned by PackageList, and returns
903 a new image identifier (ImageId).
904
905 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
906 @param PackageList Handle of the package list where this image will
907 be added.
908 @param ImageId On return, contains the new image id, which is
909 unique within PackageList.
910 @param Image Points to the image.
911
912 @retval EFI_SUCCESS The new image was added successfully.
913 @retval EFI_NOT_FOUND The specified PackageList could not be found in
914 database.
915 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
916 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
917
918 **/
919 EFI_STATUS
920 EFIAPI
921 HiiNewImage (
922 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
923 IN EFI_HII_HANDLE PackageList,
924 OUT EFI_IMAGE_ID *ImageId,
925 IN CONST EFI_IMAGE_INPUT *Image
926 );
927
928 /**
929 This function retrieves the image specified by ImageId which is associated with
930 the specified PackageList and copies it into the buffer specified by Image.
931
932 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
933 @param PackageList Handle of the package list where this image will
934 be searched.
935 @param ImageId The image's id,, which is unique within
936 PackageList.
937 @param Image Points to the image.
938
939 @retval EFI_SUCCESS The new image was returned successfully.
940 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
941 The specified PackageList is not in the database.
942 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
943 hold the image.
944 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
945 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
946 enough memory.
947
948 **/
949 EFI_STATUS
950 EFIAPI
951 HiiGetImage (
952 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
953 IN EFI_HII_HANDLE PackageList,
954 IN EFI_IMAGE_ID ImageId,
955 OUT EFI_IMAGE_INPUT *Image
956 );
957
958 /**
959 This function updates the image specified by ImageId in the specified PackageListHandle to
960 the image specified by Image.
961
962 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
963 @param PackageList The package list containing the images.
964 @param ImageId The image's id,, which is unique within
965 PackageList.
966 @param Image Points to the image.
967
968 @retval EFI_SUCCESS The new image was updated successfully.
969 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
970 database. The specified PackageList is not in the database.
971 @retval EFI_INVALID_PARAMETER The Image was NULL.
972
973 **/
974 EFI_STATUS
975 EFIAPI
976 HiiSetImage (
977 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
978 IN EFI_HII_HANDLE PackageList,
979 IN EFI_IMAGE_ID ImageId,
980 IN CONST EFI_IMAGE_INPUT *Image
981 );
982
983 /**
984 This function renders an image to a bitmap or the screen using the specified
985 color and options. It draws the image on an existing bitmap, allocates a new
986 bitmap or uses the screen. The images can be clipped.
987
988 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
989 @param Flags Describes how the image is to be drawn.
990 @param Image Points to the image to be displayed.
991 @param Blt If this points to a non-NULL on entry, this
992 points to the image, which is Width pixels wide
993 and Height pixels high. The image will be drawn
994 onto this image and EFI_HII_DRAW_FLAG_CLIP is
995 implied. If this points to a NULL on entry, then
996 a buffer will be allocated to hold the generated
997 image and the pointer updated on exit. It is the
998 caller's responsibility to free this buffer.
999 @param BltX Specifies the offset from the left and top edge
1000 of the output image of the first pixel in the
1001 image.
1002 @param BltY Specifies the offset from the left and top edge
1003 of the output image of the first pixel in the
1004 image.
1005
1006 @retval EFI_SUCCESS The image was successfully drawn.
1007 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1008 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
1009 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
1010
1011 **/
1012 EFI_STATUS
1013 EFIAPI
1014 HiiDrawImage (
1015 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
1016 IN EFI_HII_DRAW_FLAGS Flags,
1017 IN CONST EFI_IMAGE_INPUT *Image,
1018 IN OUT EFI_IMAGE_OUTPUT **Blt,
1019 IN UINTN BltX,
1020 IN UINTN BltY
1021 );
1022
1023 /**
1024 This function renders an image to a bitmap or the screen using the specified
1025 color and options. It draws the image on an existing bitmap, allocates a new
1026 bitmap or uses the screen. The images can be clipped.
1027
1028 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
1029 @param Flags Describes how the image is to be drawn.
1030 @param PackageList The package list in the HII database to search
1031 for the specified image.
1032 @param ImageId The image's id, which is unique within
1033 PackageList.
1034 @param Blt If this points to a non-NULL on entry, this
1035 points to the image, which is Width pixels wide
1036 and Height pixels high. The image will be drawn
1037 onto this image and
1038 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
1039 to a NULL on entry, then a buffer will be
1040 allocated to hold the generated image and the
1041 pointer updated on exit. It is the caller's
1042 responsibility to free this buffer.
1043 @param BltX Specifies the offset from the left and top edge
1044 of the output image of the first pixel in the
1045 image.
1046 @param BltY Specifies the offset from the left and top edge
1047 of the output image of the first pixel in the
1048 image.
1049
1050 @retval EFI_SUCCESS The image was successfully drawn.
1051 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1052 @retval EFI_INVALID_PARAMETER The Blt was NULL.
1053 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
1054 The specified PackageList is not in the database.
1055
1056 **/
1057 EFI_STATUS
1058 EFIAPI
1059 HiiDrawImageId (
1060 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
1061 IN EFI_HII_DRAW_FLAGS Flags,
1062 IN EFI_HII_HANDLE PackageList,
1063 IN EFI_IMAGE_ID ImageId,
1064 IN OUT EFI_IMAGE_OUTPUT **Blt,
1065 IN UINTN BltX,
1066 IN UINTN BltY
1067 );
1068
1069 /**
1070 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.NewImage().
1071 This protocol invokes EFI_HII_IMAGE_PROTOCOL.NewImage() implicitly.
1072
1073 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1074 @param PackageList Handle of the package list where this image will
1075 be added.
1076 @param ImageId On return, contains the new image id, which is
1077 unique within PackageList.
1078 @param Image Points to the image.
1079
1080 @retval EFI_SUCCESS The new image was added successfully.
1081 @retval EFI_NOT_FOUND The PackageList could not be found.
1082 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
1083 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
1084 **/
1085 EFI_STATUS
1086 EFIAPI
1087 HiiNewImageEx (
1088 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,
1089 IN EFI_HII_HANDLE PackageList,
1090 OUT EFI_IMAGE_ID *ImageId,
1091 IN CONST EFI_IMAGE_INPUT *Image
1092 );
1093
1094 /**
1095 Return the information about the image, associated with the package list.
1096 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.GetImage().
1097
1098 This function is similar to EFI_HII_IMAGE_PROTOCOL.GetImage(). The difference is that
1099 this function will locate all EFI_HII_IMAGE_DECODER_PROTOCOL instances installed in the
1100 system if the decoder of the certain image type is not supported by the
1101 EFI_HII_IMAGE_EX_PROTOCOL. The function will attempt to decode the image to the
1102 EFI_IMAGE_INPUT using the first EFI_HII_IMAGE_DECODER_PROTOCOL instance that
1103 supports the requested image type.
1104
1105 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1106 @param PackageList The package list in the HII database to search for the
1107 specified image.
1108 @param ImageId The image's id, which is unique within PackageList.
1109 @param Image Points to the image.
1110
1111 @retval EFI_SUCCESS The new image was returned successfully.
1112 @retval EFI_NOT_FOUND The image specified by ImageId is not available. The specified
1113 PackageList is not in the Database.
1114 @retval EFI_INVALID_PARAMETER Image was NULL or ImageId was 0.
1115 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there
1116 was not enough memory.
1117
1118 **/
1119 EFI_STATUS
1120 EFIAPI
1121 HiiGetImageEx (
1122 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,
1123 IN EFI_HII_HANDLE PackageList,
1124 IN EFI_IMAGE_ID ImageId,
1125 OUT EFI_IMAGE_INPUT *Image
1126 );
1127
1128 /**
1129 Change the information about the image.
1130
1131 Same with EFI_HII_IMAGE_PROTOCOL.SetImage(), this protocol invokes
1132 EFI_HII_IMAGE_PROTOCOL.SetImage()implicitly.
1133
1134 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1135 @param PackageList The package list containing the images.
1136 @param ImageId The image's id, which is unique within PackageList.
1137 @param Image Points to the image.
1138
1139 @retval EFI_SUCCESS The new image was successfully updated.
1140 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
1141 database. The specified PackageList is not in
1142 the database.
1143 @retval EFI_INVALID_PARAMETER The Image was NULL, the ImageId was 0 or
1144 the Image->Bitmap was NULL.
1145
1146 **/
1147 EFI_STATUS
1148 EFIAPI
1149 HiiSetImageEx (
1150 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,
1151 IN EFI_HII_HANDLE PackageList,
1152 IN EFI_IMAGE_ID ImageId,
1153 IN CONST EFI_IMAGE_INPUT *Image
1154 );
1155
1156 /**
1157 Renders an image to a bitmap or to the display.
1158
1159 The prototype of this extension function is the same with
1160 EFI_HII_IMAGE_PROTOCOL.DrawImage(). This protocol invokes
1161 EFI_HII_IMAGE_PROTOCOL.DrawImage() implicitly.
1162
1163 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1164 @param Flags Describes how the image is to be drawn.
1165 @param Image Points to the image to be displayed.
1166 @param Blt If this points to a non-NULL on entry, this points
1167 to the image, which is Width pixels wide and
1168 Height pixels high. The image will be drawn onto
1169 this image and EFI_HII_DRAW_FLAG_CLIP is implied.
1170 If this points to a NULL on entry, then a buffer
1171 will be allocated to hold the generated image and
1172 the pointer updated on exit. It is the caller's
1173 responsibility to free this buffer.
1174 @param BltX Specifies the offset from the left and top edge of
1175 the output image of the first pixel in the image.
1176 @param BltY Specifies the offset from the left and top edge of
1177 the output image of the first pixel in the image.
1178
1179 @retval EFI_SUCCESS The image was successfully drawn.
1180 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1181 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
1182
1183 **/
1184 EFI_STATUS
1185 EFIAPI
1186 HiiDrawImageEx (
1187 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,
1188 IN EFI_HII_DRAW_FLAGS Flags,
1189 IN CONST EFI_IMAGE_INPUT *Image,
1190 IN OUT EFI_IMAGE_OUTPUT **Blt,
1191 IN UINTN BltX,
1192 IN UINTN BltY
1193 );
1194
1195 /**
1196 Renders an image to a bitmap or the screen containing the contents of the specified
1197 image.
1198
1199 This function is similar to EFI_HII_IMAGE_PROTOCOL.DrawImageId(). The difference is that
1200 this function will locate all EFI_HII_IMAGE_DECODER_PROTOCOL instances installed in the
1201 system if the decoder of the certain image type is not supported by the
1202 EFI_HII_IMAGE_EX_PROTOCOL. The function will attempt to decode the image to the
1203 EFI_IMAGE_INPUT using the first EFI_HII_IMAGE_DECODER_PROTOCOL instance that
1204 supports the requested image type.
1205
1206 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1207 @param Flags Describes how the image is to be drawn.
1208 @param PackageList The package list in the HII database to search for
1209 the specified image.
1210 @param ImageId The image's id, which is unique within PackageList.
1211 @param Blt If this points to a non-NULL on entry, this points
1212 to the image, which is Width pixels wide and
1213 Height pixels high. The image will be drawn onto
1214 this image and EFI_HII_DRAW_FLAG_CLIP is implied.
1215 If this points to a NULL on entry, then a buffer
1216 will be allocated to hold the generated image
1217 and the pointer updated on exit. It is the caller's
1218 responsibility to free this buffer.
1219 @param BltX Specifies the offset from the left and top edge of
1220 the output image of the first pixel in the image.
1221 @param BltY Specifies the offset from the left and top edge of
1222 the output image of the first pixel in the image.
1223
1224 @retval EFI_SUCCESS The image was successfully drawn.
1225 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1226 @retval EFI_INVALID_PARAMETER The Blt was NULL or ImageId was 0.
1227 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
1228 The specified PackageList is not in the database.
1229
1230 **/
1231 EFI_STATUS
1232 EFIAPI
1233 HiiDrawImageIdEx (
1234 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,
1235 IN EFI_HII_DRAW_FLAGS Flags,
1236 IN EFI_HII_HANDLE PackageList,
1237 IN EFI_IMAGE_ID ImageId,
1238 IN OUT EFI_IMAGE_OUTPUT **Blt,
1239 IN UINTN BltX,
1240 IN UINTN BltY
1241 );
1242
1243 /**
1244 This function returns the image information to EFI_IMAGE_OUTPUT. Only the width
1245 and height are returned to the EFI_IMAGE_OUTPUT instead of decoding the image
1246 to the buffer. This function is used to get the geometry of the image. This function
1247 will try to locate all of the EFI_HII_IMAGE_DECODER_PROTOCOL installed on the
1248 system if the decoder of image type is not supported by the EFI_HII_IMAGE_EX_PROTOCOL.
1249
1250 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1251 @param PackageList Handle of the package list where this image will
1252 be searched.
1253 @param ImageId The image's id, which is unique within PackageList.
1254 @param Image Points to the image.
1255
1256 @retval EFI_SUCCESS The new image was returned successfully.
1257 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
1258 database. The specified PackageList is not in the database.
1259 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
1260 hold the image.
1261 @retval EFI_INVALID_PARAMETER The Image was NULL or the ImageId was 0.
1262 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there
1263 was not enough memory.
1264
1265 **/
1266 EFI_STATUS
1267 EFIAPI
1268 HiiGetImageInfo (
1269 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,
1270 IN EFI_HII_HANDLE PackageList,
1271 IN EFI_IMAGE_ID ImageId,
1272 OUT EFI_IMAGE_OUTPUT *Image
1273 );
1274
1275 //
1276 // EFI_HII_STRING_PROTOCOL
1277 //
1278
1279 /**
1280 This function adds the string String to the group of strings owned by PackageList, with the
1281 specified font information StringFontInfo and returns a new string id.
1282
1283 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1284 instance.
1285 @param PackageList Handle of the package list where this string will
1286 be added.
1287 @param StringId On return, contains the new strings id, which is
1288 unique within PackageList.
1289 @param Language Points to the language for the new string.
1290 @param LanguageName Points to the printable language name to
1291 associate with the passed in Language field.If
1292 LanguageName is not NULL and the string package
1293 header's LanguageName associated with a given
1294 Language is not zero, the LanguageName being
1295 passed in will be ignored.
1296 @param String Points to the new null-terminated string.
1297 @param StringFontInfo Points to the new string's font information or
1298 NULL if the string should have the default system
1299 font, size and style.
1300
1301 @retval EFI_SUCCESS The new string was added successfully.
1302 @retval EFI_NOT_FOUND The specified PackageList could not be found in
1303 database.
1304 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
1305 resources.
1306 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
1307 NULL.
1308
1309 **/
1310 EFI_STATUS
1311 EFIAPI
1312 HiiNewString (
1313 IN CONST EFI_HII_STRING_PROTOCOL *This,
1314 IN EFI_HII_HANDLE PackageList,
1315 OUT EFI_STRING_ID *StringId,
1316 IN CONST CHAR8 *Language,
1317 IN CONST CHAR16 *LanguageName OPTIONAL,
1318 IN CONST EFI_STRING String,
1319 IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
1320 );
1321
1322 /**
1323 This function retrieves the string specified by StringId which is associated
1324 with the specified PackageList in the language Language and copies it into
1325 the buffer specified by String.
1326
1327 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1328 instance.
1329 @param Language Points to the language for the retrieved string.
1330 @param PackageList The package list in the HII database to search
1331 for the specified string.
1332 @param StringId The string's id, which is unique within
1333 PackageList.
1334 @param String Points to the new null-terminated string.
1335 @param StringSize On entry, points to the size of the buffer
1336 pointed to by String, in bytes. On return,
1337 points to the length of the string, in bytes.
1338 @param StringFontInfo If not NULL, points to the string's font
1339 information. It's caller's responsibility to
1340 free this buffer.
1341
1342 @retval EFI_SUCCESS The string was returned successfully.
1343 @retval EFI_NOT_FOUND The string specified by StringId is not
1344 available.
1345 The specified PackageList is not in the database.
1346 @retval EFI_INVALID_LANGUAGE The string specified by StringId is available but
1347 not in the specified language.
1348 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
1349 to hold the string.
1350 @retval EFI_INVALID_PARAMETER The Language or StringSize was NULL.
1351 @retval EFI_INVALID_PARAMETER The value referenced by StringSize was not zero
1352 and String was NULL.
1353 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
1354 request.
1355
1356 **/
1357 EFI_STATUS
1358 EFIAPI
1359 HiiGetString (
1360 IN CONST EFI_HII_STRING_PROTOCOL *This,
1361 IN CONST CHAR8 *Language,
1362 IN EFI_HII_HANDLE PackageList,
1363 IN EFI_STRING_ID StringId,
1364 OUT EFI_STRING String,
1365 IN OUT UINTN *StringSize,
1366 OUT EFI_FONT_INFO **StringFontInfo OPTIONAL
1367 );
1368
1369 /**
1370 This function updates the string specified by StringId in the specified PackageList to the text
1371 specified by String and, optionally, the font information specified by StringFontInfo.
1372
1373 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1374 instance.
1375 @param PackageList The package list containing the strings.
1376 @param StringId The string's id, which is unique within
1377 PackageList.
1378 @param Language Points to the language for the updated string.
1379 @param String Points to the new null-terminated string.
1380 @param StringFontInfo Points to the string's font information or NULL
1381 if the string font information is not changed.
1382
1383 @retval EFI_SUCCESS The string was updated successfully.
1384 @retval EFI_NOT_FOUND The string specified by StringId is not in the
1385 database.
1386 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
1387 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
1388 task.
1389
1390 **/
1391 EFI_STATUS
1392 EFIAPI
1393 HiiSetString (
1394 IN CONST EFI_HII_STRING_PROTOCOL *This,
1395 IN EFI_HII_HANDLE PackageList,
1396 IN EFI_STRING_ID StringId,
1397 IN CONST CHAR8 *Language,
1398 IN CONST EFI_STRING String,
1399 IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
1400 );
1401
1402 /**
1403 This function returns the list of supported languages, in the format specified
1404 in Appendix M of UEFI 2.1 spec.
1405
1406 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1407 instance.
1408 @param PackageList The package list to examine.
1409 @param Languages Points to the buffer to hold the returned
1410 null-terminated ASCII string.
1411 @param LanguagesSize On entry, points to the size of the buffer
1412 pointed to by Languages, in bytes. On return,
1413 points to the length of Languages, in bytes.
1414
1415 @retval EFI_SUCCESS The languages were returned successfully.
1416 @retval EFI_INVALID_PARAMETER The LanguagesSize was NULL.
1417 @retval EFI_INVALID_PARAMETER The value referenced by LanguagesSize is not zero and Languages is NULL.
1418 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1419 of supported languages. LanguageSize is updated
1420 to contain the required size.
1421 @retval EFI_NOT_FOUND Could not find string package in specified
1422 packagelist.
1423
1424 **/
1425 EFI_STATUS
1426 EFIAPI
1427 HiiGetLanguages (
1428 IN CONST EFI_HII_STRING_PROTOCOL *This,
1429 IN EFI_HII_HANDLE PackageList,
1430 IN OUT CHAR8 *Languages,
1431 IN OUT UINTN *LanguagesSize
1432 );
1433
1434 /**
1435 Each string package has associated with it a single primary language and zero
1436 or more secondary languages. This routine returns the secondary languages
1437 associated with a package list.
1438
1439 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1440 instance.
1441 @param PackageList The package list to examine.
1442 @param PrimaryLanguage Points to the null-terminated ASCII string that specifies
1443 the primary language. Languages are specified in the
1444 format specified in Appendix M of the UEFI 2.0 specification.
1445 @param SecondaryLanguages Points to the buffer to hold the returned null-terminated
1446 ASCII string that describes the list of
1447 secondary languages for the specified
1448 PrimaryLanguage. If there are no secondary
1449 languages, the function returns successfully,
1450 but this is set to NULL.
1451 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1452 pointed to by SecondaryLanguages, in bytes. On
1453 return, points to the length of SecondaryLanguages
1454 in bytes.
1455
1456 @retval EFI_SUCCESS Secondary languages were correctly returned.
1457 @retval EFI_INVALID_PARAMETER PrimaryLanguage or SecondaryLanguagesSize was NULL.
1458 @retval EFI_INVALID_PARAMETER The value referenced by SecondaryLanguagesSize is not
1459 zero and SecondaryLanguages is NULL.
1460 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondaryLanguagesSize is
1461 too small to hold the returned information.
1462 SecondaryLanguageSize is updated to hold the size of
1463 the buffer required.
1464 @retval EFI_INVALID_LANGUAGE The language specified by PrimaryLanguage is not
1465 present in the specified package list.
1466 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1467
1468 **/
1469 EFI_STATUS
1470 EFIAPI
1471 HiiGetSecondaryLanguages (
1472 IN CONST EFI_HII_STRING_PROTOCOL *This,
1473 IN EFI_HII_HANDLE PackageList,
1474 IN CONST CHAR8 *PrimaryLanguage,
1475 IN OUT CHAR8 *SecondaryLanguages,
1476 IN OUT UINTN *SecondaryLanguagesSize
1477 );
1478
1479 //
1480 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1481 //
1482
1483 /**
1484 This function adds the packages in the package list to the database and returns a handle. If there is a
1485 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1486 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1487
1488 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1489 instance.
1490 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1491 structure.
1492 @param DriverHandle Associate the package list with this EFI handle.
1493 If a NULL is specified, this data will not be associate
1494 with any drivers and cannot have a callback induced.
1495 @param Handle A pointer to the EFI_HII_HANDLE instance.
1496
1497 @retval EFI_SUCCESS The package list associated with the Handle was
1498 added to the HII database.
1499 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1500 new database contents.
1501 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1502
1503 **/
1504 EFI_STATUS
1505 EFIAPI
1506 HiiNewPackageList (
1507 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1508 IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList,
1509 IN CONST EFI_HANDLE DriverHandle OPTIONAL,
1510 OUT EFI_HII_HANDLE *Handle
1511 );
1512
1513 /**
1514 This function removes the package list that is associated with a handle Handle
1515 from the HII database. Before removing the package, any registered functions
1516 with the notification type REMOVE_PACK and the same package type will be called.
1517
1518 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1519 instance.
1520 @param Handle The handle that was registered to the data that
1521 is requested for removal.
1522
1523 @retval EFI_SUCCESS The data associated with the Handle was removed
1524 from the HII database.
1525 @retval EFI_NOT_FOUND The specified Handle is not in database.
1526
1527 **/
1528 EFI_STATUS
1529 EFIAPI
1530 HiiRemovePackageList (
1531 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1532 IN EFI_HII_HANDLE Handle
1533 );
1534
1535 /**
1536 This function updates the existing package list (which has the specified Handle)
1537 in the HII databases, using the new package list specified by PackageList.
1538
1539 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1540 instance.
1541 @param Handle The handle that was registered to the data that
1542 is requested to be updated.
1543 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1544 package.
1545
1546 @retval EFI_SUCCESS The HII database was successfully updated.
1547 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1548 database.
1549 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1550 @retval EFI_NOT_FOUND The specified Handle is not in database.
1551
1552 **/
1553 EFI_STATUS
1554 EFIAPI
1555 HiiUpdatePackageList (
1556 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1557 IN EFI_HII_HANDLE Handle,
1558 IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList
1559 );
1560
1561 /**
1562 This function returns a list of the package handles of the specified type
1563 that are currently active in the database. The pseudo-type
1564 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1565
1566 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1567 instance.
1568 @param PackageType Specifies the package type of the packages to
1569 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1570 to be listed.
1571 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1572 this is the pointer to the GUID which must match
1573 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1574 Otherwise, it must be NULL.
1575 @param HandleBufferLength On input, a pointer to the length of the handle
1576 buffer. On output, the length of the handle
1577 buffer that is required for the handles found.
1578 @param Handle An array of EFI_HII_HANDLE instances returned.
1579
1580 @retval EFI_SUCCESS The matching handles are outputted successfully.
1581 HandleBufferLength is updated with the actual length.
1582 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1583 Handle is too small to support the number of
1584 handles. HandleBufferLength is updated with a
1585 value that will enable the data to fit.
1586 @retval EFI_NOT_FOUND No matching handle could not be found in
1587 database.
1588 @retval EFI_INVALID_PARAMETER HandleBufferLength was NULL.
1589 @retval EFI_INVALID_PARAMETER The value referenced by HandleBufferLength was not
1590 zero and Handle was NULL.
1591 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1592 PackageGuid is not NULL, PackageType is a EFI_HII_
1593 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1594
1595 **/
1596 EFI_STATUS
1597 EFIAPI
1598 HiiListPackageLists (
1599 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1600 IN UINT8 PackageType,
1601 IN CONST EFI_GUID *PackageGuid,
1602 IN OUT UINTN *HandleBufferLength,
1603 OUT EFI_HII_HANDLE *Handle
1604 );
1605
1606 /**
1607 This function will export one or all package lists in the database to a buffer.
1608 For each package list exported, this function will call functions registered
1609 with EXPORT_PACK and then copy the package list to the buffer.
1610
1611 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1612 instance.
1613 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1614 package list in the HII database to export or
1615 NULL to indicate all package lists should be
1616 exported.
1617 @param BufferSize On input, a pointer to the length of the buffer.
1618 On output, the length of the buffer that is
1619 required for the exported data.
1620 @param Buffer A pointer to a buffer that will contain the
1621 results of the export function.
1622
1623 @retval EFI_SUCCESS Package exported.
1624 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1625 Handle is too small to support the number of
1626 handles. HandleBufferLength is updated with
1627 a value that will enable the data to fit.
1628 @retval EFI_NOT_FOUND The specified Handle could not be found in the
1629 current database.
1630 @retval EFI_INVALID_PARAMETER BufferSize was NULL.
1631 @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
1632 and Buffer was NULL.
1633
1634 **/
1635 EFI_STATUS
1636 EFIAPI
1637 HiiExportPackageLists (
1638 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1639 IN EFI_HII_HANDLE Handle,
1640 IN OUT UINTN *BufferSize,
1641 OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer
1642 );
1643
1644 /**
1645 This function registers a function which will be called when specified actions related to packages of
1646 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1647 notified when specific package types are added, removed or updated in the HII database.
1648 Each driver or application which registers a notification should use
1649 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1650
1651 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1652 instance.
1653 @param PackageType Specifies the package type of the packages to
1654 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1655 to be listed.
1656 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1657 this is the pointer to the GUID which must match
1658 the Guid field of
1659 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1660 be NULL.
1661 @param PackageNotifyFn Points to the function to be called when the
1662 event specified by
1663 NotificationType occurs.
1664 @param NotifyType Describes the types of notification which this
1665 function will be receiving.
1666 @param NotifyHandle Points to the unique handle assigned to the
1667 registered notification. Can be used in
1668 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1669 to stop notifications.
1670
1671 @retval EFI_SUCCESS Notification registered successfully.
1672 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1673 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1674 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1675 EFI_HII_PACKAGE_TYPE_GUID.
1676 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1677 EFI_HII_PACKAGE_TYPE_GUID.
1678
1679 **/
1680 EFI_STATUS
1681 EFIAPI
1682 HiiRegisterPackageNotify (
1683 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1684 IN UINT8 PackageType,
1685 IN CONST EFI_GUID *PackageGuid,
1686 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn,
1687 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,
1688 OUT EFI_HANDLE *NotifyHandle
1689 );
1690
1691 /**
1692 Removes the specified HII database package-related notification.
1693
1694 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1695 instance.
1696 @param NotificationHandle The handle of the notification function being
1697 unregistered.
1698
1699 @retval EFI_SUCCESS Notification is unregistered successfully.
1700 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1701 in current hii database.
1702
1703 **/
1704 EFI_STATUS
1705 EFIAPI
1706 HiiUnregisterPackageNotify (
1707 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1708 IN EFI_HANDLE NotificationHandle
1709 );
1710
1711 /**
1712 This routine retrieves an array of GUID values for each keyboard layout that
1713 was previously registered in the system.
1714
1715 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1716 instance.
1717 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1718 GUID buffer. On output, the length of the handle
1719 buffer that is required for the handles found.
1720 @param KeyGuidBuffer An array of keyboard layout GUID instances
1721 returned.
1722
1723 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1724 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1725 that KeyGuidBuffer is too small to support the
1726 number of GUIDs. KeyGuidBufferLength is
1727 updated with a value that will enable the data to
1728 fit.
1729 @retval EFI_INVALID_PARAMETER The KeyGuidBufferLength is NULL.
1730 @retval EFI_INVALID_PARAMETER The value referenced by KeyGuidBufferLength is not
1731 zero and KeyGuidBuffer is NULL.
1732 @retval EFI_NOT_FOUND There was no keyboard layout.
1733
1734 **/
1735 EFI_STATUS
1736 EFIAPI
1737 HiiFindKeyboardLayouts (
1738 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1739 IN OUT UINT16 *KeyGuidBufferLength,
1740 OUT EFI_GUID *KeyGuidBuffer
1741 );
1742
1743 /**
1744 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1745 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1746
1747 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1748 instance.
1749 @param KeyGuid A pointer to the unique ID associated with a
1750 given keyboard layout. If KeyGuid is NULL then
1751 the current layout will be retrieved.
1752 @param KeyboardLayoutLength On input, a pointer to the length of the
1753 KeyboardLayout buffer. On output, the length of
1754 the data placed into KeyboardLayout.
1755 @param KeyboardLayout A pointer to a buffer containing the retrieved
1756 keyboard layout.
1757
1758 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1759 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1760 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1761 NULL.
1762
1763 **/
1764 EFI_STATUS
1765 EFIAPI
1766 HiiGetKeyboardLayout (
1767 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1768 IN CONST EFI_GUID *KeyGuid,
1769 IN OUT UINT16 *KeyboardLayoutLength,
1770 OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout
1771 );
1772
1773 /**
1774 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1775 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1776 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1777 can be notified of this change.
1778
1779 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1780 instance.
1781 @param KeyGuid A pointer to the unique ID associated with a
1782 given keyboard layout.
1783
1784 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1785 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1786 action was taken.
1787 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1788
1789 **/
1790 EFI_STATUS
1791 EFIAPI
1792 HiiSetKeyboardLayout (
1793 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1794 IN CONST EFI_GUID *KeyGuid
1795 );
1796
1797 /**
1798 Return the EFI handle associated with a package list.
1799
1800 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1801 instance.
1802 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1803 package list in the HIIdatabase.
1804 @param DriverHandle On return, contains the EFI_HANDLE which was
1805 registered with the package list in
1806 NewPackageList().
1807
1808 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1809 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1810 DriverHandle was NULL.
1811
1812 **/
1813 EFI_STATUS
1814 EFIAPI
1815 HiiGetPackageListHandle (
1816 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1817 IN EFI_HII_HANDLE PackageListHandle,
1818 OUT EFI_HANDLE *DriverHandle
1819 );
1820
1821 //
1822 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1823 //
1824
1825 /**
1826 This function allows a caller to extract the current configuration
1827 for one or more named elements from one or more drivers.
1828
1829 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1830 instance.
1831 @param Request A null-terminated Unicode string in
1832 <MultiConfigRequest> format.
1833 @param Progress On return, points to a character in the Request
1834 string. Points to the string's null terminator if
1835 request was successful. Points to the most recent
1836 & before the first failing name / value pair (or
1837 the beginning of the string if the failure is in
1838 the first name / value pair) if the request was
1839 not successful.
1840 @param Results Null-terminated Unicode string in
1841 <MultiConfigAltResp> format which has all values
1842 filled in for the names in the Request string.
1843 String to be allocated by the called function.
1844
1845 @retval EFI_SUCCESS The Results string is filled with the values
1846 corresponding to all requested names.
1847 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1848 results that must be stored awaiting possible
1849 future protocols.
1850 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1851 Progress set to the "G" in "GUID" of the
1852 routing header that doesn't match. Note: There
1853 is no requirement that all routing data
1854 be validated before any configuration extraction.
1855 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1856 parameter would result in this type of error. The
1857 Progress parameter is set to NULL.
1858 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1859 before the error or the beginning of the string.
1860 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1861 name in question.
1862
1863 **/
1864 EFI_STATUS
1865 EFIAPI
1866 HiiConfigRoutingExtractConfig (
1867 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1868 IN CONST EFI_STRING Request,
1869 OUT EFI_STRING *Progress,
1870 OUT EFI_STRING *Results
1871 );
1872
1873 /**
1874 This function allows the caller to request the current configuration for the
1875 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1876
1877 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1878 instance.
1879 @param Results Null-terminated Unicode string in
1880 <MultiConfigAltResp> format which has all values
1881 filled in for the entirety of the current HII
1882 database. String to be allocated by the called
1883 function. De-allocation is up to the caller.
1884
1885 @retval EFI_SUCCESS The Results string is filled with the values
1886 corresponding to all requested names.
1887 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1888 results that must be stored awaiting possible
1889 future protocols.
1890 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1891 parameter would result in this type of error.
1892
1893 **/
1894 EFI_STATUS
1895 EFIAPI
1896 HiiConfigRoutingExportConfig (
1897 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1898 OUT EFI_STRING *Results
1899 );
1900
1901 /**
1902 This function processes the results of processing forms and routes it to the
1903 appropriate handlers or storage.
1904
1905 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1906 instance.
1907 @param Configuration A null-terminated Unicode string in
1908 <MulltiConfigResp> format.
1909 @param Progress A pointer to a string filled in with the offset
1910 of the most recent & before the first failing
1911 name / value pair (or the beginning of the string
1912 if the failure is in the first name / value pair)
1913 or the terminating NULL if all was successful.
1914
1915 @retval EFI_SUCCESS The results have been distributed or are awaiting
1916 distribution.
1917 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1918 results that must be stored awaiting possible
1919 future protocols.
1920 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1921 would result in this type of error.
1922 @retval EFI_NOT_FOUND Target for the specified routing data was not
1923 found.
1924
1925 **/
1926 EFI_STATUS
1927 EFIAPI
1928 HiiConfigRoutingRouteConfig (
1929 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1930 IN CONST EFI_STRING Configuration,
1931 OUT EFI_STRING *Progress
1932 );
1933
1934 /**
1935 This helper function is to be called by drivers to map configuration data stored
1936 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1937
1938 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1939 instance.
1940 @param ConfigRequest A null-terminated Unicode string in
1941 <ConfigRequest> format.
1942 @param Block Array of bytes defining the block's
1943 configuration.
1944 @param BlockSize Length in bytes of Block.
1945 @param Config Filled-in configuration string. String allocated
1946 by the function. Returned only if call is
1947 successful.
1948 @param Progress A pointer to a string filled in with the offset
1949 of the most recent & before the first failing
1950 name/value pair (or the beginning of the string
1951 if the failure is in the first name / value pair)
1952 or the terminating NULL if all was successful.
1953
1954 @retval EFI_SUCCESS The request succeeded. Progress points to the
1955 null terminator at the end of the ConfigRequest
1956 string.
1957 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1958 Progress points to the first character of
1959 ConfigRequest.
1960 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1961 Block parameter would result in this type of
1962 error. Progress points to the first character of
1963 ConfigRequest.
1964 @retval EFI_NOT_FOUND Target for the specified routing data was not
1965 found. Progress points to the "G" in "GUID" of
1966 the errant routing data.
1967 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
1968 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
1969 Block is left updated and Progress points at
1970 the '&' preceding the first non-<BlockName>.
1971
1972 **/
1973 EFI_STATUS
1974 EFIAPI
1975 HiiBlockToConfig (
1976 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1977 IN CONST EFI_STRING ConfigRequest,
1978 IN CONST UINT8 *Block,
1979 IN CONST UINTN BlockSize,
1980 OUT EFI_STRING *Config,
1981 OUT EFI_STRING *Progress
1982 );
1983
1984 /**
1985 This helper function is to be called by drivers to map configuration strings
1986 to configurations stored in byte array ("block") formats such as UEFI Variables.
1987
1988 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1989 instance.
1990 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
1991 format.
1992 @param Block A possibly null array of bytes representing the
1993 current block. Only bytes referenced in the
1994 ConfigResp string in the block are modified. If
1995 this parameter is null or if the *BlockSize
1996 parameter is (on input) shorter than required by
1997 the Configuration string, only the BlockSize
1998 parameter is updated and an appropriate status
1999 (see below) is returned.
2000 @param BlockSize The length of the Block in units of UINT8. On
2001 input, this is the size of the Block. On output,
2002 if successful, contains the largest index of the
2003 modified byte in the Block, or the required buffer
2004 size if the Block is not large enough.
2005 @param Progress On return, points to an element of the ConfigResp
2006 string filled in with the offset of the most
2007 recent '&' before the first failing name / value
2008 pair (or the beginning of the string if the
2009 failure is in the first name / value pair) or
2010 the terminating NULL if all was successful.
2011
2012 @retval EFI_SUCCESS The request succeeded. Progress points to the
2013 null terminator at the end of the ConfigResp
2014 string.
2015 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
2016 Progress points to the first character of
2017 ConfigResp.
2018 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
2019 Block parameter would result in this type of
2020 error. Progress points to the first character of
2021 ConfigResp.
2022 @retval EFI_NOT_FOUND Target for the specified routing data was not
2023 found. Progress points to the "G" in "GUID" of
2024 the errant routing data.
2025 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
2026 value pair. Block is left updated and
2027 Progress points at the '&' preceding the first
2028 non-<BlockName>.
2029 @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
2030 BlockSize is updated with the required buffer size.
2031
2032 **/
2033 EFI_STATUS
2034 EFIAPI
2035 HiiConfigToBlock (
2036 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
2037 IN CONST EFI_STRING ConfigResp,
2038 IN OUT UINT8 *Block,
2039 IN OUT UINTN *BlockSize,
2040 OUT EFI_STRING *Progress
2041 );
2042
2043 /**
2044 This helper function is to be called by drivers to extract portions of
2045 a larger configuration string.
2046
2047 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
2048 instance.
2049 @param Configuration A null-terminated Unicode string in
2050 <MultiConfigAltResp> format.
2051 @param Guid A pointer to the GUID value to search for in the
2052 routing portion of the ConfigResp string when
2053 retrieving the requested data. If Guid is NULL,
2054 then all GUID values will be searched for.
2055 @param Name A pointer to the NAME value to search for in the
2056 routing portion of the ConfigResp string when
2057 retrieving the requested data. If Name is NULL,
2058 then all Name values will be searched for.
2059 @param DevicePath A pointer to the PATH value to search for in the
2060 routing portion of the ConfigResp string when
2061 retrieving the requested data. If DevicePath is
2062 NULL, then all DevicePath values will be
2063 searched for.
2064 @param AltCfgId A pointer to the ALTCFG value to search for in
2065 the routing portion of the ConfigResp string
2066 when retrieving the requested data. If this
2067 parameter is NULL, then the current setting will
2068 be retrieved.
2069 @param AltCfgResp A pointer to a buffer which will be allocated by
2070 the function which contains the retrieved string
2071 as requested. This buffer is only allocated if
2072 the call was successful.
2073
2074 @retval EFI_SUCCESS The request succeeded. The requested data was
2075 extracted and placed in the newly allocated
2076 AltCfgResp buffer.
2077 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
2078 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
2079 @retval EFI_NOT_FOUND Target for the specified routing data was not
2080 found.
2081
2082 **/
2083 EFI_STATUS
2084 EFIAPI
2085 HiiGetAltCfg (
2086 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
2087 IN CONST EFI_STRING Configuration,
2088 IN CONST EFI_GUID *Guid,
2089 IN CONST EFI_STRING Name,
2090 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
2091 IN CONST UINT16 *AltCfgId,
2092 OUT EFI_STRING *AltCfgResp
2093 );
2094
2095 /**
2096
2097 This function accepts a <MultiKeywordResp> formatted string, finds the associated
2098 keyword owners, creates a <MultiConfigResp> string from it and forwards it to the
2099 EFI_HII_ROUTING_PROTOCOL.RouteConfig function.
2100
2101 If there is an issue in resolving the contents of the KeywordString, then the
2102 function returns an error and also sets the Progress and ProgressErr with the
2103 appropriate information about where the issue occurred and additional data about
2104 the nature of the issue.
2105
2106 In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND
2107 error is generated during processing the second or later keyword element, the system
2108 storage associated with earlier keywords is not modified. All elements of the
2109 KeywordString must successfully pass all tests for format and access prior to making
2110 any modifications to storage.
2111
2112 In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString
2113 containing multiple keywords, the state of storage associated with earlier keywords
2114 is undefined.
2115
2116
2117 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
2118
2119 @param KeywordString A null-terminated string in <MultiKeywordResp> format.
2120
2121 @param Progress On return, points to a character in the KeywordString.
2122 Points to the string's NULL terminator if the request
2123 was successful. Points to the most recent '&' before
2124 the first failing name / value pair (or the beginning
2125 of the string if the failure is in the first name / value
2126 pair) if the request was not successful.
2127
2128 @param ProgressErr If during the processing of the KeywordString there was
2129 a failure, this parameter gives additional information
2130 about the possible source of the problem. The various
2131 errors are defined in "Related Definitions" below.
2132
2133
2134 @retval EFI_SUCCESS The specified action was completed successfully.
2135
2136 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
2137 1. KeywordString is NULL.
2138 2. Parsing of the KeywordString resulted in an
2139 error. See Progress and ProgressErr for more data.
2140
2141 @retval EFI_NOT_FOUND An element of the KeywordString was not found.
2142 See ProgressErr for more data.
2143
2144 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
2145 See ProgressErr for more data.
2146
2147 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
2148 for more data.
2149
2150 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
2151 for more data.
2152
2153 **/
2154 EFI_STATUS
2155 EFIAPI
2156 EfiConfigKeywordHandlerSetData (
2157 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
2158 IN CONST EFI_STRING KeywordString,
2159 OUT EFI_STRING *Progress,
2160 OUT UINT32 *ProgressErr
2161 );
2162
2163 /**
2164
2165 This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
2166 keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the
2167 EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.
2168
2169 If there is an issue in resolving the contents of the KeywordString, then the function
2170 returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the
2171 appropriate information about where the issue occurred and additional data about the
2172 nature of the issue.
2173
2174 In the case when KeywordString is NULL, or contains multiple keywords, or when
2175 EFI_NOT_FOUND is generated while processing the keyword elements, the Results string
2176 contains values returned for all keywords processed prior to the keyword generating the
2177 error but no values for the keyword with error or any following keywords.
2178
2179
2180 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
2181
2182 @param NameSpaceId A null-terminated string containing the platform configuration
2183 language to search through in the system. If a NULL is passed
2184 in, then it is assumed that any platform configuration language
2185 with the prefix of "x-UEFI-" are searched.
2186
2187 @param KeywordString A null-terminated string in <MultiKeywordRequest> format. If a
2188 NULL is passed in the KeywordString field, all of the known
2189 keywords in the system for the NameSpaceId specified are
2190 returned in the Results field.
2191
2192 @param Progress On return, points to a character in the KeywordString. Points
2193 to the string's NULL terminator if the request was successful.
2194 Points to the most recent '&' before the first failing name / value
2195 pair (or the beginning of the string if the failure is in the first
2196 name / value pair) if the request was not successful.
2197
2198 @param ProgressErr If during the processing of the KeywordString there was a
2199 failure, this parameter gives additional information about the
2200 possible source of the problem. See the definitions in SetData()
2201 for valid value definitions.
2202
2203 @param Results A null-terminated string in <MultiKeywordResp> format is returned
2204 which has all the values filled in for the keywords in the
2205 KeywordString. This is a callee-allocated field, and must be freed
2206 by the caller after being used.
2207
2208 @retval EFI_SUCCESS The specified action was completed successfully.
2209
2210 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
2211 1.Progress, ProgressErr, or Results is NULL.
2212 2.Parsing of the KeywordString resulted in an error. See
2213 Progress and ProgressErr for more data.
2214
2215
2216 @retval EFI_NOT_FOUND An element of the KeywordString was not found. See
2217 ProgressErr for more data.
2218
2219 @retval EFI_NOT_FOUND The NamespaceId specified was not found. See ProgressErr
2220 for more data.
2221
2222 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See
2223 ProgressErr for more data.
2224
2225 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for
2226 more data.
2227
2228 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
2229 for more data.
2230
2231 **/
2232 EFI_STATUS
2233 EFIAPI
2234 EfiConfigKeywordHandlerGetData (
2235 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
2236 IN CONST EFI_STRING NameSpaceId OPTIONAL,
2237 IN CONST EFI_STRING KeywordString OPTIONAL,
2238 OUT EFI_STRING *Progress,
2239 OUT UINT32 *ProgressErr,
2240 OUT EFI_STRING *Results
2241 );
2242
2243 /**
2244 Compare whether two names of languages are identical.
2245
2246 @param Language1 Name of language 1 from StringPackage
2247 @param Language2 Name of language 2 to be compared with language 1.
2248
2249 @retval TRUE same
2250 @retval FALSE not same
2251
2252 **/
2253 BOOLEAN
2254 HiiCompareLanguage (
2255 IN CHAR8 *Language1,
2256 IN CHAR8 *Language2
2257 )
2258 ;
2259
2260 /**
2261 Retrieves a pointer to a Null-terminated ASCII string containing the list
2262 of languages that an HII handle in the HII Database supports. The returned
2263 string is allocated using AllocatePool(). The caller is responsible for freeing
2264 the returned string using FreePool(). The format of the returned string follows
2265 the language format assumed the HII Database.
2266
2267 If HiiHandle is NULL, then ASSERT().
2268
2269 @param[in] HiiHandle A handle that was previously registered in the HII Database.
2270
2271 @retval NULL HiiHandle is not registered in the HII database
2272 @retval NULL There are not enough resources available to retrieve the supported
2273 languages.
2274 @retval NULL The list of supported languages could not be retrieved.
2275 @retval Other A pointer to the Null-terminated ASCII string of supported languages.
2276
2277 **/
2278 CHAR8 *
2279 GetSupportedLanguages (
2280 IN EFI_HII_HANDLE HiiHandle
2281 );
2282
2283 /**
2284 This function mainly use to get HiiDatabase information.
2285
2286 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2287
2288 @retval EFI_SUCCESS Get the information successfully.
2289 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Hiidatabase data.
2290
2291 **/
2292 EFI_STATUS
2293 HiiGetDatabaseInfo (
2294 IN CONST EFI_HII_DATABASE_PROTOCOL *This
2295 );
2296
2297 /**
2298 This function mainly use to get and update ConfigResp string.
2299
2300 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2301
2302 @retval EFI_SUCCESS Get the information successfully.
2303 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Configuration Setting data.
2304
2305 **/
2306 EFI_STATUS
2307 HiiGetConfigRespInfo (
2308 IN CONST EFI_HII_DATABASE_PROTOCOL *This
2309 );
2310
2311 /**
2312 Find question default value from PcdNvStoreDefaultValueBuffer
2313
2314 @param DefaultId Default store ID
2315 @param EfiVarStore Point to EFI VarStore header
2316 @param IfrQuestionHdr Point to Question header
2317 @param ValueBuffer Point to Buffer includes the found default setting
2318 @param Width Width of the default value
2319 @param BitFieldQuestion Whether the Question is stored in Bit field.
2320
2321 @retval EFI_SUCCESS Question default value is found.
2322 @retval EFI_NOT_FOUND Question default value is not found.
2323 **/
2324 EFI_STATUS
2325 FindQuestionDefaultSetting (
2326 IN UINT16 DefaultId,
2327 IN EFI_IFR_VARSTORE_EFI *EfiVarStore,
2328 IN EFI_IFR_QUESTION_HEADER *IfrQuestionHdr,
2329 OUT VOID *ValueBuffer,
2330 IN UINTN Width,
2331 IN BOOLEAN BitFieldQuestion
2332 );
2333
2334 //
2335 // Global variables
2336 //
2337 extern EFI_EVENT gHiiKeyboardLayoutChanged;
2338 extern BOOLEAN gExportAfterReadyToBoot;
2339
2340 #endif