X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FDriverSampleDxe%2FVfr.vfr;h=d005e7feedb533242c5565669b198170b33b4820;hp=71a4c910572d18321413ea3e44ab595bd9d1b6e3;hb=d1102dba7210b95e41d06c2338a22ba6af248645;hpb=d91c7bf9e42e8be23bb67bf7c189348b4ec11797 diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr index 71a4c91057..d005e7feed 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -2,8 +2,8 @@ // // Sample Setup formset. // -// Copyright (c) 2004 - 2008, Intel Corporation.
-// All rights reserved. This program and the accompanying materials +// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php @@ -14,6 +14,7 @@ //**/ +#include #include "NVDataStruc.h" // @@ -35,13 +36,11 @@ #define EFI_FRONT_PAGE_SUBCLASS 0x02 #define EFI_SINGLE_USE_SUBCLASS 0x03 -// -// EFI Variable attributes -// -#define EFI_VARIABLE_NON_VOLATILE 0x00000001 -#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 -#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 -#define EFI_VARIABLE_READ_ONLY 0x00000008 +#define EFI_USER_INFO_ACCESS_SETUP_ADMIN_GUID \ + { 0x85b75607, 0xf7ce, 0x471e, { 0xb7, 0xe4, 0x2a, 0xea, 0x5f, 0x72, 0x32, 0xee } } + +#define PERL_GUID \ + { 0x63E60A51, 0x497D, 0xD427, {0xC4, 0xA5, 0xB8, 0xAB, 0xDC, 0x3A, 0xAE, 0xB6 }} // // Labels definition @@ -51,43 +50,57 @@ #define LABEL_UPDATE_BBS 0x2222 formset - guid = FORMSET_GUID, + guid = DRIVER_SAMPLE_FORMSET_GUID, title = STRING_TOKEN(STR_FORM_SET_TITLE), help = STRING_TOKEN(STR_FORM_SET_TITLE_HELP), classguid = EFI_HII_PLATFORM_SETUP_FORMSET_GUID, - + // - // Notes: VfrCompiler will insert a Standard Default Storage declaration + // Notes: VfrCompiler will insert a Standard Default Storage declaration // after the formset declaration. >00000040: 5C 06 00 00 00 00. // So we don't need to declare the Standard Default. // Please check the vfr.lst file for details. // To enable list file for VFR, add "-l" to VfrCompile in [Build.Visual-Form-Representation-File] as follows: // VfrCompile -l --no-pre-processing --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii // - + // // Define a Buffer Storage (EFI_IFR_VARSTORE) // varstore DRIVER_SAMPLE_CONFIGURATION, // This is the data structure type varid = CONFIGURATION_VARSTORE_ID, // Optional VarStore ID name = MyIfrNVData, // Define referenced name in vfr - guid = FORMSET_GUID; // GUID of this buffer storage + guid = DRIVER_SAMPLE_FORMSET_GUID; // GUID of this buffer storage // - // Define another Buffer Storage + // Define a EFI variable Storage (EFI_IFR_VARSTORE_EFI) // - varstore MY_DATA2, - name = MyIfrNVData2, - guid = FORMSET_GUID; + efivarstore MY_EFI_VARSTORE_DATA, + attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, // EFI variable attribures + name = MyEfiVar, + guid = DRIVER_SAMPLE_FORMSET_GUID; // - // Define a EFI variable Storage (EFI_IFR_VARSTORE_EFI) + // Define a Buffer Storage (EFI_IFR_VARSTORE) + // + efivarstore MY_EFI_BITS_VARSTORE_DATA, // This is the data structure type + attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, // EFI variable attribures + name = MyEfiBitVar, // Define referenced name in vfr + guid = DRIVER_SAMPLE_FORMSET_GUID; // GUID of this buffer storage + + efivarstore MY_EFI_UNION_DATA, + attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, // EFI variable attribures + name = MyEfiUnionVar, + guid = DRIVER_SAMPLE_FORMSET_GUID; + + // + // Define a Name/Value Storage (EFI_IFR_VARSTORE_NAME_VALUE) // - efivarstore MyEfiVar, // Define referenced name in vfr - attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS, // EFI variable attribures - name = STRING_TOKEN(STR_VAR_NAME), // EFI variable name - varsize = 1, // Size of the EFI variable - guid = FORMSET_GUID; // EFI variable GUID + namevaluevarstore MyNameValueVar, // Define storage reference name in vfr + name = STRING_TOKEN(STR_NAME_VALUE_VAR_NAME0), // Define Name list of this storage, refer it by MyNameValueVar[0] + name = STRING_TOKEN(STR_NAME_VALUE_VAR_NAME1), // Define Name list of this storage, refer it by MyNameValueVar[1] + name = STRING_TOKEN(STR_NAME_VALUE_VAR_NAME2), // Define Name list of this storage, refer it by MyNameValueVar[2] + guid = DRIVER_SAMPLE_FORMSET_GUID; // GUID of this Name/Value storage defaultstore MyStandardDefault, prompt = STRING_TOKEN(STR_STANDARD_DEFAULT_PROMPT), @@ -121,17 +134,26 @@ formset text help = STRING_TOKEN(STR_EXIT_TEXT), text = STRING_TOKEN(STR_EXIT_TEXT), - text = STRING_TOKEN(STR_EXIT_TEXT), flags = INTERACTIVE, // VfrCompiler will generate opcode EFI_IFR_ACTION for Text marked as INTERACTIVE key = 0x1237; text help = STRING_TOKEN(STR_SAVE_TEXT), text = STRING_TOKEN(STR_SAVE_TEXT), - text = STRING_TOKEN(STR_SAVE_TEXT), flags = INTERACTIVE, key = 0x1238; + text + help = STRING_TOKEN(STR_SAVE_CURRENT), + text = STRING_TOKEN(STR_SAVE_CURRENT), + flags = INTERACTIVE, + key = 0x1243; + + text + help = STRING_TOKEN(STR_DISCARD_CURRENT_AND_EXIT), + text = STRING_TOKEN(STR_DISCARD_CURRENT_AND_EXIT), + flags = INTERACTIVE, + key = 0x1244; // // Define oneof (EFI_IFR_ONE_OF) // @@ -153,8 +175,9 @@ formset oneof varid = MyIfrNVData.BootOrderLarge, prompt = STRING_TOKEN(STR_ONE_OF_PROMPT), help = STRING_TOKEN(STR_ONE_OF_HELP), + default value = cond (pushthis == 0 ? 0 : cond ((questionref(MyOneOf) >> 0x4 & 0xF00) == 0x0 + 0x2 ? 0 : 1)), option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0x0, flags = 0; - option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 0x1, flags = DEFAULT; + option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 0x1, flags = 0; endoneof; grayoutif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x1; @@ -168,11 +191,10 @@ formset // CHECKBOX_DEFAULT_MFG indicate EFI_IFR_CHECKBOX_DEFAULT_MFG. // flags = CHECKBOX_DEFAULT | CHECKBOX_DEFAULT_MFG, - key = 0, - default = 1, + default = TRUE, endcheckbox; endif; - endif; + endif; // // Ordered list: @@ -193,12 +215,13 @@ formset varid = MyIfrNVData.BootOrder, prompt = STRING_TOKEN(STR_BOOT_OPTIONS), help = STRING_TOKEN(STR_NULL_STRING), - option text = STRING_TOKEN(STR_BOOT_OPTION2), value = 2, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_BOOT_OPTION1), value = 1, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_BOOT_OPTION3), value = 3, flags = RESET_REQUIRED; + flags = RESET_REQUIRED, + option text = STRING_TOKEN(STR_BOOT_OPTION2), value = 2, flags = 0; + option text = STRING_TOKEN(STR_BOOT_OPTION1), value = 1, flags = 0; + option text = STRING_TOKEN(STR_BOOT_OPTION3), value = 3, flags = 0; suppressif ideqval MyIfrNVData.BootOrderLarge == 0; - option text = STRING_TOKEN(STR_BOOT_OPTION4), value = 4, flags = RESET_REQUIRED; - endif + option text = STRING_TOKEN(STR_BOOT_OPTION4), value = 4, flags = 0; + endif; endlist; // @@ -208,14 +231,16 @@ formset endif; // end suppressif - suppressif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x2; + disableif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x2; orderedlist varid = MyIfrNVData.OrderedList, prompt = STRING_TOKEN(STR_TEST_OPCODE), help = STRING_TOKEN(STR_TEXT_HELP), - option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 3, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 2, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 1, flags = RESET_REQUIRED; + flags = RESET_REQUIRED, + option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 3, flags = 0; + option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 2, flags = 0; + option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 1, flags = 0; + default = {1,2,3}, endlist; endif; @@ -239,30 +264,35 @@ formset oneof varid = MyIfrNVData.TestLateCheck, prompt = STRING_TOKEN(STR_TEST_OPCODE), help = STRING_TOKEN(STR_ONE_OF_HELP), - option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = DEFAULT | RESET_REQUIRED; + flags = RESET_REQUIRED, + option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = 0; + option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = DEFAULT; + warningif prompt = STRING_TOKEN(STR_WARNING_POPUP), timeout = 5, + ideqval MyIfrNVData.TestLateCheck == 0 + endif; endoneof; oneof varid = MyIfrNVData.TestLateCheck2, prompt = STRING_TOKEN(STR_TEST_OPCODE2), help = STRING_TOKEN(STR_ONE_OF_HELP), - option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = DEFAULT | RESET_REQUIRED; - option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = RESET_REQUIRED; + flags = RESET_REQUIRED, + option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = DEFAULT; + option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = 0; inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), ideqid MyIfrNVData.TestLateCheck == MyIfrNVData.TestLateCheck2 - endif + endif; endoneof; oneof varid = MyIfrNVData.QuestionAboutTreeHugging, - prompt = STRING_TOKEN(STR_ONE_OF_PROMPT), + prompt = STRING_TOKEN(STR_ONE_OF_PROMPT_KEYWORD), help = STRING_TOKEN(STR_ONE_OF_HELP), - option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = RESET_REQUIRED; - option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = DEFAULT | RESET_REQUIRED; - option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 0x03, flags = RESET_REQUIRED; - + flags = RESET_REQUIRED, + option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = 0; + option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = DEFAULT; + option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 3, flags = 0; endoneof; // @@ -275,6 +305,9 @@ formset key = 0x1236, minsize = 6, maxsize = 40, + inconsistentif prompt = STRING_TOKEN(STR_STRING_CHECK_ERROR_POPUP), + pushthis != stringref(STRING_TOKEN(STR_STRING_CHECK)) + endif; endstring; // @@ -299,28 +332,77 @@ formset minimum = 0, maximum = 0xf0, step = 0, - default = 21, + default value = questionrefval(devicepath = STRING_TOKEN (STR_DEVICE_PATH), guid = DRIVER_SAMPLE_FORMSET_GUID, 0x1111), inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), ideqval MyIfrNVData.HowOldAreYouInYearsManual == 99 OR - ideqid MyIfrNVData.HowOldAreYouInYearsManual == MyEfiVar + ideqid MyIfrNVData.HowOldAreYouInYearsManual == MyEfiVar.Field8 OR ideqvallist MyIfrNVData.HowOldAreYouInYearsManual == 1 3 5 7 - endif + endif; endnumeric; - numeric varid = MyEfiVar, // Reference of EFI variable storage + numeric varid = MyEfiVar.Field8, // Reference of EFI variable storage + questionid = 0x1111, prompt = STRING_TOKEN(STR_TALL_HEX_PROMPT), help = STRING_TOKEN(STR_NUMERIC_HELP1), - flags = DISPLAY_UINT_HEX, // Display in HEX format (if not specified, default is in decimal format) + flags = DISPLAY_UINT_HEX | INTERACTIVE, // Display in HEX format (if not specified, default is in decimal format) minimum = 0, maximum = 250, - default = 175, + default = 18, defaultstore = MyStandardDefault, // This is standard default value + default = 19, defaultstore = MyManufactureDefault, // This is manufacture default value + + endnumeric; + // + // Define numeric using Name/Value Storage + // + numeric varid = MyNameValueVar[0], // This numeric take NameValueVar0 as storage + prompt = STRING_TOKEN(STR_NAME_VALUE_VAR_NAME0), + help = STRING_TOKEN(STR_NAME_VALUE_VAR_NAME0_HELP), + // + // Size should be defined for numeric when use Name/Value storage + // Valid value for numerice size are: NUMERIC_SIZE_1, NUMERIC_SIZE_2, NUMERIC_SIZE_4 and NUMERIC_SIZE_8 + // + flags = NUMERIC_SIZE_1, // Size of this numeric is 1 byte + minimum = 0, + maximum = 0xff, + step = 0, + locked, + default = 16, defaultstore = MyStandardDefault, // This is standard default value + default = 17, defaultstore = MyManufactureDefault, // This is manufacture default value endnumeric; + numeric varid = MyNameValueVar[1], // This numeric take NameValueVar1 as storage + prompt = STRING_TOKEN(STR_NAME_VALUE_VAR_NAME1), + help = STRING_TOKEN(STR_NAME_VALUE_VAR_NAME1_HELP), + flags = NUMERIC_SIZE_2, // Size of this numeric is 2 bytes + minimum = 0, + maximum = 0xffff, + step = 0, + default = 18, defaultstore = MyStandardDefault, // This is standard default value + default = 19, defaultstore = MyManufactureDefault, // This is manufacture default value + endnumeric; + + // + // Define string using Name/Value Storage + // + string varid = MyNameValueVar[2], // This string take NameValueVar2 as storage + prompt = STRING_TOKEN(STR_NAME_VALUE_VAR_NAME2), + help = STRING_TOKEN(STR_NAME_VALUE_VAR_NAME2_HELP), + minsize = 2, + maxsize = 0x14, + endstring; + + oneof varid = MyEfiVar.Field16, + prompt = STRING_TOKEN(STR_ONE_OF_PROMPT), + help = STRING_TOKEN(STR_NUMERIC_NUM_HELP), + option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0x0, flags = 0; + option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 0x1, flags = DEFAULT; + endoneof; + label LABEL_1_VALUE; label LABEL_2_VALUE; @@ -333,16 +415,49 @@ formset step = 1, default = 18, defaultstore = MyStandardDefault, // This is standard default value default = 19, defaultstore = MyManufactureDefault, // This is manufacture default value - + endnumeric; endif; - + + numeric varid = MyIfrNVData.GetDefaultValueFromAccess, + questionid = 0x1239, + prompt = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_ACCESS_PROMPT), + help = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_ACCESS_HELP), + flags = DISPLAY_UINT_HEX | INTERACTIVE, + minimum = 0, + maximum = 255, + step = 1, + default = 18, + endnumeric; + + numeric varid = MyIfrNVData.GetDefaultValueFromCallBack, + questionid = 0x1240, + prompt = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_CALLBACK_PROMPT), + help = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_CALLBACK_HELP), + flags = DISPLAY_UINT_HEX | INTERACTIVE, + minimum = 0, + maximum = 255, + step = 1, + default = 18, + endnumeric; + + orderedlist + varid = MyIfrNVData.GetDefaultValueFromCallBackForOrderedList, + questionid = 0x1252, + prompt = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_CALLBACK_PROMPT), + help = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_CALLBACK_HELP), + flags = INTERACTIVE, + option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 1, flags = 0; + option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 2, flags = 0; + option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 3, flags = 0; + endlist; + resetbutton defaultstore = MyStandardDefault, prompt = STRING_TOKEN(STR_STANDARD_DEFAULT_PROMPT), help = STRING_TOKEN(STR_STANDARD_DEFAULT_HELP), endresetbutton; - + resetbutton defaultstore = MyManufactureDefault, prompt = STRING_TOKEN(STR_MANUFACTURE_DEFAULT_PROMPT), @@ -350,33 +465,29 @@ formset endresetbutton; // - // Non-interactive password, validate by Setup Browser + // Sample use case for IFR Security op-code // - password varid = MyIfrNVData.WhatIsThePassword, - prompt = STRING_TOKEN(STR_PASSWORD_PROMPT), - help = STRING_TOKEN(STR_PASSWORD_HELP), - minsize = 6, - maxsize = 20, - endpassword; + grayoutif NOT security (EFI_USER_INFO_ACCESS_SETUP_ADMIN_GUID); + text + help = STRING_TOKEN(STR_TEXT_SECRUITY_TEST_HELP), + text = STRING_TOKEN(STR_TEXT_SECRUITY_TEST_TEXT); + endif; - string varid = MyIfrNVData.PasswordClearText, - prompt = STRING_TOKEN(STR_MY_STRING_PROMPT), - help = STRING_TOKEN(STR_MY_STRING_HELP), - minsize = 6, - maxsize = 0x14, - endstring; + numeric varid = MyEfiVar.SubmittedCallback, + questionid = 0x1250, + prompt = STRING_TOKEN(STR_SUBMITTED_CALLBACK_TEST_PROMPT), + help = STRING_TOKEN(STR_SUBMITTED_CALLBACK_TEST_HELP), + flags = INTERACTIVE, + minimum = 0, + maximum = 255, + default = 18, + endnumeric; - // - // Interactive password, validate via ConfigAccess.Callback() - // - password varid = MyIfrNVData.WhatIsThePassword2, - prompt = STRING_TOKEN(STR_PASSWORD_CALLBACK_PROMPT), - help = STRING_TOKEN(STR_PASSWORD_HELP), - flags = INTERACTIVE, - key = 0x2000, - minsize = 6, - maxsize = 20, - endpassword; + text + help = STRING_TOKEN(STR_POPUP_TEST_HELP), + text = STRING_TOKEN(STR_POPUP_TEST_PROMPT), + flags = INTERACTIVE, + key = 0x1330; goto 2, prompt = STRING_TOKEN(STR_GOTO_FORM2), //SecondSetupPage // this too has no end-op and basically it's a jump to a form ONLY @@ -386,116 +497,149 @@ formset prompt = STRING_TOKEN(STR_GOTO_FORM3), //ThirdSetupPage // this too has no end-op and basically it's a jump to a form ONLY help = STRING_TOKEN(STR_GOTO_HELP); + goto 4, + prompt = STRING_TOKEN(STR_GOTO_FORM4), //FourthSetupPage // this too has no end-op and basically it's a jump to a form ONLY + help = STRING_TOKEN(STR_GOTO_HELP); + + goto 5, + prompt = STRING_TOKEN(STR_GOTO_FORM5), //FifthSetupPage // this too has no end-op and basically it's a jump to a form ONLY + help = STRING_TOKEN(STR_GOTO_FORM5_HELP); + + goto 6, + prompt = STRING_TOKEN(STR_GOTO_FORM6), //SixthSetupPage // this too has no end-op and basically it's a jump to a form ONLY + help = STRING_TOKEN(STR_GOTO_HELP); + + goto + formsetguid = DRIVER_SAMPLE_INVENTORY_GUID, + formid = 0x1, + question = 0x1, + prompt = STRING_TOKEN(STR_GOTO_ANOTHER_FORMSET), + help = STRING_TOKEN(STR_GOTO_ANOTHER_FORMSET_HELP); + + guidop + guid = DRIVER_SAMPLE_FORMSET_GUID, + datatype = MY_EFI_VARSTORE_DATA, + data.Field8 = 0x21, + data.Field16 = 0x2121, + data.OrderedList[0] = 0x21, + endguidop; + + goto 7, + prompt = STRING_TOKEN(STR_GOTO_FORM7), + help = STRING_TOKEN(STR_GOTO_FORM7_HELP); + endform; - form formid = 2, // SecondSetupPage, - title = STRING_TOKEN(STR_FORM2_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code - - - date year varid = Date.Year, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_DATE_PROMPT), - help = STRING_TOKEN(STR_DATE_HELP), - minimum = 1998, - maximum = 2099, - step = 1, - default = 2004, - - month varid = Date.Month, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_DATE_PROMPT), - help = STRING_TOKEN(STR_DATE_HELP), - minimum = 1, - maximum = 12, - step = 1, - default = 1, - - day varid = Date.Day, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_DATE_PROMPT), - help = STRING_TOKEN(STR_DATE_HELP), - minimum = 1, - maximum = 31, - step = 0x1, - default = 1, + suppressif ideqval MyIfrNVData.BootOrderLarge == 0; + form formid = 2, // SecondSetupPage, + title = STRING_TOKEN(STR_FORM2_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code + + date + name = Date, + prompt = STRING_TOKEN(STR_DATE_PROMPT), + help = STRING_TOKEN(STR_DATE_HELP), + flags = STORAGE_TIME, + default = 2004/1/1, + + inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), + ideqval Date.Day == 31 + AND + ideqvallist Date.Month == 2 4 6 9 11 + endif; + + // + // If the day is 30 AND month is 2 + // + inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), + ideqval Date.Day == 30 + AND + ideqval Date.Month == 2 + endif; + + // + // If the day is 29 AND month is 2 AND it year is NOT a leapyear + // + inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), + ideqval Date.Day == 0x1D + AND + ideqval Date.Month == 2 + AND + NOT + ideqvallist Date.Year == 2004 2008 20012 20016 2020 2024 2028 2032 2036 + endif; + + enddate; - inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), - ideqval Date.Day == 31 - AND - ideqvallist Date.Month == 2 4 6 9 11 - endif + text + help = STRING_TOKEN(STR_SAVE_CURRENT_AND_EXIT), + text = STRING_TOKEN(STR_SAVE_CURRENT_AND_EXIT), + flags = INTERACTIVE, + key = 0x1241; - // - // If the day is 30 AND month is 2 - // - inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), - ideqval Date.Day == 30 - AND - ideqval Date.Month == 2 - endif + text + help = STRING_TOKEN(STR_DISCARD_CURRENT), + text = STRING_TOKEN(STR_DISCARD_CURRENT), + flags = INTERACTIVE, + key = 0x1242; + + time + prompt = STRING_TOKEN(STR_TIME_PROMPT), + help = STRING_TOKEN(STR_TIME_HELP), + flags = STORAGE_TIME, + endtime; + + time + name = MyTime, + varid = MyIfrNVData.Time, + prompt = STRING_TOKEN(STR_TIME_PROMPT), + help = STRING_TOKEN(STR_TIME_PROMPT), + flags = STORAGE_NORMAL | SECOND_SUPPRESS, + default = 15:33:33, + endtime; + + checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry, + prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT), + help = STRING_TOKEN(STR_CHECK_BOX_HELP), + flags = CHECKBOX_DEFAULT, + endcheckbox; + + text + help = STRING_TOKEN(STR_TEXT_HELP), + text = STRING_TOKEN(STR_TEXT_TEXT_1); + text + help = STRING_TOKEN(STR_TEXT_HELP), + text = STRING_TOKEN(STR_TEXT_TEXT_1), + text = STRING_TOKEN(STR_TEXT_TEXT_2); + + goto 1, + prompt = STRING_TOKEN(STR_GOTO_FORM1), //MainSetupPage // this too has no end-op and basically it's a jump to a form ONLY + help = STRING_TOKEN(STR_GOTO_HELP); + + goto + varid = MyIfrNVData.RefData, + prompt = STRING_TOKEN(STR_GOTO_DYNAMIC3), + help = STRING_TOKEN(STR_GOTO_DYNAMIC3_HELP), + flags = INTERACTIVE, + key = 0x1248, // - // If the day is 29 AND month is 2 AND it year is NOT a leapyear + // Set the defult value, format is QuestionId; FormId; FormsetGuid; Device Path String Token // - inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), - ideqval Date.Day == 0x1D - AND - ideqval Date.Month == 2 - AND - NOT - ideqvallist Date.Year == 2004 2008 20012 20016 2020 2024 2028 2032 2036 - endif - - enddate; - - time hour varid = Time.Hours, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_HELP), - minimum = 0, - maximum = 23, - step = 1, - default = 0, - - minute varid = Time.Minutes, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_HELP), - minimum = 0, - maximum = 59, - step = 1, - default = 0, - - second varid = Time.Seconds, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_HELP), - minimum = 0, - maximum = 59, - step = 1, - default = 0, - - endtime; - - checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry, - prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT), - help = STRING_TOKEN(STR_CHECK_BOX_HELP), - flags = CHECKBOX_DEFAULT, - key = 0, - endcheckbox; - - text - help = STRING_TOKEN(STR_TEXT_HELP), - text = STRING_TOKEN(STR_TEXT_TEXT_1); + default = 0;0;ZERO_GUID;STRING_TOKEN(STR_NULL_STRING), + ; // goto opcode end flag. - text - help = STRING_TOKEN(STR_TEXT_HELP), - text = STRING_TOKEN(STR_TEXT_TEXT_1), - text = STRING_TOKEN(STR_TEXT_TEXT_2); - - goto 1, - prompt = STRING_TOKEN(STR_GOTO_FORM1), //MainSetupPage // this too has no end-op and basically it's a jump to a form ONLY - help = STRING_TOKEN(STR_GOTO_HELP); + goto + prompt = STRING_TOKEN(STR_GOTO_DYNAMIC4), + help = STRING_TOKEN(STR_GOTO_DYNAMIC4_HELP), + flags = INTERACTIVE, + key = 0x1249; - endform; + endform; + endif; form formid = 3, title = STRING_TOKEN(STR_FORM3_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code - suppressif ideqval MyEfiVar == 111; + suppressif ideqval MyEfiVar.Field8 == 111; text help = STRING_TOKEN(STR_TEXT_HELP), text = STRING_TOKEN(STR_TEXT_TEXT_1); @@ -517,12 +661,120 @@ formset refresh interval = 3 // Refresh interval in seconds endnumeric; + grayoutif match2 (stringref(STRING_TOKEN(STR_PATTERN)), stringref(STRING_TOKEN(STR_STRING)), PERL_GUID); + numeric + varid = MyIfrNVData.Match2, + prompt = STRING_TOKEN(STR_MATCH2_PROMPT), + help = STRING_TOKEN(STR_MATCH2_HELP), + minimum = 0, + maximum = 243, + endnumeric; + endif; + label LABEL_UPDATE2; label LABEL_END; endform; - form formid = 4, title = STRING_TOKEN(STR_FORM3_TITLE); + formmap formid = 4, + maptitle = STRING_TOKEN(STR_SAMPL_MAP_METHOD); + mapguid = DRIVER_SAMPLE_FORMSET_GUID; + maptitle = STRING_TOKEN(STR_STANDARD_MAP_METHOD); + mapguid = EFI_HII_STANDARD_FORM_GUID; + + oneof varid = MyIfrNVData.SerialPortNo, + prompt = STRING_TOKEN(STR_SERIAL_PORT), + help = STRING_TOKEN(STR_ONE_OF_HELP), + + read cond (get(MyIfrNVData.SerialPortStatus) != 0 ? 0 : cond ((get(MyIfrNVData.SerialPortIo) & 0xF00) >> 0x8 == get(MyIfrNVData.SerialPortIrq) - 1 ? UNDEFINED : map (get(MyIfrNVData.SerialPortIo) : 0x3f8,1; 0x2F8,2; 0x3E8,3; 0x2E8,4;))); + write set(MyIfrNVData.SerialPortStatus, pushthis != 0) AND set(MyIfrNVData.SerialPortIo, map (pushthis : 1,0x3F8; 2,0x2F8; 3,0x3E8; 4,0x2E8;)) AND set (MyIfrNVData.SerialPortIrq, map (pushthis: 1,4; 2,3; 3,4; 4,3;)); + + option text = STRING_TOKEN(STR_SERIAL_PORT_DISABLE), value = 0x0, flags = DEFAULT; + option text = STRING_TOKEN(STR_SERIAL_PORT1), value = 0x1, flags = 0; + option text = STRING_TOKEN(STR_SERIAL_PORT2), value = 0x2, flags = 0; + option text = STRING_TOKEN(STR_SERIAL_PORT3), value = 0x3, flags = 0; + option text = STRING_TOKEN(STR_SERIAL_PORT4), value = 0x4, flags = 0; + endoneof; + + grayoutif TRUE; + checkbox varid = MyIfrNVData.SerialPortStatus, + prompt = STRING_TOKEN(STR_SERIAL_PORT_STATUS), + help = STRING_TOKEN(STR_CHECK_BOX_HELP), + endcheckbox; + endif; + + grayoutif TRUE; + suppressif ideqval MyIfrNVData.SerialPortStatus == 0; + oneof varid = MyIfrNVData.SerialPortIo, + prompt = STRING_TOKEN(STR_SERIAL_PORT_IO_ADDRESS), + help = STRING_TOKEN(STR_ONE_OF_HELP), + + option text = STRING_TOKEN(STR_SERIAL_PORT1_IOADDR), value = 0x3F8, flags = DEFAULT; + option text = STRING_TOKEN(STR_SERIAL_PORT2_IOADDR), value = 0x2F8, flags = 0; + option text = STRING_TOKEN(STR_SERIAL_PORT3_IOADDR), value = 0x3E8, flags = 0; + option text = STRING_TOKEN(STR_SERIAL_PORT4_IOADDR), value = 0x2E8, flags = 0; + endoneof; + endif; + endif; + + grayoutif TRUE; + suppressif ideqval MyIfrNVData.SerialPortStatus == 0; + oneof varid = MyIfrNVData.SerialPortIrq, + prompt = STRING_TOKEN(STR_SERIAL_PORT_IRQ), + help = STRING_TOKEN(STR_ONE_OF_HELP), + + option text = STRING_TOKEN(STR_SERIAL_PORT13_IRQ), value = 0x4, flags = DEFAULT; + option text = STRING_TOKEN(STR_SERIAL_PORT24_IRQ), value = 0x3, flags = 0; + endoneof; + endif; + endif; + + goto 1, + prompt = STRING_TOKEN(STR_GOTO_FORM1), //MainSetupPage + help = STRING_TOKEN(STR_GOTO_HELP); + + endform; + + form formid = 5, // Modal form + title = STRING_TOKEN(STR_MODAL_FORM_TITLE); + // + // This form is a modal form. + // + modal; + text + help = STRING_TOKEN(STR_EXIT_TEXT), + text = STRING_TOKEN(STR_EXIT_TEXT), + flags = INTERACTIVE, // VfrCompiler will generate opcode EFI_IFR_ACTION for Text marked as INTERACTIVE + key = 0x1245; + + text + help = STRING_TOKEN(STR_SAVE_TEXT), + text = STRING_TOKEN(STR_SAVE_TEXT), + flags = INTERACTIVE, // VfrCompiler will generate opcode EFI_IFR_ACTION for Text marked as INTERACTIVE + key = 0x1246; + endform; + + form formid = 6, // Form to show the refresh guid group op-code + title = STRING_TOKEN(STR_FORM6_TITLE); + + text + help = STRING_TOKEN(STR_TEXT_REFRESH_GUID), + text = STRING_TOKEN(STR_TEXT_REFRESH_GUID); + + numeric varid = MyIfrNVData.RefreshGuidCount, + prompt = STRING_TOKEN(STR_TEXT_REFRESH_GUID_COUNT), + help = STRING_TOKEN(STR_NUMERIC_HELP0), + flags = INTERACTIVE, + key = 0x1247, + minimum = 0, + maximum = 0xff, + step = 0, + default = 0, + refreshguid = EFI_IFR_REFRESH_ID_OP_GUID, + endnumeric; + + label LABEL_UPDATE3; + label LABEL_END; endform; @@ -537,4 +789,150 @@ formset endform; + + form formid = 7, // Form to show the question refer to union and bit Varstore + title = STRING_TOKEN(STR_FORM7_TITLE); + + subtitle text = STRING_TOKEN(STR_NEST_BIT_EFI_VARSTORE); + + checkbox varid = MyEfiBitVar.BitsData.NestBitCheckbox, + prompt = STRING_TOKEN(STR_BIT_NEST_CHECK_BOX_PROMPT), + help = STRING_TOKEN(STR_BIT_NEST_CHECK_BOX_HELP), + flags = CHECKBOX_DEFAULT, + endcheckbox; + + oneof varid = MyEfiBitVar.BitsData.NestBitOneof, + prompt = STRING_TOKEN(STR_ONE_OF_BIT_NEST_PROMPT), + help = STRING_TOKEN(STR_ONE_OF_BIT_NEST_HELP), + option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0, flags = MANUFACTURING; + option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 1, flags = DEFAULT; + endoneof; + + numeric varid = MyEfiBitVar.BitsData.NestBitNumeric, + questionid = 0x6666, + prompt = STRING_TOKEN(STR_BIT_NEST_NUMERIC_PROMPT), + help = STRING_TOKEN(STR_BIT_NEST_NUMERIC_DEFAULT_HELP), + flags = DISPLAY_UINT_HEX | INTERACTIVE, + minimum = 2, + maximum = 15, + step = 1, + endnumeric; + + oneof varid = MyEfiBitVar.BitsData.NestByteField, + prompt = STRING_TOKEN(BYTE_QUESTION_NEST_BIT_PROMPT), + help = STRING_TOKEN(BYTE_QUESTION_NEST_BIT_HELP), + option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0, flags = MANUFACTURING; + option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 1, flags = DEFAULT; + endoneof; + + subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2); + subtitle text = STRING_TOKEN(STR_BIT_EFI_VARSTORE); + + checkbox varid = MyEfiBitVar.EfiBitCheckbox, + prompt = STRING_TOKEN(STR_BIT_CHECK_BOX_PROMPT), + help = STRING_TOKEN(STR_BIT_CHECK_BOX_HELP), + flags = CHECKBOX_DEFAULT, + endcheckbox; + + grayoutif ideqval MyEfiBitVar.EfiBitGrayoutTest == 0; + numeric varid = MyEfiBitVar.EfiBitNumeric, + prompt = STRING_TOKEN(STR_BIT_NUMERIC_PROMPT), + help = STRING_TOKEN(STR_BIT_NUMERIC_HELP), + minimum = 0, + maximum = 7, + step = 0, + default = 4, defaultstore = MyStandardDefault, + default = 5, defaultstore = MyManufactureDefault, + endnumeric; + endif; + + oneof varid = MyEfiBitVar.EfiBitOneof, + questionid = 0x9999, + prompt = STRING_TOKEN(STR_ONE_OF_BIT_PROMPT), + help = STRING_TOKEN(STR_ONE_OF_BIT_HELP), + option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0x0, flags = MANUFACTURING; + option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 0x1, flags = DEFAULT; + endoneof; + + subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2); + subtitle text = STRING_TOKEN(STR_NEST_BIT_VARSTORE); + checkbox varid = MyIfrNVData.MyBitData.NestBitCheckbox, + prompt = STRING_TOKEN(STR_BIT_NEST_CHECK_BOX_PROMPT), + help = STRING_TOKEN(STR_BIT_NEST_CHECK_BOX_HELP), + flags = CHECKBOX_DEFAULT, + endcheckbox; + + oneof varid = MyIfrNVData.MyBitData.NestBitOneof, + prompt = STRING_TOKEN(STR_ONE_OF_BIT_NEST_PROMPT), + help = STRING_TOKEN(STR_ONE_OF_BIT_NEST_HELP), + option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0, flags = MANUFACTURING; + option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 1, flags = DEFAULT; + endoneof; + + numeric varid = MyIfrNVData.MyBitData.NestBitNumeric, + prompt = STRING_TOKEN(STR_BIT_NEST_NUMERIC_PROMPT), + help = STRING_TOKEN(STR_BIT_NEST_NUMERIC_HELP), + minimum = 0, + maximum = 7, + step = 0, + default = 6, defaultstore = MyStandardDefault, + default = 7, defaultstore = MyManufactureDefault, + endnumeric; + + oneof varid = MyIfrNVData.MyBitData.NestByteField, + prompt = STRING_TOKEN(BYTE_QUESTION_NEST_BIT_PROMPT), + help = STRING_TOKEN(BYTE_QUESTION_NEST_BIT_HELP), + option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0, flags = MANUFACTURING; + option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 1, flags = DEFAULT; + endoneof; + + subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2); + subtitle text = STRING_TOKEN(STR_BIT_VARSTORE); + + oneof varid = MyIfrNVData.BitOneof, + prompt = STRING_TOKEN(STR_ONE_OF_BIT_PROMPT), + help = STRING_TOKEN(STR_ONE_OF_BIT_HELP), + option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0, flags = MANUFACTURING; + option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 1, flags = DEFAULT; + endoneof; + + checkbox varid = MyIfrNVData.BitCheckbox, + prompt = STRING_TOKEN(STR_BIT_CHECK_BOX_PROMPT), + help = STRING_TOKEN(STR_BIT_CHECK_BOX_HELP), + flags = CHECKBOX_DEFAULT, + endcheckbox; + + numeric varid = MyIfrNVData.BitNumeric, + prompt = STRING_TOKEN(STR_BIT_NUMERIC_PROMPT), + help = STRING_TOKEN(STR_BUFFER_BIT_NUMERIC_HELP), + minimum = 0, + maximum = 20, + step = 0, + default = 16, defaultstore = MyStandardDefault, + default = 17, defaultstore = MyManufactureDefault, + endnumeric; + + subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2); + subtitle text = STRING_TOKEN(STR_UNION_EFI_VARSTORE); + + numeric varid = MyEfiUnionVar.UnionNumeric, + prompt = STRING_TOKEN(STR_UNION_BYTE_NUMERIC_PROMPT), + help = STRING_TOKEN(STR_UNION_BYTE_NUMERIC_HELP), + minimum = 0, + maximum = 20, + step = 0, + default = 7, defaultstore = MyStandardDefault, + default = 8, defaultstore = MyManufactureDefault, + endnumeric; + + guidop + guid = DRIVER_SAMPLE_FORMSET_GUID, + datatype = MY_EFI_BITS_VARSTORE_DATA, + data.EfiBitNumeric = 1, + data.EfiBitOneof = 1, + data.EfiBitCheckbox = 1, + endguidop; + + endform; + endformset;