]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
ccb9263923b5be03f87cc9b4b58340d60add0d46
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / HiiDatabase.h
1 /** @file
2 Private structures definitions in HiiDatabase.
3
4 Copyright (c) 2007 - 2011, 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/HiiString.h>
24 #include <Protocol/HiiDatabase.h>
25 #include <Protocol/HiiConfigRouting.h>
26 #include <Protocol/HiiConfigAccess.h>
27 #include <Protocol/SimpleTextOut.h>
28
29 #include <Guid/HiiKeyBoardLayout.h>
30 #include <Guid/GlobalVariable.h>
31
32
33 #include <Library/DebugLib.h>
34 #include <Library/BaseMemoryLib.h>
35 #include <Library/UefiDriverEntryPoint.h>
36 #include <Library/UefiBootServicesTableLib.h>
37 #include <Library/BaseLib.h>
38 #include <Library/DevicePathLib.h>
39 #include <Library/MemoryAllocationLib.h>
40 #include <Library/UefiLib.h>
41 #include <Library/PcdLib.h>
42 #include <Library/UefiRuntimeServicesTableLib.h>
43 #include <Library/PrintLib.h>
44
45 #define MAX_STRING_LENGTH 1024
46 #define MAX_FONT_NAME_LEN 256
47 #define NARROW_BASELINE 15
48 #define WIDE_BASELINE 14
49 #define SYS_FONT_INFO_MASK 0x37
50 #define REPLACE_UNKNOWN_GLYPH 0xFFFD
51 #define PROPORTIONAL_GLYPH 0x80
52 #define NARROW_GLYPH 0x40
53
54 #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))
55 #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))
56 #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))
57 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)
58
59 //
60 // IFR data structure
61 //
62 // BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.
63
64 typedef struct {
65 LIST_ENTRY Entry; // Link to VarStorage
66 EFI_GUID Guid;
67 CHAR16 *Name;
68 EFI_VARSTORE_ID VarStoreId;
69 UINT16 Size;
70 LIST_ENTRY BlockEntry; // Link to its Block array
71 } IFR_VARSTORAGE_DATA;
72
73 typedef struct {
74 LIST_ENTRY Entry; // Link to Block array
75 UINT16 Offset;
76 UINT16 Width;
77 EFI_QUESTION_ID QuestionId;
78 UINT8 OpCode;
79 UINT8 Scope;
80 LIST_ENTRY DefaultValueEntry; // Link to its default value array
81 } IFR_BLOCK_DATA;
82
83 //
84 // Get default value from IFR data.
85 //
86 typedef enum {
87 DEFAULT_VALUE_FROM_DEFAULT = 0, // Get from the minimum or first one when not set default value.
88 DEFAULT_VALUE_FROM_FLAG, // Get default value from the defalut flag.
89 DEFAULT_VALUE_FROM_OPCODE // Get default value from default opcode, highest priority.
90 } DEFAULT_VALUE_TYPE;
91
92 typedef struct {
93 LIST_ENTRY Entry;
94 DEFAULT_VALUE_TYPE Type;
95 BOOLEAN Cleaned; // Whether this value is cleaned
96 // TRUE Cleaned, the value can't be used
97 // FALSE Not cleaned, the value can be used.
98 UINT16 DefaultId;
99 UINT64 Value;
100 } IFR_DEFAULT_DATA;
101
102 //
103 // Storage types
104 //
105 #define EFI_HII_VARSTORE_BUFFER 0
106 #define EFI_HII_VARSTORE_NAME_VALUE 1
107 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
108
109 #define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G')
110 typedef struct {
111 UINTN Signature;
112 LIST_ENTRY Entry;
113
114 EFI_HII_HANDLE HiiHandle;
115 EFI_HANDLE DriverHandle;
116
117 UINT8 Type; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
118 EFI_GUID Guid;
119 CHAR16 *Name;
120 UINT16 Size;
121 } HII_FORMSET_STORAGE;
122
123
124 //
125 // String Package definitions
126 //
127 #define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p')
128 typedef struct _HII_STRING_PACKAGE_INSTANCE {
129 UINTN Signature;
130 EFI_HII_STRING_PACKAGE_HDR *StringPkgHdr;
131 UINT8 *StringBlock;
132 LIST_ENTRY StringEntry;
133 LIST_ENTRY FontInfoList; // local font info list
134 UINT8 FontId;
135 EFI_STRING_ID MaxStringId; // record StringId
136 } HII_STRING_PACKAGE_INSTANCE;
137
138 //
139 // Form Package definitions
140 //
141 #define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p')
142 typedef struct _HII_IFR_PACKAGE_INSTANCE {
143 UINTN Signature;
144 EFI_HII_PACKAGE_HEADER FormPkgHdr;
145 UINT8 *IfrData;
146 LIST_ENTRY IfrEntry;
147 } HII_IFR_PACKAGE_INSTANCE;
148
149 //
150 // Simple Font Package definitions
151 //
152 #define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p')
153 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE {
154 UINTN Signature;
155 EFI_HII_SIMPLE_FONT_PACKAGE_HDR *SimpleFontPkgHdr;
156 LIST_ENTRY SimpleFontEntry;
157 } HII_SIMPLE_FONT_PACKAGE_INSTANCE;
158
159 //
160 // Font Package definitions
161 //
162 #define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p')
163 typedef struct _HII_FONT_PACKAGE_INSTANCE {
164 UINTN Signature;
165 EFI_HII_FONT_PACKAGE_HDR *FontPkgHdr;
166 UINT16 Height;
167 UINT16 BaseLine;
168 UINT8 *GlyphBlock;
169 LIST_ENTRY FontEntry;
170 LIST_ENTRY GlyphInfoList;
171 } HII_FONT_PACKAGE_INSTANCE;
172
173 #define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s')
174 typedef struct _HII_GLYPH_INFO {
175 UINTN Signature;
176 LIST_ENTRY Entry;
177 CHAR16 CharId;
178 EFI_HII_GLYPH_INFO Cell;
179 } HII_GLYPH_INFO;
180
181 #define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i')
182 typedef struct _HII_FONT_INFO {
183 UINTN Signature;
184 LIST_ENTRY Entry;
185 LIST_ENTRY *GlobalEntry;
186 UINT8 FontId;
187 } HII_FONT_INFO;
188
189 #define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i')
190 typedef struct _HII_GLOBAL_FONT_INFO {
191 UINTN Signature;
192 LIST_ENTRY Entry;
193 HII_FONT_PACKAGE_INSTANCE *FontPackage;
194 UINTN FontInfoSize;
195 EFI_FONT_INFO *FontInfo;
196 } HII_GLOBAL_FONT_INFO;
197
198 //
199 // Image Package definitions
200 //
201
202 #define HII_PIXEL_MASK 0x80
203
204 typedef struct _HII_IMAGE_PACKAGE_INSTANCE {
205 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr;
206 UINT32 ImageBlockSize;
207 UINT32 PaletteInfoSize;
208 UINT8 *ImageBlock;
209 UINT8 *PaletteBlock;
210 } HII_IMAGE_PACKAGE_INSTANCE;
211
212 //
213 // Keyboard Layout Pacakge definitions
214 //
215 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')
216 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE {
217 UINTN Signature;
218 UINT8 *KeyboardPkg;
219 LIST_ENTRY KeyboardEntry;
220 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE;
221
222 //
223 // Guid Package definitions
224 //
225 #define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p')
226 typedef struct _HII_GUID_PACKAGE_INSTANCE {
227 UINTN Signature;
228 UINT8 *GuidPkg;
229 LIST_ENTRY GuidEntry;
230 } HII_GUID_PACKAGE_INSTANCE;
231
232 //
233 // A package list can contain only one or less than one device path package.
234 // This rule also applies to image package since ImageId can not be duplicate.
235 //
236 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE {
237 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr;
238 LIST_ENTRY GuidPkgHdr;
239 LIST_ENTRY FormPkgHdr;
240 LIST_ENTRY KeyboardLayoutHdr;
241 LIST_ENTRY StringPkgHdr;
242 LIST_ENTRY FontPkgHdr;
243 HII_IMAGE_PACKAGE_INSTANCE *ImagePkg;
244 LIST_ENTRY SimpleFontPkgHdr;
245 UINT8 *DevicePathPkg;
246 } HII_DATABASE_PACKAGE_LIST_INSTANCE;
247
248 #define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l')
249
250 typedef struct {
251 UINTN Signature;
252 LIST_ENTRY Handle;
253 UINTN Key;
254 } HII_HANDLE;
255
256 #define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r')
257
258 typedef struct _HII_DATABASE_RECORD {
259 UINTN Signature;
260 HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList;
261 EFI_HANDLE DriverHandle;
262 EFI_HII_HANDLE Handle;
263 LIST_ENTRY DatabaseEntry;
264 } HII_DATABASE_RECORD;
265
266 #define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n')
267
268 typedef struct _HII_DATABASE_NOTIFY {
269 UINTN Signature;
270 EFI_HANDLE NotifyHandle;
271 UINT8 PackageType;
272 EFI_GUID *PackageGuid;
273 EFI_HII_DATABASE_NOTIFY PackageNotifyFn;
274 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType;
275 LIST_ENTRY DatabaseNotifyEntry;
276 } HII_DATABASE_NOTIFY;
277
278 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')
279
280 typedef struct _HII_DATABASE_PRIVATE_DATA {
281 UINTN Signature;
282 LIST_ENTRY DatabaseList;
283 LIST_ENTRY DatabaseNotifyList;
284 EFI_HII_FONT_PROTOCOL HiiFont;
285 EFI_HII_IMAGE_PROTOCOL HiiImage;
286 EFI_HII_STRING_PROTOCOL HiiString;
287 EFI_HII_DATABASE_PROTOCOL HiiDatabase;
288 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting;
289 LIST_ENTRY HiiHandleList;
290 INTN HiiHandleCount;
291 LIST_ENTRY FontInfoList; // global font info list
292 UINTN Attribute; // default system color
293 EFI_GUID CurrentLayoutGuid;
294 EFI_HII_KEYBOARD_LAYOUT *CurrentLayout;
295 } HII_DATABASE_PRIVATE_DATA;
296
297 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
298 CR (a, \
299 HII_DATABASE_PRIVATE_DATA, \
300 HiiFont, \
301 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
302 )
303
304 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
305 CR (a, \
306 HII_DATABASE_PRIVATE_DATA, \
307 HiiImage, \
308 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
309 )
310
311 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
312 CR (a, \
313 HII_DATABASE_PRIVATE_DATA, \
314 HiiString, \
315 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
316 )
317
318 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
319 CR (a, \
320 HII_DATABASE_PRIVATE_DATA, \
321 HiiDatabase, \
322 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
323 )
324
325 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
326 CR (a, \
327 HII_DATABASE_PRIVATE_DATA, \
328 ConfigRouting, \
329 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
330 )
331
332 //
333 // Internal function prototypes.
334 //
335
336 /**
337 This function checks whether a handle is a valid EFI_HII_HANDLE.
338
339 @param Handle Pointer to a EFI_HII_HANDLE
340
341 @retval TRUE Valid
342 @retval FALSE Invalid
343
344 **/
345 BOOLEAN
346 IsHiiHandleValid (
347 EFI_HII_HANDLE Handle
348 );
349
350
351 /**
352 This function checks whether EFI_FONT_INFO exists in current database. If
353 FontInfoMask is specified, check what options can be used to make a match.
354 Note that the masks relate to where the system default should be supplied
355 are ignored by this function.
356
357 @param Private Hii database private structure.
358 @param FontInfo Points to EFI_FONT_INFO structure.
359 @param FontInfoMask If not NULL, describes what options can be used
360 to make a match between the font requested and
361 the font available. The caller must guarantee
362 this mask is valid.
363 @param FontHandle On entry, Points to the font handle returned by a
364 previous call to GetFontInfo() or NULL to start
365 with the first font.
366 @param GlobalFontInfo If not NULL, output the corresponding globa font
367 info.
368
369 @retval TRUE Existed
370 @retval FALSE Not existed
371
372 **/
373 BOOLEAN
374 IsFontInfoExisted (
375 IN HII_DATABASE_PRIVATE_DATA *Private,
376 IN EFI_FONT_INFO *FontInfo,
377 IN EFI_FONT_INFO_MASK *FontInfoMask, OPTIONAL
378 IN EFI_FONT_HANDLE FontHandle, OPTIONAL
379 OUT HII_GLOBAL_FONT_INFO **GlobalFontInfo OPTIONAL
380 );
381
382 /**
383
384 This function invokes the matching registered function.
385
386 @param Private HII Database driver private structure.
387 @param NotifyType The type of change concerning the database.
388 @param PackageInstance Points to the package referred to by the notification.
389 @param PackageType Package type
390 @param Handle The handle of the package list which contains the specified package.
391
392 @retval EFI_SUCCESS Already checked all registered function and invoked
393 if matched.
394 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
395
396 **/
397 EFI_STATUS
398 InvokeRegisteredFunction (
399 IN HII_DATABASE_PRIVATE_DATA *Private,
400 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,
401 IN VOID *PackageInstance,
402 IN UINT8 PackageType,
403 IN EFI_HII_HANDLE Handle
404 )
405 ;
406
407 /**
408 Retrieve system default font and color.
409
410 @param Private HII database driver private data.
411 @param FontInfo Points to system default font output-related
412 information. It's caller's responsibility to free
413 this buffer.
414 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
415
416 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
417 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
418 task.
419 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
420
421 **/
422 EFI_STATUS
423 GetSystemFont (
424 IN HII_DATABASE_PRIVATE_DATA *Private,
425 OUT EFI_FONT_DISPLAY_INFO **FontInfo,
426 OUT UINTN *FontInfoSize OPTIONAL
427 );
428
429
430 /**
431 Parse all string blocks to find a String block specified by StringId.
432 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
433 within this string package and backup its information. If LastStringId is
434 specified, the string id of last string block will also be output.
435 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
436
437 @param Private Hii database private structure.
438 @param StringPackage Hii string package instance.
439 @param StringId The string's id, which is unique within
440 PackageList.
441 @param BlockType Output the block type of found string block.
442 @param StringBlockAddr Output the block address of found string block.
443 @param StringTextOffset Offset, relative to the found block address, of
444 the string text information.
445 @param LastStringId Output the last string id when StringId = 0 or StringId = -1.
446 @param StartStringId The first id in the skip block which StringId in the block.
447
448 @retval EFI_SUCCESS The string text and font is retrieved
449 successfully.
450 @retval EFI_NOT_FOUND The specified text or font info can not be found
451 out.
452 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
453 task.
454
455 **/
456 EFI_STATUS
457 FindStringBlock (
458 IN HII_DATABASE_PRIVATE_DATA *Private,
459 IN HII_STRING_PACKAGE_INSTANCE *StringPackage,
460 IN EFI_STRING_ID StringId,
461 OUT UINT8 *BlockType, OPTIONAL
462 OUT UINT8 **StringBlockAddr, OPTIONAL
463 OUT UINTN *StringTextOffset, OPTIONAL
464 OUT EFI_STRING_ID *LastStringId, OPTIONAL
465 OUT EFI_STRING_ID *StartStringId OPTIONAL
466 );
467
468
469 /**
470 Parse all glyph blocks to find a glyph block specified by CharValue.
471 If CharValue = (CHAR16) (-1), collect all default character cell information
472 within this font package and backup its information.
473
474 @param FontPackage Hii string package instance.
475 @param CharValue Unicode character value, which identifies a glyph
476 block.
477 @param GlyphBuffer Output the corresponding bitmap data of the found
478 block. It is the caller's responsiblity to free
479 this buffer.
480 @param Cell Output cell information of the encoded bitmap.
481 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
482
483 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
484 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
485 database.
486 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
487 task.
488
489 **/
490 EFI_STATUS
491 FindGlyphBlock (
492 IN HII_FONT_PACKAGE_INSTANCE *FontPackage,
493 IN CHAR16 CharValue,
494 OUT UINT8 **GlyphBuffer, OPTIONAL
495 OUT EFI_HII_GLYPH_INFO *Cell, OPTIONAL
496 OUT UINTN *GlyphBufferLen OPTIONAL
497 );
498
499 /**
500 This function exports Form packages to a buffer.
501 This is a internal function.
502
503 @param Private Hii database private structure.
504 @param Handle Identification of a package list.
505 @param PackageList Pointer to a package list which will be exported.
506 @param UsedSize The length of buffer be used.
507 @param BufferSize Length of the Buffer.
508 @param Buffer Allocated space for storing exported data.
509 @param ResultSize The size of the already exported content of this
510 package list.
511
512 @retval EFI_SUCCESS Form Packages are exported successfully.
513 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
514
515 **/
516 EFI_STATUS
517 ExportFormPackages (
518 IN HII_DATABASE_PRIVATE_DATA *Private,
519 IN EFI_HII_HANDLE Handle,
520 IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList,
521 IN UINTN UsedSize,
522 IN UINTN BufferSize,
523 IN OUT VOID *Buffer,
524 IN OUT UINTN *ResultSize
525 );
526
527 //
528 // EFI_HII_FONT_PROTOCOL protocol interfaces
529 //
530
531
532 /**
533 Renders a string to a bitmap or to the display.
534
535 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
536 @param Flags Describes how the string is to be drawn.
537 @param String Points to the null-terminated string to be
538 displayed.
539 @param StringInfo Points to the string output information,
540 including the color and font. If NULL, then the
541 string will be output in the default system font
542 and color.
543 @param Blt If this points to a non-NULL on entry, this
544 points to the image, which is Width pixels wide
545 and Height pixels high. The string will be drawn
546 onto this image and
547 EFI_HII_OUT_FLAG_CLIP is implied. If this points
548 to a NULL on entry, then a buffer
549 will be allocated to hold the generated image and
550 the pointer updated on exit. It is the caller's
551 responsibility to free this buffer.
552 @param BltX Together with BltX, Specifies the offset from the left and top edge
553 of the image of the first character cell in the
554 image.
555 @param BltY Together with BltY, Specifies the offset from the left and top edge
556 of the image of the first character cell in the
557 image.
558 @param RowInfoArray If this is non-NULL on entry, then on exit, this
559 will point to an allocated buffer containing
560 row information and RowInfoArraySize will be
561 updated to contain the number of elements.
562 This array describes the characters which were at
563 least partially drawn and the heights of the
564 rows. It is the caller's responsibility to free
565 this buffer.
566 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
567 contains the number of elements in RowInfoArray.
568 @param ColumnInfoArray If this is non-NULL, then on return it will be
569 filled with the horizontal offset for each
570 character in the string on the row where it is
571 displayed. Non-printing characters will have
572 the offset ~0. The caller is responsible to
573 allocate a buffer large enough so that there
574 is one entry for each character in the string,
575 not including the null-terminator. It is possible
576 when character display is normalized that some
577 character cells overlap.
578
579 @retval EFI_SUCCESS The string was successfully rendered.
580 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
581 RowInfoArray or Blt.
582 @retval EFI_INVALID_PARAMETER The String or Blt.
583 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
584
585 **/
586 EFI_STATUS
587 EFIAPI
588 HiiStringToImage (
589 IN CONST EFI_HII_FONT_PROTOCOL *This,
590 IN EFI_HII_OUT_FLAGS Flags,
591 IN CONST EFI_STRING String,
592 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
593 IN OUT EFI_IMAGE_OUTPUT **Blt,
594 IN UINTN BltX,
595 IN UINTN BltY,
596 OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
597 OUT UINTN *RowInfoArraySize OPTIONAL,
598 OUT UINTN *ColumnInfoArray OPTIONAL
599 );
600
601
602 /**
603 Render a string to a bitmap or the screen containing the contents of the specified string.
604
605 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
606 @param Flags Describes how the string is to be drawn.
607 @param PackageList The package list in the HII database to search
608 for the specified string.
609 @param StringId The string's id, which is unique within
610 PackageList.
611 @param Language Points to the language for the retrieved string.
612 If NULL, then the current system language is
613 used.
614 @param StringInfo Points to the string output information,
615 including the color and font. If NULL, then the
616 string will be output in the default system font
617 and color.
618 @param Blt If this points to a non-NULL on entry, this
619 points to the image, which is Width pixels wide
620 and Height pixels high. The string will be drawn
621 onto this image and
622 EFI_HII_OUT_FLAG_CLIP is implied. If this points
623 to a NULL on entry, then a buffer
624 will be allocated to hold the generated image and
625 the pointer updated on exit. It is the caller's
626 responsibility to free this buffer.
627 @param BltX Together with BltX, Specifies the offset from the left and top edge
628 of the image of the first character cell in the
629 image.
630 @param BltY Together with BltY, Specifies the offset from the left and top edge
631 of the image of the first character cell in the
632 image.
633 @param RowInfoArray If this is non-NULL on entry, then on exit, this
634 will point to an allocated buffer containing
635 row information and RowInfoArraySize will be
636 updated to contain the number of elements.
637 This array describes the characters which were at
638 least partially drawn and the heights of the
639 rows. It is the caller's responsibility to free
640 this buffer.
641 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
642 contains the number of elements in RowInfoArray.
643 @param ColumnInfoArray If this is non-NULL, then on return it will be
644 filled with the horizontal offset for each
645 character in the string on the row where it is
646 displayed. Non-printing characters will have
647 the offset ~0. The caller is responsible to
648 allocate a buffer large enough so that there
649 is one entry for each character in the string,
650 not including the null-terminator. It is possible
651 when character display is normalized that some
652 character cells overlap.
653
654 @retval EFI_SUCCESS The string was successfully rendered.
655 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
656 RowInfoArray or Blt.
657 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
658 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
659 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
660 in the specified PackageList.
661
662 **/
663 EFI_STATUS
664 EFIAPI
665 HiiStringIdToImage (
666 IN CONST EFI_HII_FONT_PROTOCOL *This,
667 IN EFI_HII_OUT_FLAGS Flags,
668 IN EFI_HII_HANDLE PackageList,
669 IN EFI_STRING_ID StringId,
670 IN CONST CHAR8* Language,
671 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
672 IN OUT EFI_IMAGE_OUTPUT **Blt,
673 IN UINTN BltX,
674 IN UINTN BltY,
675 OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
676 OUT UINTN *RowInfoArraySize OPTIONAL,
677 OUT UINTN *ColumnInfoArray OPTIONAL
678 );
679
680
681 /**
682 Convert the glyph for a single character into a bitmap.
683
684 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
685 @param Char Character to retrieve.
686 @param StringInfo Points to the string font and color information
687 or NULL if the string should use the default
688 system font and color.
689 @param Blt Thus must point to a NULL on entry. A buffer will
690 be allocated to hold the output and the pointer
691 updated on exit. It is the caller's
692 responsibility to free this buffer.
693 @param Baseline Number of pixels from the bottom of the bitmap to
694 the baseline.
695
696 @retval EFI_SUCCESS Glyph bitmap created.
697 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
698 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
699 glyph for Unicode character 0xFFFD.
700 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
701
702 **/
703 EFI_STATUS
704 EFIAPI
705 HiiGetGlyph (
706 IN CONST EFI_HII_FONT_PROTOCOL *This,
707 IN CHAR16 Char,
708 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo,
709 OUT EFI_IMAGE_OUTPUT **Blt,
710 OUT UINTN *Baseline OPTIONAL
711 );
712
713
714 /**
715 This function iterates through fonts which match the specified font, using
716 the specified criteria. If String is non-NULL, then all of the characters in
717 the string must exist in order for a candidate font to be returned.
718
719 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
720 @param FontHandle On entry, points to the font handle returned by a
721 previous call to GetFontInfo() or NULL to start
722 with the first font. On return, points to the
723 returned font handle or points to NULL if there
724 are no more matching fonts.
725 @param StringInfoIn Upon entry, points to the font to return
726 information about. If NULL, then the information about the system default
727 font will be returned.
728 @param StringInfoOut Upon return, contains the matching font's
729 information. If NULL, then no information is
730 returned. It's caller's responsibility to free
731 this buffer.
732 @param String Points to the string which will be tested to
733 determine if all characters are available. If
734 NULL, then any font is acceptable.
735
736 @retval EFI_SUCCESS Matching font returned successfully.
737 @retval EFI_NOT_FOUND No matching font was found.
738 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
739 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
740 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
741 request.
742 **/
743 EFI_STATUS
744 EFIAPI
745 HiiGetFontInfo (
746 IN CONST EFI_HII_FONT_PROTOCOL *This,
747 IN OUT EFI_FONT_HANDLE *FontHandle,
748 IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn, OPTIONAL
749 OUT EFI_FONT_DISPLAY_INFO **StringInfoOut,
750 IN CONST EFI_STRING String OPTIONAL
751 );
752
753 //
754 // EFI_HII_IMAGE_PROTOCOL interfaces
755 //
756
757
758 /**
759 This function adds the image Image to the group of images owned by PackageList, and returns
760 a new image identifier (ImageId).
761
762 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
763 @param PackageList Handle of the package list where this image will
764 be added.
765 @param ImageId On return, contains the new image id, which is
766 unique within PackageList.
767 @param Image Points to the image.
768
769 @retval EFI_SUCCESS The new image was added successfully.
770 @retval EFI_NOT_FOUND The specified PackageList could not be found in
771 database.
772 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
773 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
774
775 **/
776 EFI_STATUS
777 EFIAPI
778 HiiNewImage (
779 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
780 IN EFI_HII_HANDLE PackageList,
781 OUT EFI_IMAGE_ID *ImageId,
782 IN CONST EFI_IMAGE_INPUT *Image
783 );
784
785
786 /**
787 This function retrieves the image specified by ImageId which is associated with
788 the specified PackageList and copies it into the buffer specified by Image.
789
790 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
791 @param PackageList Handle of the package list where this image will
792 be searched.
793 @param ImageId The image's id,, which is unique within
794 PackageList.
795 @param Image Points to the image.
796
797 @retval EFI_SUCCESS The new image was returned successfully.
798 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
799 The specified PackageList is not in the database.
800 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
801 hold the image.
802 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
803 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
804 enough memory.
805
806 **/
807 EFI_STATUS
808 EFIAPI
809 HiiGetImage (
810 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
811 IN EFI_HII_HANDLE PackageList,
812 IN EFI_IMAGE_ID ImageId,
813 OUT EFI_IMAGE_INPUT *Image
814 );
815
816
817 /**
818 This function updates the image specified by ImageId in the specified PackageListHandle to
819 the image specified by Image.
820
821 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
822 @param PackageList The package list containing the images.
823 @param ImageId The image's id,, which is unique within
824 PackageList.
825 @param Image Points to the image.
826
827 @retval EFI_SUCCESS The new image was updated successfully.
828 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
829 database. The specified PackageList is not in the database.
830 @retval EFI_INVALID_PARAMETER The Image was NULL.
831
832 **/
833 EFI_STATUS
834 EFIAPI
835 HiiSetImage (
836 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
837 IN EFI_HII_HANDLE PackageList,
838 IN EFI_IMAGE_ID ImageId,
839 IN CONST EFI_IMAGE_INPUT *Image
840 );
841
842
843 /**
844 This function renders an image to a bitmap or the screen using the specified
845 color and options. It draws the image on an existing bitmap, allocates a new
846 bitmap or uses the screen. The images can be clipped.
847
848 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
849 @param Flags Describes how the image is to be drawn.
850 @param Image Points to the image to be displayed.
851 @param Blt If this points to a non-NULL on entry, this
852 points to the image, which is Width pixels wide
853 and Height pixels high. The image will be drawn
854 onto this image and EFI_HII_DRAW_FLAG_CLIP is
855 implied. If this points to a NULL on entry, then
856 a buffer will be allocated to hold the generated
857 image and the pointer updated on exit. It is the
858 caller's responsibility to free this buffer.
859 @param BltX Specifies the offset from the left and top edge
860 of the output image of the first pixel in the
861 image.
862 @param BltY Specifies the offset from the left and top edge
863 of the output image of the first pixel in the
864 image.
865
866 @retval EFI_SUCCESS The image was successfully drawn.
867 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
868 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
869 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
870
871 **/
872 EFI_STATUS
873 EFIAPI
874 HiiDrawImage (
875 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
876 IN EFI_HII_DRAW_FLAGS Flags,
877 IN CONST EFI_IMAGE_INPUT *Image,
878 IN OUT EFI_IMAGE_OUTPUT **Blt,
879 IN UINTN BltX,
880 IN UINTN BltY
881 );
882
883
884 /**
885 This function renders an image to a bitmap or the screen using the specified
886 color and options. It draws the image on an existing bitmap, allocates a new
887 bitmap or uses the screen. The images can be clipped.
888
889 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
890 @param Flags Describes how the image is to be drawn.
891 @param PackageList The package list in the HII database to search
892 for the specified image.
893 @param ImageId The image's id, which is unique within
894 PackageList.
895 @param Blt If this points to a non-NULL on entry, this
896 points to the image, which is Width pixels wide
897 and Height pixels high. The image will be drawn
898 onto this image and
899 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
900 to a NULL on entry, then a buffer will be
901 allocated to hold the generated image and the
902 pointer updated on exit. It is the caller's
903 responsibility to free this buffer.
904 @param BltX Specifies the offset from the left and top edge
905 of the output image of the first pixel in the
906 image.
907 @param BltY Specifies the offset from the left and top edge
908 of the output image of the first pixel in the
909 image.
910
911 @retval EFI_SUCCESS The image was successfully drawn.
912 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
913 @retval EFI_INVALID_PARAMETER The Blt was NULL.
914 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
915 The specified PackageList is not in the database.
916
917 **/
918 EFI_STATUS
919 EFIAPI
920 HiiDrawImageId (
921 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
922 IN EFI_HII_DRAW_FLAGS Flags,
923 IN EFI_HII_HANDLE PackageList,
924 IN EFI_IMAGE_ID ImageId,
925 IN OUT EFI_IMAGE_OUTPUT **Blt,
926 IN UINTN BltX,
927 IN UINTN BltY
928 )
929
930 ;
931
932 //
933 // EFI_HII_STRING_PROTOCOL
934 //
935
936
937 /**
938 This function adds the string String to the group of strings owned by PackageList, with the
939 specified font information StringFontInfo and returns a new string id.
940
941 @param This A pointer to the EFI_HII_STRING_PROTOCOL
942 instance.
943 @param PackageList Handle of the package list where this string will
944 be added.
945 @param StringId On return, contains the new strings id, which is
946 unique within PackageList.
947 @param Language Points to the language for the new string.
948 @param LanguageName Points to the printable language name to
949 associate with the passed in Language field.If
950 LanguageName is not NULL and the string package
951 header's LanguageName associated with a given
952 Language is not zero, the LanguageName being
953 passed in will be ignored.
954 @param String Points to the new null-terminated string.
955 @param StringFontInfo Points to the new string's font information or
956 NULL if the string should have the default system
957 font, size and style.
958
959 @retval EFI_SUCCESS The new string was added successfully.
960 @retval EFI_NOT_FOUND The specified PackageList could not be found in
961 database.
962 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
963 resources.
964 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
965 NULL.
966
967 **/
968 EFI_STATUS
969 EFIAPI
970 HiiNewString (
971 IN CONST EFI_HII_STRING_PROTOCOL *This,
972 IN EFI_HII_HANDLE PackageList,
973 OUT EFI_STRING_ID *StringId,
974 IN CONST CHAR8 *Language,
975 IN CONST CHAR16 *LanguageName, OPTIONAL
976 IN CONST EFI_STRING String,
977 IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
978 );
979
980
981 /**
982 This function retrieves the string specified by StringId which is associated
983 with the specified PackageList in the language Language and copies it into
984 the buffer specified by String.
985
986 @param This A pointer to the EFI_HII_STRING_PROTOCOL
987 instance.
988 @param Language Points to the language for the retrieved string.
989 @param PackageList The package list in the HII database to search
990 for the specified string.
991 @param StringId The string's id, which is unique within
992 PackageList.
993 @param String Points to the new null-terminated string.
994 @param StringSize On entry, points to the size of the buffer
995 pointed to by String, in bytes. On return,
996 points to the length of the string, in bytes.
997 @param StringFontInfo If not NULL, points to the string's font
998 information. It's caller's responsibility to
999 free this buffer.
1000
1001 @retval EFI_SUCCESS The string was returned successfully.
1002 @retval EFI_NOT_FOUND The string specified by StringId is not
1003 available.
1004 @retval EFI_NOT_FOUND The string specified by StringId is available but
1005 not in the specified language.
1006 The specified PackageList is not in the database.
1007 @retval EFI_INVALID_LANGUAGE - The string specified by StringId is available but
1008 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
1009 to hold the string.
1010 @retval EFI_INVALID_PARAMETER The String or Language or StringSize was NULL.
1011 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
1012 request.
1013
1014 **/
1015 EFI_STATUS
1016 EFIAPI
1017 HiiGetString (
1018 IN CONST EFI_HII_STRING_PROTOCOL *This,
1019 IN CONST CHAR8 *Language,
1020 IN EFI_HII_HANDLE PackageList,
1021 IN EFI_STRING_ID StringId,
1022 OUT EFI_STRING String,
1023 IN OUT UINTN *StringSize,
1024 OUT EFI_FONT_INFO **StringFontInfo OPTIONAL
1025 );
1026
1027
1028 /**
1029 This function updates the string specified by StringId in the specified PackageList to the text
1030 specified by String and, optionally, the font information specified by StringFontInfo.
1031
1032 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1033 instance.
1034 @param PackageList The package list containing the strings.
1035 @param StringId The string's id, which is unique within
1036 PackageList.
1037 @param Language Points to the language for the updated string.
1038 @param String Points to the new null-terminated string.
1039 @param StringFontInfo Points to the string's font information or NULL
1040 if the string font information is not changed.
1041
1042 @retval EFI_SUCCESS The string was updated successfully.
1043 @retval EFI_NOT_FOUND The string specified by StringId is not in the
1044 database.
1045 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
1046 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
1047 task.
1048
1049 **/
1050 EFI_STATUS
1051 EFIAPI
1052 HiiSetString (
1053 IN CONST EFI_HII_STRING_PROTOCOL *This,
1054 IN EFI_HII_HANDLE PackageList,
1055 IN EFI_STRING_ID StringId,
1056 IN CONST CHAR8 *Language,
1057 IN CONST EFI_STRING String,
1058 IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
1059 );
1060
1061
1062 /**
1063 This function returns the list of supported languages, in the format specified
1064 in Appendix M of UEFI 2.1 spec.
1065
1066 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1067 instance.
1068 @param PackageList The package list to examine.
1069 @param Languages Points to the buffer to hold the returned
1070 null-terminated ASCII string.
1071 @param LanguagesSize On entry, points to the size of the buffer
1072 pointed to by Languages, in bytes. On return,
1073 points to the length of Languages, in bytes.
1074
1075 @retval EFI_SUCCESS The languages were returned successfully.
1076 @retval EFI_INVALID_PARAMETER The Languages or LanguagesSize was NULL.
1077 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1078 of supported languages. LanguageSize is updated
1079 to contain the required size.
1080 @retval EFI_NOT_FOUND Could not find string package in specified
1081 packagelist.
1082
1083 **/
1084 EFI_STATUS
1085 EFIAPI
1086 HiiGetLanguages (
1087 IN CONST EFI_HII_STRING_PROTOCOL *This,
1088 IN EFI_HII_HANDLE PackageList,
1089 IN OUT CHAR8 *Languages,
1090 IN OUT UINTN *LanguagesSize
1091 );
1092
1093
1094 /**
1095 Each string package has associated with it a single primary language and zero
1096 or more secondary languages. This routine returns the secondary languages
1097 associated with a package list.
1098
1099 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1100 instance.
1101 @param PackageList The package list to examine.
1102 @param PrimaryLanguage Points to the null-terminated ASCII string that specifies
1103 the primary language. Languages are specified in the
1104 format specified in Appendix M of the UEFI 2.0 specification.
1105 @param SecondaryLanguages Points to the buffer to hold the returned null-terminated
1106 ASCII string that describes the list of
1107 secondary languages for the specified
1108 PrimaryLanguage. If there are no secondary
1109 languages, the function returns successfully,
1110 but this is set to NULL.
1111 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1112 pointed to by SecondaryLanguages, in bytes. On
1113 return, points to the length of SecondaryLanguages
1114 in bytes.
1115
1116 @retval EFI_SUCCESS Secondary languages were correctly returned.
1117 @retval EFI_INVALID_PARAMETER PrimaryLanguage or SecondaryLanguages or
1118 SecondaryLanguagesSize was NULL.
1119 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondaryLanguagesSize is
1120 too small to hold the returned information.
1121 SecondaryLanguageSize is updated to hold the size of
1122 the buffer required.
1123 @retval EFI_INVALID_LANGUAGE The language specified by PrimaryLanguage is not
1124 present in the specified package list.
1125 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1126
1127 **/
1128 EFI_STATUS
1129 EFIAPI
1130 HiiGetSecondaryLanguages (
1131 IN CONST EFI_HII_STRING_PROTOCOL *This,
1132 IN EFI_HII_HANDLE PackageList,
1133 IN CONST CHAR8 *PrimaryLanguage,
1134 IN OUT CHAR8 *SecondaryLanguages,
1135 IN OUT UINTN *SecondaryLanguagesSize
1136 );
1137
1138 //
1139 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1140 //
1141
1142
1143 /**
1144 This function adds the packages in the package list to the database and returns a handle. If there is a
1145 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1146 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1147
1148 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1149 instance.
1150 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1151 structure.
1152 @param DriverHandle Associate the package list with this EFI handle.
1153 If a NULL is specified, this data will not be associate
1154 with any drivers and cannot have a callback induced.
1155 @param Handle A pointer to the EFI_HII_HANDLE instance.
1156
1157 @retval EFI_SUCCESS The package list associated with the Handle was
1158 added to the HII database.
1159 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1160 new database contents.
1161 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1162
1163 **/
1164 EFI_STATUS
1165 EFIAPI
1166 HiiNewPackageList (
1167 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1168 IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList,
1169 IN CONST EFI_HANDLE DriverHandle, OPTIONAL
1170 OUT EFI_HII_HANDLE *Handle
1171 );
1172
1173
1174 /**
1175 This function removes the package list that is associated with a handle Handle
1176 from the HII database. Before removing the package, any registered functions
1177 with the notification type REMOVE_PACK and the same package type will be called.
1178
1179 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1180 instance.
1181 @param Handle The handle that was registered to the data that
1182 is requested for removal.
1183
1184 @retval EFI_SUCCESS The data associated with the Handle was removed
1185 from the HII database.
1186 @retval EFI_NOT_FOUND The specified Handle is not in database.
1187
1188 **/
1189 EFI_STATUS
1190 EFIAPI
1191 HiiRemovePackageList (
1192 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1193 IN EFI_HII_HANDLE Handle
1194 );
1195
1196
1197 /**
1198 This function updates the existing package list (which has the specified Handle)
1199 in the HII databases, using the new package list specified by PackageList.
1200
1201 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1202 instance.
1203 @param Handle The handle that was registered to the data that
1204 is requested to be updated.
1205 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1206 package.
1207
1208 @retval EFI_SUCCESS The HII database was successfully updated.
1209 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1210 database.
1211 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1212 @retval EFI_NOT_FOUND The specified Handle is not in database.
1213
1214 **/
1215 EFI_STATUS
1216 EFIAPI
1217 HiiUpdatePackageList (
1218 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1219 IN EFI_HII_HANDLE Handle,
1220 IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList
1221 );
1222
1223
1224 /**
1225 This function returns a list of the package handles of the specified type
1226 that are currently active in the database. The pseudo-type
1227 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1228
1229 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1230 instance.
1231 @param PackageType Specifies the package type of the packages to
1232 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1233 to be listed.
1234 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1235 this is the pointer to the GUID which must match
1236 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1237 Otherwise, it must be NULL.
1238 @param HandleBufferLength On input, a pointer to the length of the handle
1239 buffer. On output, the length of the handle
1240 buffer that is required for the handles found.
1241 @param Handle An array of EFI_HII_HANDLE instances returned.
1242
1243 @retval EFI_SUCCESS The matching handles are outputed successfully.
1244 HandleBufferLength is updated with the actual length.
1245 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1246 Handle is too small to support the number of
1247 handles. HandleBufferLength is updated with a
1248 value that will enable the data to fit.
1249 @retval EFI_NOT_FOUND No matching handle could not be found in
1250 database.
1251 @retval EFI_INVALID_PARAMETER Handle or HandleBufferLength was NULL.
1252 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1253 PackageGuid is not NULL, PackageType is a EFI_HII_
1254 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1255
1256
1257 **/
1258 EFI_STATUS
1259 EFIAPI
1260 HiiListPackageLists (
1261 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1262 IN UINT8 PackageType,
1263 IN CONST EFI_GUID *PackageGuid,
1264 IN OUT UINTN *HandleBufferLength,
1265 OUT EFI_HII_HANDLE *Handle
1266 );
1267
1268
1269 /**
1270 This function will export one or all package lists in the database to a buffer.
1271 For each package list exported, this function will call functions registered
1272 with EXPORT_PACK and then copy the package list to the buffer.
1273
1274 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1275 instance.
1276 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1277 package list in the HII database to export or
1278 NULL to indicate all package lists should be
1279 exported.
1280 @param BufferSize On input, a pointer to the length of the buffer.
1281 On output, the length of the buffer that is
1282 required for the exported data.
1283 @param Buffer A pointer to a buffer that will contain the
1284 results of the export function.
1285
1286 @retval EFI_SUCCESS Package exported.
1287 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1288 Handle is too small to support the number of
1289 handles. HandleBufferLength is updated with
1290 a value that will enable the data to fit.
1291 @retval EFI_NOT_FOUND The specifiecd Handle could not be found in the
1292 current database.
1293 @retval EFI_INVALID_PARAMETER Handle or Buffer or BufferSize was NULL.
1294
1295 **/
1296 EFI_STATUS
1297 EFIAPI
1298 HiiExportPackageLists (
1299 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1300 IN EFI_HII_HANDLE Handle,
1301 IN OUT UINTN *BufferSize,
1302 OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer
1303 );
1304
1305
1306 /**
1307 This function registers a function which will be called when specified actions related to packages of
1308 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1309 notified when specific package types are added, removed or updated in the HII database.
1310 Each driver or application which registers a notification should use
1311 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1312
1313 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1314 instance.
1315 @param PackageType Specifies the package type of the packages to
1316 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1317 to be listed.
1318 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1319 this is the pointer to the GUID which must match
1320 the Guid field of
1321 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1322 be NULL.
1323 @param PackageNotifyFn Points to the function to be called when the
1324 event specified by
1325 NotificationType occurs.
1326 @param NotifyType Describes the types of notification which this
1327 function will be receiving.
1328 @param NotifyHandle Points to the unique handle assigned to the
1329 registered notification. Can be used in
1330 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1331 to stop notifications.
1332
1333 @retval EFI_SUCCESS Notification registered successfully.
1334 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1335 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1336 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1337 EFI_HII_PACKAGE_TYPE_GUID.
1338 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1339 EFI_HII_PACKAGE_TYPE_GUID.
1340
1341 **/
1342 EFI_STATUS
1343 EFIAPI
1344 HiiRegisterPackageNotify (
1345 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1346 IN UINT8 PackageType,
1347 IN CONST EFI_GUID *PackageGuid,
1348 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn,
1349 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,
1350 OUT EFI_HANDLE *NotifyHandle
1351 );
1352
1353
1354 /**
1355 Removes the specified HII database package-related notification.
1356
1357 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1358 instance.
1359 @param NotificationHandle The handle of the notification function being
1360 unregistered.
1361
1362 @retval EFI_SUCCESS Notification is unregistered successfully.
1363 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1364 in current hii database.
1365
1366 **/
1367 EFI_STATUS
1368 EFIAPI
1369 HiiUnregisterPackageNotify (
1370 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1371 IN EFI_HANDLE NotificationHandle
1372 );
1373
1374
1375 /**
1376 This routine retrieves an array of GUID values for each keyboard layout that
1377 was previously registered in the system.
1378
1379 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1380 instance.
1381 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1382 GUID buffer. On output, the length of the handle
1383 buffer that is required for the handles found.
1384 @param KeyGuidBuffer An array of keyboard layout GUID instances
1385 returned.
1386
1387 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1388 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1389 that KeyGuidBuffer is too small to support the
1390 number of GUIDs. KeyGuidBufferLength is
1391 updated with a value that will enable the data to
1392 fit.
1393 @retval EFI_INVALID_PARAMETER The KeyGuidBuffer or KeyGuidBufferLength was
1394 NULL.
1395 @retval EFI_NOT_FOUND There was no keyboard layout.
1396
1397 **/
1398 EFI_STATUS
1399 EFIAPI
1400 HiiFindKeyboardLayouts (
1401 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1402 IN OUT UINT16 *KeyGuidBufferLength,
1403 OUT EFI_GUID *KeyGuidBuffer
1404 );
1405
1406
1407 /**
1408 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1409 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1410
1411 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1412 instance.
1413 @param KeyGuid A pointer to the unique ID associated with a
1414 given keyboard layout. If KeyGuid is NULL then
1415 the current layout will be retrieved.
1416 @param KeyboardLayoutLength On input, a pointer to the length of the
1417 KeyboardLayout buffer. On output, the length of
1418 the data placed into KeyboardLayout.
1419 @param KeyboardLayout A pointer to a buffer containing the retrieved
1420 keyboard layout.
1421
1422 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1423 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1424 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1425 NULL.
1426
1427 **/
1428 EFI_STATUS
1429 EFIAPI
1430 HiiGetKeyboardLayout (
1431 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1432 IN CONST EFI_GUID *KeyGuid,
1433 IN OUT UINT16 *KeyboardLayoutLength,
1434 OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout
1435 );
1436
1437
1438 /**
1439 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1440 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1441 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1442 can be notified of this change.
1443
1444 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1445 instance.
1446 @param KeyGuid A pointer to the unique ID associated with a
1447 given keyboard layout.
1448
1449 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1450 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1451 action was taken.
1452 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1453
1454 **/
1455 EFI_STATUS
1456 EFIAPI
1457 HiiSetKeyboardLayout (
1458 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1459 IN CONST EFI_GUID *KeyGuid
1460 );
1461
1462
1463 /**
1464 Return the EFI handle associated with a package list.
1465
1466 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1467 instance.
1468 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1469 package list in the HIIdatabase.
1470 @param DriverHandle On return, contains the EFI_HANDLE which was
1471 registered with the package list in
1472 NewPackageList().
1473
1474 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1475 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1476 DriverHandle was NULL.
1477
1478 **/
1479 EFI_STATUS
1480 EFIAPI
1481 HiiGetPackageListHandle (
1482 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1483 IN EFI_HII_HANDLE PackageListHandle,
1484 OUT EFI_HANDLE *DriverHandle
1485 );
1486
1487 //
1488 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1489 //
1490
1491
1492 /**
1493 This function allows a caller to extract the current configuration
1494 for one or more named elements from one or more drivers.
1495
1496 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1497 instance.
1498 @param Request A null-terminated Unicode string in
1499 <MultiConfigRequest> format.
1500 @param Progress On return, points to a character in the Request
1501 string. Points to the string's null terminator if
1502 request was successful. Points to the most recent
1503 & before the first failing name / value pair (or
1504 the beginning of the string if the failure is in
1505 the first name / value pair) if the request was
1506 not successful.
1507 @param Results Null-terminated Unicode string in
1508 <MultiConfigAltResp> format which has all values
1509 filled in for the names in the Request string.
1510 String to be allocated by the called function.
1511
1512 @retval EFI_SUCCESS The Results string is filled with the values
1513 corresponding to all requested names.
1514 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1515 results that must be stored awaiting possible
1516 future protocols.
1517 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1518 Progress set to the "G" in "GUID" of the
1519 routing header that doesn't match. Note: There
1520 is no requirement that all routing data
1521 be validated before any configuration extraction.
1522 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1523 parameter would result in this type of error. The
1524 Progress parameter is set to NULL.
1525 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1526 before the error or the beginning of the string.
1527 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1528 name in question.
1529
1530 **/
1531 EFI_STATUS
1532 EFIAPI
1533 HiiConfigRoutingExtractConfig (
1534 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1535 IN CONST EFI_STRING Request,
1536 OUT EFI_STRING *Progress,
1537 OUT EFI_STRING *Results
1538 );
1539
1540
1541 /**
1542 This function allows the caller to request the current configuration for the
1543 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1544
1545 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1546 instance.
1547 @param Results Null-terminated Unicode string in
1548 <MultiConfigAltResp> format which has all values
1549 filled in for the names in the Request string.
1550 String to be allocated by the called function.
1551 De-allocation is up to the caller.
1552
1553 @retval EFI_SUCCESS The Results string is filled with the values
1554 corresponding to all requested names.
1555 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1556 results that must be stored awaiting possible
1557 future protocols.
1558 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1559 parameter would result in this type of error.
1560
1561 **/
1562 EFI_STATUS
1563 EFIAPI
1564 HiiConfigRoutingExportConfig (
1565 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1566 OUT EFI_STRING *Results
1567 );
1568
1569
1570 /**
1571 This function processes the results of processing forms and routes it to the
1572 appropriate handlers or storage.
1573
1574 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1575 instance.
1576 @param Configuration A null-terminated Unicode string in
1577 <MulltiConfigResp> format.
1578 @param Progress A pointer to a string filled in with the offset
1579 of the most recent & before the first failing
1580 name / value pair (or the beginning of the string
1581 if the failure is in the first name / value pair)
1582 or the terminating NULL if all was successful.
1583
1584 @retval EFI_SUCCESS The results have been distributed or are awaiting
1585 distribution.
1586 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1587 results that must be stored awaiting possible
1588 future protocols.
1589 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1590 would result in this type of error.
1591 @retval EFI_NOT_FOUND Target for the specified routing data was not
1592 found.
1593
1594 **/
1595 EFI_STATUS
1596 EFIAPI
1597 HiiConfigRoutingRouteConfig (
1598 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1599 IN CONST EFI_STRING Configuration,
1600 OUT EFI_STRING *Progress
1601 );
1602
1603
1604
1605 /**
1606 This helper function is to be called by drivers to map configuration data stored
1607 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1608
1609 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1610 instance.
1611 @param ConfigRequest A null-terminated Unicode string in
1612 <ConfigRequest> format.
1613 @param Block Array of bytes defining the block's
1614 configuration.
1615 @param BlockSize Length in bytes of Block.
1616 @param Config Filled-in configuration string. String allocated
1617 by the function. Returned only if call is
1618 successful.
1619 @param Progress A pointer to a string filled in with the offset
1620 of the most recent & before the first failing
1621 name/value pair (or the beginning of the string
1622 if the failure is in the first name / value pair)
1623 or the terminating NULL if all was successful.
1624
1625 @retval EFI_SUCCESS The request succeeded. Progress points to the
1626 null terminator at the end of the ConfigRequest
1627 string.
1628 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1629 Progress points to the first character of
1630 ConfigRequest.
1631 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1632 Block parameter would result in this type of
1633 error. Progress points to the first character of
1634 ConfigRequest.
1635 @retval EFI_NOT_FOUND Target for the specified routing data was not
1636 found. Progress points to the "G" in "GUID" of
1637 the errant routing data.
1638 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
1639 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
1640 Block is left updated and Progress points at
1641 the '&' preceding the first non-<BlockName>.
1642
1643 **/
1644 EFI_STATUS
1645 EFIAPI
1646 HiiBlockToConfig (
1647 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1648 IN CONST EFI_STRING ConfigRequest,
1649 IN CONST UINT8 *Block,
1650 IN CONST UINTN BlockSize,
1651 OUT EFI_STRING *Config,
1652 OUT EFI_STRING *Progress
1653 );
1654
1655
1656 /**
1657 This helper function is to be called by drivers to map configuration strings
1658 to configurations stored in byte array ("block") formats such as UEFI Variables.
1659
1660 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1661 instance.
1662 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
1663 format.
1664 @param Block A possibly null array of bytes representing the
1665 current block. Only bytes referenced in the
1666 ConfigResp string in the block are modified. If
1667 this parameter is null or if the *BlockSize
1668 parameter is (on input) shorter than required by
1669 the Configuration string, only the BlockSize
1670 parameter is updated and an appropriate status
1671 (see below) is returned.
1672 @param BlockSize The length of the Block in units of UINT8. On
1673 input, this is the size of the Block. On output,
1674 if successful, contains the index of the last
1675 modified byte in the Block.
1676 @param Progress On return, points to an element of the ConfigResp
1677 string filled in with the offset of the most
1678 recent '&' before the first failing name / value
1679 pair (or the beginning of the string if the
1680 failure is in the first name / value pair) or
1681 the terminating NULL if all was successful.
1682
1683 @retval EFI_SUCCESS The request succeeded. Progress points to the
1684 null terminator at the end of the ConfigResp
1685 string.
1686 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1687 Progress points to the first character of
1688 ConfigResp.
1689 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
1690 Block parameter would result in this type of
1691 error. Progress points to the first character of
1692 ConfigResp.
1693 @retval EFI_NOT_FOUND Target for the specified routing data was not
1694 found. Progress points to the "G" in "GUID" of
1695 the errant routing data.
1696 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
1697 value pair. Block is left updated and
1698 Progress points at the '&' preceding the first
1699 non-<BlockName>.
1700
1701 **/
1702 EFI_STATUS
1703 EFIAPI
1704 HiiConfigToBlock (
1705 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1706 IN CONST EFI_STRING ConfigResp,
1707 IN OUT UINT8 *Block,
1708 IN OUT UINTN *BlockSize,
1709 OUT EFI_STRING *Progress
1710 );
1711
1712
1713 /**
1714 This helper function is to be called by drivers to extract portions of
1715 a larger configuration string.
1716
1717 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1718 instance.
1719 @param Configuration A null-terminated Unicode string in
1720 <MultiConfigAltResp> format.
1721 @param Guid A pointer to the GUID value to search for in the
1722 routing portion of the ConfigResp string when
1723 retrieving the requested data. If Guid is NULL,
1724 then all GUID values will be searched for.
1725 @param Name A pointer to the NAME value to search for in the
1726 routing portion of the ConfigResp string when
1727 retrieving the requested data. If Name is NULL,
1728 then all Name values will be searched for.
1729 @param DevicePath A pointer to the PATH value to search for in the
1730 routing portion of the ConfigResp string when
1731 retrieving the requested data. If DevicePath is
1732 NULL, then all DevicePath values will be
1733 searched for.
1734 @param AltCfgId A pointer to the ALTCFG value to search for in
1735 the routing portion of the ConfigResp string
1736 when retrieving the requested data. If this
1737 parameter is NULL, then the current setting will
1738 be retrieved.
1739 @param AltCfgResp A pointer to a buffer which will be allocated by
1740 the function which contains the retrieved string
1741 as requested. This buffer is only allocated if
1742 the call was successful.
1743
1744 @retval EFI_SUCCESS The request succeeded. The requested data was
1745 extracted and placed in the newly allocated
1746 AltCfgResp buffer.
1747 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
1748 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
1749 @retval EFI_NOT_FOUND Target for the specified routing data was not
1750 found.
1751
1752 **/
1753 EFI_STATUS
1754 EFIAPI
1755 HiiGetAltCfg (
1756 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1757 IN CONST EFI_STRING Configuration,
1758 IN CONST EFI_GUID *Guid,
1759 IN CONST EFI_STRING Name,
1760 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
1761 IN CONST UINT16 *AltCfgId,
1762 OUT EFI_STRING *AltCfgResp
1763 );
1764
1765
1766 /**
1767 Compare whether two names of languages are identical.
1768
1769 @param Language1 Name of language 1 from StringPackage
1770 @param Language2 Name of language 2 to be compared with language 1.
1771
1772 @retval TRUE same
1773 @retval FALSE not same
1774
1775 **/
1776 BOOLEAN
1777 HiiCompareLanguage (
1778 IN CHAR8 *Language1,
1779 IN CHAR8 *Language2
1780 )
1781 ;
1782
1783 //
1784 // Global variables
1785 //
1786 extern EFI_EVENT gHiiKeyboardLayoutChanged;
1787 #endif