TianoCore EDK2 master
Loading...
Searching...
No Matches
FrontPageCustomizedUiSupport.c
Go to the documentation of this file.
1
9#include <Uefi.h>
10
11#include <Guid/MdeModuleHii.h>
12#include <Guid/GlobalVariable.h>
13
15#include <Protocol/HiiString.h>
16
17#include <Library/HiiLib.h>
18#include <Library/DebugLib.h>
19#include <Library/UefiLib.h>
21#include <Library/PcdLib.h>
28
29//
30// This is the VFR compiler generated header file which defines the
31// string identifiers.
32//
33#define PRINTABLE_LANGUAGE_NAME_STRING_ID 0x0001
34
35#define UI_HII_DRIVER_LIST_SIZE 0x8
36
37#define FRONT_PAGE_KEY_CONTINUE 0x1000
38#define FRONT_PAGE_KEY_RESET 0x1001
39#define FRONT_PAGE_KEY_LANGUAGE 0x1002
40#define FRONT_PAGE_KEY_DRIVER 0x2000
41
42typedef struct {
43 EFI_STRING_ID PromptId;
44 EFI_STRING_ID HelpId;
45 EFI_STRING_ID DevicePathId;
46 EFI_GUID FormSetGuid;
47 BOOLEAN EmptyLineAfter;
49
50CHAR8 *gLanguageString;
51EFI_STRING_ID *gLanguageToken;
52UI_HII_DRIVER_INSTANCE *gHiiDriverList;
53extern EFI_HII_HANDLE gStringPackHandle;
54UINT8 gCurrentLanguageIndex;
55
68VOID
70 IN OUT CHAR8 **LangCode,
71 OUT CHAR8 *Lang
72 )
73{
74 UINTN Index;
75 CHAR8 *StringPtr;
76
77 ASSERT (LangCode != NULL);
78 ASSERT (*LangCode != NULL);
79 ASSERT (Lang != NULL);
80
81 Index = 0;
82 StringPtr = *LangCode;
83 while (StringPtr[Index] != 0 && StringPtr[Index] != ';') {
84 Index++;
85 }
86
87 CopyMem (Lang, StringPtr, Index);
88 Lang[Index] = 0;
89
90 if (StringPtr[Index] == ';') {
91 Index++;
92 }
93
94 *LangCode = StringPtr + Index;
95}
96
110 )
111{
112 CHAR8 *LangCode;
113 CHAR8 *Lang;
114 UINTN Index;
115 EFI_STATUS Status;
116
117 //
118 // Allocate working buffer for RFC 4646 language in supported LanguageString.
119 //
120 Lang = AllocatePool (AsciiStrSize (gLanguageString));
121 ASSERT (Lang != NULL);
122
123 Index = 0;
124 LangCode = gLanguageString;
125 while (*LangCode != 0) {
126 GetNextLanguage (&LangCode, Lang);
127
128 if (Index == Value->u8) {
129 gCurrentLanguageIndex = Value->u8;
130 break;
131 }
132
133 Index++;
134 }
135
136 if (Index == Value->u8) {
137 Status = gRT->SetVariable (
138 L"PlatformLang",
139 &gEfiGlobalVariableGuid,
140 EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
141 AsciiStrSize (Lang),
142 Lang
143 );
144 if (EFI_ERROR (Status)) {
145 FreePool (Lang);
146 return EFI_DEVICE_ERROR;
147 }
148 } else {
149 ASSERT (FALSE);
150 }
151
152 FreePool (Lang);
153
154 return EFI_SUCCESS;
155}
156
174BOOLEAN
176 IN EFI_HII_HANDLE HiiHandle,
177 IN EFI_BROWSER_ACTION Action,
178 IN EFI_QUESTION_ID QuestionId,
179 IN UINT8 Type,
180 IN EFI_IFR_TYPE_VALUE *Value,
181 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest,
182 OUT EFI_STATUS *Status
183 )
184{
185 if ((QuestionId != FRONT_PAGE_KEY_CONTINUE) &&
186 (QuestionId != FRONT_PAGE_KEY_RESET) &&
187 (QuestionId != FRONT_PAGE_KEY_LANGUAGE))
188 {
189 return FALSE;
190 }
191
192 if (Action == EFI_BROWSER_ACTION_RETRIEVE) {
193 if (QuestionId == FRONT_PAGE_KEY_LANGUAGE) {
194 Value->u8 = gCurrentLanguageIndex;
195 *Status = EFI_SUCCESS;
196 } else {
197 *Status = EFI_UNSUPPORTED;
198 }
199
200 return TRUE;
201 }
202
203 if (Action != EFI_BROWSER_ACTION_CHANGED) {
204 //
205 // Do nothing for other UEFI Action. Only do call back when data is changed.
206 //
207 *Status = EFI_UNSUPPORTED;
208 return TRUE;
209 }
210
211 if (Action == EFI_BROWSER_ACTION_CHANGED) {
212 if ((Value == NULL) || (ActionRequest == NULL)) {
213 *Status = EFI_INVALID_PARAMETER;
214 return TRUE;
215 }
216
217 *Status = EFI_SUCCESS;
218 switch (QuestionId) {
219 case FRONT_PAGE_KEY_CONTINUE:
220 //
221 // This is the continue - clear the screen and return an error to get out of FrontPage loop
222 //
223 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
224 break;
225
226 case FRONT_PAGE_KEY_LANGUAGE:
227 *Status = LanguageChangeHandler (Value);
228 break;
229
230 case FRONT_PAGE_KEY_RESET:
231 //
232 // Reset
233 //
234 gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);
235 *Status = EFI_UNSUPPORTED;
236
237 default:
238 break;
239 }
240 }
241
242 return TRUE;
243}
244
252VOID
254 IN EFI_HII_HANDLE HiiHandle,
255 IN VOID *StartOpCodeHandle
256 )
257{
258 CHAR8 *LangCode;
259 CHAR8 *Lang;
260 UINTN LangSize;
261 CHAR8 *CurrentLang;
262 UINTN OptionCount;
263 CHAR16 *StringBuffer;
264 VOID *OptionsOpCodeHandle;
265 UINTN StringSize;
266 EFI_STATUS Status;
267 EFI_HII_STRING_PROTOCOL *HiiString;
268
269 Lang = NULL;
270 StringBuffer = NULL;
271
272 //
273 // Init OpCode Handle and Allocate space for creation of UpdateData Buffer
274 //
275 OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();
276 ASSERT (OptionsOpCodeHandle != NULL);
277
278 GetEfiGlobalVariable2 (L"PlatformLang", (VOID **)&CurrentLang, NULL);
279
280 //
281 // Get Support language list from variable.
282 //
283 GetEfiGlobalVariable2 (L"PlatformLangCodes", (VOID **)&gLanguageString, NULL);
284 if (gLanguageString == NULL) {
285 gLanguageString = AllocateCopyPool (
286 AsciiStrSize ((CHAR8 *)PcdGetPtr (PcdUefiVariableDefaultPlatformLangCodes)),
287 (CHAR8 *)PcdGetPtr (PcdUefiVariableDefaultPlatformLangCodes)
288 );
289 ASSERT (gLanguageString != NULL);
290 }
291
292 if (gLanguageToken == NULL) {
293 //
294 // Count the language list number.
295 //
296 LangCode = gLanguageString;
297 Lang = AllocatePool (AsciiStrSize (gLanguageString));
298 ASSERT (Lang != NULL);
299
300 OptionCount = 0;
301 while (*LangCode != 0) {
302 GetNextLanguage (&LangCode, Lang);
303 OptionCount++;
304 }
305
306 //
307 // Allocate extra 1 as the end tag.
308 //
309 gLanguageToken = AllocateZeroPool ((OptionCount + 1) * sizeof (EFI_STRING_ID));
310 ASSERT (gLanguageToken != NULL);
311
312 Status = gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, (VOID **)&HiiString);
313 ASSERT_EFI_ERROR (Status);
314
315 LangCode = gLanguageString;
316 OptionCount = 0;
317 while (*LangCode != 0) {
318 GetNextLanguage (&LangCode, Lang);
319
320 StringSize = 0;
321 Status = HiiString->GetString (HiiString, Lang, HiiHandle, PRINTABLE_LANGUAGE_NAME_STRING_ID, StringBuffer, &StringSize, NULL);
322 if (Status == EFI_BUFFER_TOO_SMALL) {
323 StringBuffer = AllocateZeroPool (StringSize);
324 ASSERT (StringBuffer != NULL);
325 Status = HiiString->GetString (HiiString, Lang, HiiHandle, PRINTABLE_LANGUAGE_NAME_STRING_ID, StringBuffer, &StringSize, NULL);
326 ASSERT_EFI_ERROR (Status);
327 }
328
329 if (EFI_ERROR (Status)) {
330 LangSize = AsciiStrSize (Lang);
331 StringBuffer = AllocatePool (LangSize * sizeof (CHAR16));
332 ASSERT (StringBuffer != NULL);
333 AsciiStrToUnicodeStrS (Lang, StringBuffer, LangSize);
334 }
335
336 ASSERT (StringBuffer != NULL);
337 gLanguageToken[OptionCount] = HiiSetString (HiiHandle, 0, StringBuffer, NULL);
338 FreePool (StringBuffer);
339
340 OptionCount++;
341 }
342 }
343
344 ASSERT (gLanguageToken != NULL);
345 LangCode = gLanguageString;
346 OptionCount = 0;
347 if (Lang == NULL) {
348 Lang = AllocatePool (AsciiStrSize (gLanguageString));
349 ASSERT (Lang != NULL);
350 }
351
352 while (*LangCode != 0) {
353 GetNextLanguage (&LangCode, Lang);
354
355 if ((CurrentLang != NULL) && (AsciiStrCmp (Lang, CurrentLang) == 0)) {
357 OptionsOpCodeHandle,
358 gLanguageToken[OptionCount],
359 EFI_IFR_OPTION_DEFAULT,
360 EFI_IFR_NUMERIC_SIZE_1,
361 (UINT8)OptionCount
362 );
363 gCurrentLanguageIndex = (UINT8)OptionCount;
364 } else {
366 OptionsOpCodeHandle,
367 gLanguageToken[OptionCount],
368 0,
369 EFI_IFR_NUMERIC_SIZE_1,
370 (UINT8)OptionCount
371 );
372 }
373
374 OptionCount++;
375 }
376
377 if (CurrentLang != NULL) {
378 FreePool (CurrentLang);
379 }
380
381 FreePool (Lang);
382
384 StartOpCodeHandle,
385 FRONT_PAGE_KEY_LANGUAGE,
386 0,
387 0,
388 STRING_TOKEN (STR_LANGUAGE_SELECT),
389 STRING_TOKEN (STR_LANGUAGE_SELECT_HELP),
390 EFI_IFR_FLAG_CALLBACK,
391 EFI_IFR_NUMERIC_SIZE_1,
392 OptionsOpCodeHandle,
393 NULL
394 );
395}
396
404VOID
406 IN EFI_HII_HANDLE HiiHandle,
407 IN VOID *StartOpCodeHandle
408 )
409{
411 StartOpCodeHandle,
412 FRONT_PAGE_KEY_CONTINUE,
413 STRING_TOKEN (STR_CONTINUE_PROMPT),
414 STRING_TOKEN (STR_CONTINUE_PROMPT),
415 EFI_IFR_FLAG_CALLBACK,
416 0
417 );
418}
419
427VOID
429 IN EFI_HII_HANDLE HiiHandle,
430 IN VOID *StartOpCodeHandle
431 )
432{
433 HiiCreateSubTitleOpCode (StartOpCodeHandle, STRING_TOKEN (STR_NULL_STRING), 0, 0, 0);
434}
435
443VOID
445 IN EFI_HII_HANDLE HiiHandle,
446 IN VOID *StartOpCodeHandle
447 )
448{
450 StartOpCodeHandle,
451 FRONT_PAGE_KEY_RESET,
452 STRING_TOKEN (STR_RESET_STRING),
453 STRING_TOKEN (STR_RESET_STRING),
454 EFI_IFR_FLAG_CALLBACK,
455 0
456 );
457}
458
468CHAR16 *
470 IN EFI_HII_HANDLE Handle
471 )
472{
473 EFI_STATUS Status;
474 EFI_HANDLE DriverHandle;
475
476 ASSERT (Handle != NULL);
477
478 if (Handle == NULL) {
479 return NULL;
480 }
481
482 Status = gHiiDatabase->GetPackageListHandle (gHiiDatabase, Handle, &DriverHandle);
483 if (EFI_ERROR (Status)) {
484 return NULL;
485 }
486
488}
489
502BOOLEAN
504 IN EFI_HII_HANDLE HiiHandle,
505 IN EFI_GUID *Guid,
506 OUT EFI_STRING_ID *PromptId,
507 OUT EFI_STRING_ID *HelpId,
508 OUT VOID *FormsetGuid
509 )
510{
511 EFI_STATUS Status;
512 UINT8 ClassGuidNum;
513 EFI_GUID *ClassGuid;
514 EFI_IFR_FORM_SET *Buffer;
515 UINTN BufferSize;
516 UINT8 *Ptr;
517 UINTN TempSize;
518 BOOLEAN RetVal;
519
520 Status = HiiGetFormSetFromHiiHandle (HiiHandle, &Buffer, &BufferSize);
521 if (EFI_ERROR (Status)) {
522 return FALSE;
523 }
524
525 RetVal = FALSE;
526 TempSize = 0;
527 Ptr = (UINT8 *)Buffer;
528 while (TempSize < BufferSize) {
529 TempSize += ((EFI_IFR_OP_HEADER *)Ptr)->Length;
530
531 if (((EFI_IFR_OP_HEADER *)Ptr)->Length <= OFFSET_OF (EFI_IFR_FORM_SET, Flags)) {
532 Ptr += ((EFI_IFR_OP_HEADER *)Ptr)->Length;
533 continue;
534 }
535
536 ClassGuidNum = (UINT8)(((EFI_IFR_FORM_SET *)Ptr)->Flags & 0x3);
537 ClassGuid = (EFI_GUID *)(VOID *)(Ptr + sizeof (EFI_IFR_FORM_SET));
538 while (ClassGuidNum-- > 0) {
539 if (!CompareGuid (Guid, ClassGuid)) {
540 ClassGuid++;
541 continue;
542 }
543
544 *PromptId = ((EFI_IFR_FORM_SET *)Ptr)->FormSetTitle;
545 *HelpId = ((EFI_IFR_FORM_SET *)Ptr)->Help;
546 CopyMem (FormsetGuid, &((EFI_IFR_FORM_SET *)Ptr)->Guid, sizeof (EFI_GUID));
547 RetVal = TRUE;
548 }
549 }
550
551 FreePool (Buffer);
552
553 return RetVal;
554}
555
570 IN EFI_HII_HANDLE HiiHandle,
571 IN EFI_GUID *ClassGuid,
572 IN DRIVER_SPECIAL_HANDLER SpecialHandlerFn,
573 IN VOID *StartOpCodeHandle
574 )
575{
576 UINTN Index;
577 EFI_STRING String;
578 EFI_STRING_ID Token;
579 EFI_STRING_ID TokenHelp;
580 EFI_HII_HANDLE *HiiHandles;
581 CHAR16 *DevicePathStr;
582 UINTN Count;
583 UINTN CurrentSize;
584 UI_HII_DRIVER_INSTANCE *DriverListPtr;
585 EFI_STRING NewName;
586 BOOLEAN EmptyLineAfter;
587
588 if (gHiiDriverList != NULL) {
589 FreePool (gHiiDriverList);
590 }
591
592 HiiHandles = HiiGetHiiHandles (NULL);
593 ASSERT (HiiHandles != NULL);
594
595 gHiiDriverList = AllocateZeroPool (UI_HII_DRIVER_LIST_SIZE * sizeof (UI_HII_DRIVER_INSTANCE));
596 ASSERT (gHiiDriverList != NULL);
597 DriverListPtr = gHiiDriverList;
598 CurrentSize = UI_HII_DRIVER_LIST_SIZE;
599
600 for (Index = 0, Count = 0; HiiHandles[Index] != NULL; Index++) {
601 if (!RequiredDriver (HiiHandles[Index], ClassGuid, &Token, &TokenHelp, &gHiiDriverList[Count].FormSetGuid)) {
602 continue;
603 }
604
605 String = HiiGetString (HiiHandles[Index], Token, NULL);
606 if (String == NULL) {
607 String = HiiGetString (gStringPackHandle, STRING_TOKEN (STR_MISSING_STRING), NULL);
608 ASSERT (String != NULL);
609 } else if (SpecialHandlerFn != NULL) {
610 //
611 // Check whether need to rename the driver name.
612 //
613 EmptyLineAfter = FALSE;
614 if (SpecialHandlerFn (String, &NewName, &EmptyLineAfter)) {
615 FreePool (String);
616 String = NewName;
617 DriverListPtr[Count].EmptyLineAfter = EmptyLineAfter;
618 }
619 }
620
621 DriverListPtr[Count].PromptId = HiiSetString (HiiHandle, 0, String, NULL);
622 FreePool (String);
623
624 String = HiiGetString (HiiHandles[Index], TokenHelp, NULL);
625 if (String == NULL) {
626 String = HiiGetString (gStringPackHandle, STRING_TOKEN (STR_MISSING_STRING), NULL);
627 ASSERT (String != NULL);
628 }
629
630 DriverListPtr[Count].HelpId = HiiSetString (HiiHandle, 0, String, NULL);
631 FreePool (String);
632
633 DevicePathStr = ExtractDevicePathFromHiiHandle (HiiHandles[Index]);
634 if (DevicePathStr != NULL) {
635 DriverListPtr[Count].DevicePathId = HiiSetString (HiiHandle, 0, DevicePathStr, NULL);
636 FreePool (DevicePathStr);
637 } else {
638 DriverListPtr[Count].DevicePathId = 0;
639 }
640
641 Count++;
642 if (Count >= CurrentSize) {
643 DriverListPtr = ReallocatePool (
644 CurrentSize * sizeof (UI_HII_DRIVER_INSTANCE),
645 (Count + UI_HII_DRIVER_LIST_SIZE)
646 * sizeof (UI_HII_DRIVER_INSTANCE),
647 gHiiDriverList
648 );
649 ASSERT (DriverListPtr != NULL);
650 gHiiDriverList = DriverListPtr;
651 CurrentSize += UI_HII_DRIVER_LIST_SIZE;
652 }
653 }
654
655 FreePool (HiiHandles);
656
657 Index = 0;
658 while (gHiiDriverList[Index].PromptId != 0) {
660 StartOpCodeHandle,
661 0,
662 gHiiDriverList[Index].PromptId,
663 gHiiDriverList[Index].HelpId,
664 0,
665 (EFI_QUESTION_ID)(Index + FRONT_PAGE_KEY_DRIVER),
666 0,
667 &gHiiDriverList[Index].FormSetGuid,
668 gHiiDriverList[Index].DevicePathId
669 );
670
671 if (gHiiDriverList[Index].EmptyLineAfter) {
672 UiCreateEmptyLine (HiiHandle, StartOpCodeHandle);
673 }
674
675 Index++;
676 }
677
678 return EFI_SUCCESS;
679}
UINT64 UINTN
INTN EFIAPI AsciiStrCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString)
Definition: String.c:716
RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS(IN CONST CHAR8 *Source, OUT CHAR16 *Destination, IN UINTN DestMax)
Definition: SafeString.c:2873
UINTN EFIAPI AsciiStrSize(IN CONST CHAR8 *String)
Definition: String.c:681
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
Definition: MemLibGuid.c:73
EFI_DEVICE_PATH_PROTOCOL *EFIAPI DevicePathFromHandle(IN EFI_HANDLE Handle)
CHAR16 *EFIAPI ConvertDevicePathToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID *EFIAPI ReallocatePool(IN UINTN OldSize, IN UINTN NewSize, IN VOID *OldBuffer OPTIONAL)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
CHAR16 * ExtractDevicePathFromHiiHandle(IN EFI_HII_HANDLE Handle)
VOID GetNextLanguage(IN OUT CHAR8 **LangCode, OUT CHAR8 *Lang)
EFI_STATUS LanguageChangeHandler(IN EFI_IFR_TYPE_VALUE *Value)
EFI_STATUS UiListThirdPartyDrivers(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *ClassGuid, IN DRIVER_SPECIAL_HANDLER SpecialHandlerFn, IN VOID *StartOpCodeHandle)
VOID UiCreateResetMenu(IN EFI_HII_HANDLE HiiHandle, IN VOID *StartOpCodeHandle)
VOID UiCreateEmptyLine(IN EFI_HII_HANDLE HiiHandle, IN VOID *StartOpCodeHandle)
VOID UiCreateLanguageMenu(IN EFI_HII_HANDLE HiiHandle, IN VOID *StartOpCodeHandle)
BOOLEAN RequiredDriver(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *Guid, OUT EFI_STRING_ID *PromptId, OUT EFI_STRING_ID *HelpId, OUT VOID *FormsetGuid)
BOOLEAN UiSupportLibCallbackHandler(IN EFI_HII_HANDLE HiiHandle, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID QuestionId, IN UINT8 Type, IN EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest, OUT EFI_STATUS *Status)
VOID UiCreateContinueMenu(IN EFI_HII_HANDLE HiiHandle, IN VOID *StartOpCodeHandle)
BOOLEAN(EFIAPI * DRIVER_SPECIAL_HANDLER)(IN CHAR16 *DriverName, OUT CHAR16 **NewName, OUT BOOLEAN *EmptyLineAfter)
UINT8 *EFIAPI HiiCreateSubTitleOpCode(IN VOID *OpCodeHandle, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 Flags, IN UINT8 Scope)
Definition: HiiLib.c:3504
VOID *EFIAPI HiiAllocateOpCodeHandle(VOID)
Definition: HiiLib.c:3051
EFI_HII_HANDLE *EFIAPI HiiGetHiiHandles(IN CONST EFI_GUID *PackageListGuid OPTIONAL)
Definition: HiiLib.c:286
EFI_STRING EFIAPI HiiGetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL)
Definition: HiiString.c:211
UINT8 *EFIAPI HiiCreateOneOfOptionOpCode(IN VOID *OpCodeHandle, IN UINT16 StringId, IN UINT8 Flags, IN UINT8 Type, IN UINT64 Value)
Definition: HiiLib.c:3329
UINT8 *EFIAPI HiiCreateOneOfOpCode(IN VOID *OpCodeHandle, IN EFI_QUESTION_ID QuestionId, IN EFI_VARSTORE_ID VarStoreId, IN UINT16 VarOffset, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN UINT8 OneOfFlags, IN VOID *OptionsOpCodeHandle, IN VOID *DefaultsOpCodeHandle OPTIONAL)
Definition: HiiLib.c:3908
EFI_STRING_ID EFIAPI HiiSetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId OPTIONAL, IN CONST EFI_STRING String, IN CONST CHAR8 *SupportedLanguages OPTIONAL)
Definition: HiiString.c:52
UINT8 *EFIAPI HiiCreateGotoExOpCode(IN VOID *OpCodeHandle, IN EFI_FORM_ID RefFormId, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN EFI_QUESTION_ID QuestionId, IN EFI_QUESTION_ID RefQuestionId, IN EFI_GUID *RefFormSetId OPTIONAL, IN EFI_STRING_ID RefDevicePath)
Definition: HiiLib.c:3605
UINT8 *EFIAPI HiiCreateActionOpCode(IN VOID *OpCodeHandle, IN EFI_QUESTION_ID QuestionId, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN EFI_STRING_ID QuestionConfig)
Definition: HiiLib.c:3461
EFI_STATUS EFIAPI HiiGetFormSetFromHiiHandle(IN EFI_HII_HANDLE Handle, OUT EFI_IFR_FORM_SET **Buffer, OUT UINTN *BufferSize)
Definition: HiiLib.c:394
EFI_RUNTIME_SERVICES * gRT
#define NULL
Definition: Base.h:319
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OFFSET_OF(TYPE, Field)
Definition: Base.h:758
#define OUT
Definition: Base.h:284
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
#define PcdGetPtr(TokenName)
Definition: PcdLib.h:388
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_BOOT_SERVICES * gBS
EFI_HII_DATABASE_PROTOCOL * gHiiDatabase
#define STRING_TOKEN(t)
VOID * EFI_HII_HANDLE
EFI_STATUS EFIAPI GetEfiGlobalVariable2(IN CONST CHAR16 *Name, OUT VOID **Value, OUT UINTN *Size OPTIONAL)
Definition: UefiLib.c:1470
@ EfiResetCold
#define EFI_VARIABLE_NON_VOLATILE
Definition: Base.h:213