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