]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/SetupBrowser.c
e427b6b98d949491476d8eaa0044ee94ac9ce085
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / FrameworkHiiOnUefiHiiThunk / SetupBrowser.c
1 /** @file
2 Framework to UEFI 2.1 Setup Browser Thunk. The file consume EFI_FORM_BROWSER2_PROTOCOL
3 to produce a EFI_FORM_BROWSER_PROTOCOL.
4
5 Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #include "HiiDatabase.h"
17 #include "SetupBrowser.h"
18
19 EFI_GUID gFrameworkBdsFrontPageFormsetGuid = FRAMEWORK_BDS_FRONTPAGE_FORMSET_GUID;
20 EFI_HII_HANDLE gStringPackHandle = NULL;
21 BOOLEAN mFrontPageDisplayed = FALSE;
22 //
23 // 106F3545-B788-4cb5-9D2A-CE0CDB208DF5
24 //
25 EFI_GUID gEfiHiiThunkProducerGuid = { 0x106f3545, 0xb788, 0x4cb5, { 0x9d, 0x2a, 0xce, 0xc, 0xdb, 0x20, 0x8d, 0xf5 } };
26
27
28 /**
29 Get string by string id from HII Interface
30
31
32 @param Id String ID.
33
34 @retval CHAR16 * String from ID.
35 @retval NULL If error occurs.
36
37 **/
38 CHAR16 *
39 GetStringById (
40 IN EFI_STRING_ID Id
41 )
42 {
43 return HiiGetString (gStringPackHandle, Id, NULL);
44 }
45
46 /**
47
48 Show progress bar with title above it. It only works in Graphics mode.
49
50
51 @param TitleForeground Foreground color for Title.
52 @param TitleBackground Background color for Title.
53 @param Title Title above progress bar.
54 @param ProgressColor Progress bar color.
55 @param Progress Progress (0-100)
56 @param PreviousValue The previous value of the progress.
57
58 @retval EFI_STATUS Success update the progress bar
59
60 **/
61 EFI_STATUS
62 PlatformBdsShowProgress (
63 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleForeground,
64 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleBackground,
65 IN CHAR16 *Title,
66 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL ProgressColor,
67 IN UINTN Progress,
68 IN UINTN PreviousValue
69 )
70 {
71 EFI_STATUS Status;
72 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
73 EFI_UGA_DRAW_PROTOCOL *UgaDraw;
74 UINT32 SizeOfX;
75 UINT32 SizeOfY;
76 UINT32 ColorDepth;
77 UINT32 RefreshRate;
78 EFI_GRAPHICS_OUTPUT_BLT_PIXEL Color;
79 UINTN BlockHeight;
80 UINTN BlockWidth;
81 UINTN BlockNum;
82 UINTN PosX;
83 UINTN PosY;
84 UINTN Index;
85
86 if (Progress > 100) {
87 return EFI_INVALID_PARAMETER;
88 }
89
90 UgaDraw = NULL;
91 Status = gBS->HandleProtocol (
92 gST->ConsoleOutHandle,
93 &gEfiGraphicsOutputProtocolGuid,
94 (VOID **) &GraphicsOutput
95 );
96 if (EFI_ERROR (Status)) {
97 GraphicsOutput = NULL;
98
99 Status = gBS->HandleProtocol (
100 gST->ConsoleOutHandle,
101 &gEfiUgaDrawProtocolGuid,
102 (VOID **) &UgaDraw
103 );
104 }
105 if (EFI_ERROR (Status) || (GraphicsOutput == NULL && UgaDraw == NULL)) {
106 return EFI_UNSUPPORTED;
107 }
108
109 SizeOfX = 0;
110 SizeOfY = 0;
111 if (GraphicsOutput != NULL) {
112 SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;
113 SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;
114 } else {
115 Status = UgaDraw->GetMode (
116 UgaDraw,
117 &SizeOfX,
118 &SizeOfY,
119 &ColorDepth,
120 &RefreshRate
121 );
122 if (EFI_ERROR (Status)) {
123 return EFI_UNSUPPORTED;
124 }
125 }
126
127 BlockWidth = SizeOfX / 100;
128 BlockHeight = SizeOfY / 50;
129
130 BlockNum = Progress;
131
132 PosX = 0;
133 PosY = SizeOfY * 48 / 50;
134
135 if (BlockNum == 0) {
136 //
137 // Clear progress area
138 //
139 SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
140
141 if (GraphicsOutput != NULL) {
142 Status = GraphicsOutput->Blt (
143 GraphicsOutput,
144 &Color,
145 EfiBltVideoFill,
146 0,
147 0,
148 0,
149 PosY - EFI_GLYPH_HEIGHT - 1,
150 SizeOfX,
151 SizeOfY - (PosY - EFI_GLYPH_HEIGHT - 1),
152 SizeOfX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
153 );
154 } else {
155 Status = UgaDraw->Blt (
156 UgaDraw,
157 (EFI_UGA_PIXEL *) &Color,
158 EfiUgaVideoFill,
159 0,
160 0,
161 0,
162 PosY - EFI_GLYPH_HEIGHT - 1,
163 SizeOfX,
164 SizeOfY - (PosY - EFI_GLYPH_HEIGHT - 1),
165 SizeOfX * sizeof (EFI_UGA_PIXEL)
166 );
167 }
168 }
169 //
170 // Show progress by drawing blocks
171 //
172 for (Index = PreviousValue; Index < BlockNum; Index++) {
173 PosX = Index * BlockWidth;
174 if (GraphicsOutput != NULL) {
175 Status = GraphicsOutput->Blt (
176 GraphicsOutput,
177 &ProgressColor,
178 EfiBltVideoFill,
179 0,
180 0,
181 PosX,
182 PosY,
183 BlockWidth - 1,
184 BlockHeight,
185 (BlockWidth) * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
186 );
187 } else {
188 Status = UgaDraw->Blt (
189 UgaDraw,
190 (EFI_UGA_PIXEL *) &ProgressColor,
191 EfiUgaVideoFill,
192 0,
193 0,
194 PosX,
195 PosY,
196 BlockWidth - 1,
197 BlockHeight,
198 (BlockWidth) * sizeof (EFI_UGA_PIXEL)
199 );
200 }
201 }
202
203 PrintXY (
204 (SizeOfX - StrLen (Title) * EFI_GLYPH_WIDTH) / 2,
205 PosY - EFI_GLYPH_HEIGHT - 1,
206 &TitleForeground,
207 &TitleBackground,
208 Title
209 );
210
211 return EFI_SUCCESS;
212 }
213
214 /**
215 Function waits for a given event to fire, or for an optional timeout to expire.
216
217
218 @param Event The event to wait for
219
220 @param Timeout An optional timeout value in 100 ns units.
221
222 @retval EFI_SUCCESS Event fired before Timeout expired.
223 @retval EFI_TIME_OUT Timout expired before Event fired..
224
225 **/
226 EFI_STATUS
227 WaitForSingleEvent (
228 IN EFI_EVENT Event,
229 IN UINT64 Timeout OPTIONAL
230 )
231 {
232 EFI_STATUS Status;
233 UINTN Index;
234 EFI_EVENT TimerEvent;
235 EFI_EVENT WaitList[2];
236
237 if (Timeout != 0) {
238 //
239 // Create a timer event
240 //
241 Status = gBS->CreateEvent (EVT_TIMER, 0, NULL, NULL, &TimerEvent);
242 if (!EFI_ERROR (Status)) {
243 //
244 // Set the timer event
245 //
246 gBS->SetTimer (
247 TimerEvent,
248 TimerRelative,
249 Timeout
250 );
251
252 //
253 // Wait for the original event or the timer
254 //
255 WaitList[0] = Event;
256 WaitList[1] = TimerEvent;
257 Status = gBS->WaitForEvent (2, WaitList, &Index);
258 gBS->CloseEvent (TimerEvent);
259
260 //
261 // If the timer expired, change the return to timed out
262 //
263 if (!EFI_ERROR (Status) && Index == 1) {
264 Status = EFI_TIMEOUT;
265 }
266 }
267 } else {
268 //
269 // No timeout... just wait on the event
270 //
271 Status = gBS->WaitForEvent (1, &Event, &Index);
272 ASSERT (!EFI_ERROR (Status));
273 ASSERT (Index == 0);
274 }
275
276 return Status;
277 }
278
279 /**
280 Function show progress bar to wait for user input.
281
282
283 @param TimeoutDefault - The fault time out value before the system
284 continue to boot.
285
286 @retval EFI_SUCCESS User pressed some key except "Enter"
287 @retval EFI_TIME_OUT Timout expired or user press "Enter"
288
289 **/
290 EFI_STATUS
291 ShowProgress (
292 IN UINT16 TimeoutDefault
293 )
294 {
295 EFI_STATUS Status;
296 CHAR16 *TmpStr;
297 EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground;
298 EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background;
299 EFI_GRAPHICS_OUTPUT_BLT_PIXEL Color;
300 EFI_INPUT_KEY Key;
301 UINT16 TimeoutRemain;
302
303 if (TimeoutDefault == 0) {
304 return EFI_TIMEOUT;
305 }
306
307 DEBUG ((EFI_D_INFO, "\n\nStart showing progress bar... Press any key to stop it! ...Zzz....\n"));
308
309 SetMem (&Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
310 SetMem (&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
311 SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);
312
313 //
314 // Clear the progress status bar first
315 //
316 TmpStr = GetStringById (STRING_TOKEN (STR_START_BOOT_OPTION));
317 if (TmpStr != NULL) {
318 PlatformBdsShowProgress (Foreground, Background, TmpStr, Color, 0, 0);
319 }
320
321 TimeoutRemain = TimeoutDefault;
322 while (TimeoutRemain != 0) {
323 DEBUG ((EFI_D_INFO, "Showing progress bar...Remaining %d second!\n", TimeoutRemain));
324
325 Status = WaitForSingleEvent (gST->ConIn->WaitForKey, ONE_SECOND);
326 if (Status != EFI_TIMEOUT) {
327 break;
328 }
329 TimeoutRemain--;
330
331 //
332 // Show progress
333 //
334 if (TmpStr != NULL) {
335 PlatformBdsShowProgress (
336 Foreground,
337 Background,
338 TmpStr,
339 Color,
340 ((TimeoutDefault - TimeoutRemain) * 100 / TimeoutDefault),
341 0
342 );
343 }
344 }
345 gBS->FreePool (TmpStr);
346
347 //
348 // Timeout expired
349 //
350 if (TimeoutRemain == 0) {
351 return EFI_TIMEOUT;
352 }
353
354 //
355 // User pressed some key
356 //
357 Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
358 if (EFI_ERROR (Status)) {
359 return Status;
360 }
361
362 if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) {
363 //
364 // User pressed enter, equivalent to select "continue"
365 //
366 return EFI_TIMEOUT;
367 }
368
369 return EFI_SUCCESS;
370 }
371
372 /**
373 Return the default value for system Timeout variable.
374
375 @return Timeout value.
376
377 **/
378 UINT16
379 EFIAPI
380 GetTimeout (
381 VOID
382 )
383 {
384 return PcdGet16 (PcdPlatformBootTimeOut);
385 }
386
387
388 /**
389 This is the Framework Setup Browser interface which displays a FormSet.
390
391 @param This The EFI_FORM_BROWSER_PROTOCOL context.
392 @param UseDatabase TRUE if the FormSet is from HII database. The Thunk implementation
393 only support UseDatabase is TRUE.
394 @param Handle The Handle buffer.
395 @param HandleCount The number of Handle in the Handle Buffer. It must be 1 for this implementation.
396 @param Packet The pointer to data buffer containing IFR and String package. Not supported.
397 @param CallbackHandle Not supported.
398 @param NvMapOverride The buffer is used only when there is no NV variable to define the
399 current settings and the caller needs to provide to the browser the
400 current settings for the the "fake" NV variable. If used, no saving of
401 an NV variable is possbile. This parameter is also ignored if Handle is NULL.
402 @param ScreenDimensions
403 Allows the browser to be called so that it occupies a portion of the physical
404 screen instead of dynamically determining the screen dimensions.
405 @param ResetRequired This BOOLEAN value denotes whether a reset is required based on the data that
406 might have been changed. The ResetRequired parameter is primarily applicable
407 for configuration applications, and is an optional parameter.
408
409 @retval EFI_SUCCESS If the Formset is displayed correctly.
410 @retval EFI_UNSUPPORTED If UseDatabase is FALSE or HandleCount is not 1.
411 @retval EFI_INVALID_PARAMETER If the *Handle passed in is not found in the database.
412 **/
413 EFI_STATUS
414 EFIAPI
415 ThunkSendForm (
416 IN EFI_FORM_BROWSER_PROTOCOL *This,
417 IN BOOLEAN UseDatabase,
418 IN FRAMEWORK_EFI_HII_HANDLE *Handle,
419 IN UINTN HandleCount,
420 IN EFI_IFR_PACKET *Packet, OPTIONAL
421 IN EFI_HANDLE CallbackHandle, OPTIONAL
422 IN UINT8 *NvMapOverride, OPTIONAL
423 IN FRAMEWORK_EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
424 OUT BOOLEAN *ResetRequired OPTIONAL
425 )
426 {
427 EFI_STATUS Status;
428 EFI_BROWSER_ACTION_REQUEST ActionRequest;
429 HII_THUNK_CONTEXT *ThunkContext;
430 HII_THUNK_PRIVATE_DATA *Private;
431 EFI_FORMBROWSER_THUNK_PRIVATE_DATA *BrowserPrivate;
432
433 if (!UseDatabase) {
434 //
435 // ThunkSendForm only support displays forms registered into the HII database.
436 //
437 return EFI_UNSUPPORTED;
438 }
439
440 if (HandleCount != 1 ) {
441 return EFI_UNSUPPORTED;
442 }
443
444 BrowserPrivate = EFI_FORMBROWSER_THUNK_PRIVATE_DATA_FROM_THIS (This);
445 Private = BrowserPrivate->ThunkPrivate;
446
447 ThunkContext = FwHiiHandleToThunkContext (Private, *Handle);
448 if (ThunkContext == NULL) {
449 return EFI_INVALID_PARAMETER;
450 }
451
452 //
453 // Following UEFI spec to do auto booting after a time-out. This feature is implemented
454 // in Framework Setup Browser and moved to MdeModulePkg/Universal/BdsDxe. The auto booting is
455 // moved here in HII Thunk module.
456 //
457 if (CompareGuid (&gFrameworkBdsFrontPageFormsetGuid, &ThunkContext->FormSet->Guid) && !mFrontPageDisplayed) {
458 //
459 // Send form is called before entering the
460 //
461 mFrontPageDisplayed = TRUE;
462 Status = ShowProgress (GetTimeout ());
463
464 if (EFI_ERROR (Status)) {
465 return Status;
466 }
467 }
468
469 if (NvMapOverride != NULL) {
470 ThunkContext->NvMapOverride = NvMapOverride;
471 }
472
473 Status = mFormBrowser2Protocol->SendForm (
474 mFormBrowser2Protocol,
475 &ThunkContext->UefiHiiHandle,
476 1,
477 NULL,
478 0,
479 (EFI_SCREEN_DESCRIPTOR *) ScreenDimensions,
480 &ActionRequest
481 );
482
483 if (ActionRequest == EFI_BROWSER_ACTION_REQUEST_RESET) {
484 *ResetRequired = TRUE;
485 }
486
487 return Status;
488 }
489
490 /**
491
492 Rountine used to display a generic dialog interface and return
493 the Key or Input from user input.
494
495 @param LinesNumber The number of lines for the dialog box.
496 @param HotKey Defines if a single character is parsed (TRUE) and returned in KeyValue
497 or if a string is returned in StringBuffer.
498 @param MaximumStringSize The maximum size in bytes of a typed-in string.
499 @param StringBuffer On return contains the typed-in string if HotKey is FALSE.
500 @param Key The EFI_INPUT_KEY value returned if HotKey is TRUE.
501 @param FirstString The pointer to the first string in the list of strings
502 that comprise the dialog box.
503 @param ... A series of NumberOfLines text strings that will be used
504 to construct the dialog box.
505 @retval EFI_SUCCESS The dialog is created successfully and user interaction was received.
506 @retval EFI_DEVICE_ERROR The user typed in an ESC.
507 @retval EFI_INVALID_PARAMETER One of the parameters was invalid.(StringBuffer == NULL && HotKey == FALSE).
508 **/
509 EFI_STATUS
510 EFIAPI
511 ThunkCreatePopUp (
512 IN UINTN LinesNumber,
513 IN BOOLEAN HotKey,
514 IN UINTN MaximumStringSize,
515 OUT CHAR16 *StringBuffer,
516 OUT EFI_INPUT_KEY *Key,
517 IN CHAR16 *FirstString,
518 ...
519 )
520 {
521 VA_LIST Args;
522 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;
523 EFI_SIMPLE_TEXT_OUTPUT_MODE SavedConsoleMode;
524 UINTN Columns;
525 UINTN Rows;
526 UINTN Column;
527 UINTN Row;
528 UINTN NumberOfLines;
529 UINTN MaxLength;
530 CHAR16 *String;
531 UINTN Length;
532 CHAR16 *Line;
533 UINTN EventIndex;
534
535 if (!HotKey) {
536 return EFI_UNSUPPORTED;
537 }
538
539 if (MaximumStringSize == 0) {
540 //
541 // Blank strint to output
542 //
543 return EFI_INVALID_PARAMETER;
544 }
545
546 //
547 // Determine the length of the longest line in the popup and the the total
548 // number of lines in the popup
549 //
550 MaxLength = StrLen (FirstString);
551 NumberOfLines = 1;
552 VA_START (Args, FirstString);
553 while ((String = VA_ARG (Args, CHAR16 *)) != NULL) {
554 MaxLength = MAX (MaxLength, StrLen (String));
555 NumberOfLines++;
556 }
557 VA_END (Args);
558
559 //
560 // If the total number of lines in the popup is not same to the input NumberOfLines
561 // the parameter is not valid. Not check.
562 //
563 // if (NumberOfLines != LinesNumber) {
564 // return EFI_INVALID_PARAMETER;
565 // }
566
567 //
568 // If the maximum length of all the strings is not same to the input MaximumStringSize
569 // the parameter is not valid. Not check.
570 //
571 // if (MaxLength != MaximumStringSize) {
572 // return EFI_INVALID_PARAMETER;
573 // }
574
575 //
576 // Cache a pointer to the Simple Text Output Protocol in the EFI System Table
577 //
578 ConOut = gST->ConOut;
579
580 //
581 // Save the current console cursor position and attributes
582 //
583 CopyMem (&SavedConsoleMode, ConOut->Mode, sizeof (SavedConsoleMode));
584
585 //
586 // Retrieve the number of columns and rows in the current console mode
587 //
588 ConOut->QueryMode (ConOut, SavedConsoleMode.Mode, &Columns, &Rows);
589
590 //
591 // Disable cursor and set the foreground and background colors specified by Attribute
592 //
593 ConOut->EnableCursor (ConOut, FALSE);
594 ConOut->SetAttribute (ConOut, EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE);
595
596 //
597 // Limit NumberOfLines to height of the screen minus 3 rows for the box itself
598 //
599 NumberOfLines = MIN (NumberOfLines, Rows - 3);
600
601 //
602 // Limit MaxLength to width of the screen minus 2 columns for the box itself
603 //
604 MaxLength = MIN (MaxLength, Columns - 2);
605
606 //
607 // Compute the starting row and starting column for the popup
608 //
609 Row = (Rows - (NumberOfLines + 3)) / 2;
610 Column = (Columns - (MaxLength + 2)) / 2;
611
612 //
613 // Allocate a buffer for a single line of the popup with borders and a Null-terminator
614 //
615 Line = AllocateZeroPool ((MaxLength + 3) * sizeof (CHAR16));
616 ASSERT (Line != NULL);
617
618 //
619 // Draw top of popup box
620 //
621 SetMem16 (Line, (MaxLength + 2) * 2, BOXDRAW_HORIZONTAL);
622 Line[0] = BOXDRAW_DOWN_RIGHT;
623 Line[MaxLength + 1] = BOXDRAW_DOWN_LEFT;
624 Line[MaxLength + 2] = L'\0';
625 ConOut->SetCursorPosition (ConOut, Column, Row++);
626 ConOut->OutputString (ConOut, Line);
627
628 //
629 // Draw middle of the popup with strings
630 //
631 VA_START (Args, FirstString);
632 String = FirstString;
633 while ((String != NULL) && (NumberOfLines > 0)) {
634 Length = StrLen (String);
635 SetMem16 (Line, (MaxLength + 2) * 2, L' ');
636 if (Length <= MaxLength) {
637 //
638 // Length <= MaxLength
639 //
640 CopyMem (Line + 1 + (MaxLength - Length) / 2, String , Length * sizeof (CHAR16));
641 } else {
642 //
643 // Length > MaxLength
644 //
645 CopyMem (Line + 1, String + (Length - MaxLength) / 2 , MaxLength * sizeof (CHAR16));
646 }
647 Line[0] = BOXDRAW_VERTICAL;
648 Line[MaxLength + 1] = BOXDRAW_VERTICAL;
649 Line[MaxLength + 2] = L'\0';
650 ConOut->SetCursorPosition (ConOut, Column, Row++);
651 ConOut->OutputString (ConOut, Line);
652 String = VA_ARG (Args, CHAR16 *);
653 NumberOfLines--;
654 }
655 VA_END (Args);
656
657 //
658 // Draw bottom of popup box
659 //
660 SetMem16 (Line, (MaxLength + 2) * 2, BOXDRAW_HORIZONTAL);
661 Line[0] = BOXDRAW_UP_RIGHT;
662 Line[MaxLength + 1] = BOXDRAW_UP_LEFT;
663 Line[MaxLength + 2] = L'\0';
664 ConOut->SetCursorPosition (ConOut, Column, Row++);
665 ConOut->OutputString (ConOut, Line);
666
667 //
668 // Free the allocated line buffer
669 //
670 FreePool (Line);
671
672 //
673 // Restore the cursor visibility, position, and attributes
674 //
675 ConOut->EnableCursor (ConOut, SavedConsoleMode.CursorVisible);
676 ConOut->SetCursorPosition (ConOut, SavedConsoleMode.CursorColumn, SavedConsoleMode.CursorRow);
677 ConOut->SetAttribute (ConOut, SavedConsoleMode.Attribute);
678
679 //
680 // Wait for a keystroke
681 //
682 if (Key != NULL) {
683 gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);
684 gST->ConIn->ReadKeyStroke (gST->ConIn, Key);
685 }
686
687 return EFI_SUCCESS;
688 }
689
690 /**
691
692 Initialize string packages in HII database.
693
694 **/
695 VOID
696 InitSetBrowserStrings (
697 VOID
698 )
699 {
700 //
701 // Initialize strings to HII database
702 //
703 gStringPackHandle = HiiAddPackages (
704 &gEfiHiiThunkProducerGuid,
705 NULL,
706 STRING_ARRAY_NAME,
707 NULL
708 );
709 ASSERT (gStringPackHandle != NULL);
710 }