X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FDriverSampleDxe%2FVfr.vfr;h=0a77e408fa7be360e22d7da30db539fde03e969c;hb=6bc7a0882d278227ef3107bf24c9b9712aa62732;hp=00982700b7b03f2585852eada595587cf90aa26b;hpb=e2100bfa651cd0d1295ef13451b9cf4adddb8bfa;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr index 00982700b7..0a77e408fa 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -2,7 +2,7 @@ // // Sample Setup formset. // -// Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2011, 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 @@ -43,6 +43,9 @@ #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 } } + // // Labels definition // @@ -51,7 +54,7 @@ #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, @@ -71,23 +74,15 @@ formset 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 - - // - // Define another Buffer Storage - // - varstore MY_DATA2, - name = MyIfrNVData2, - guid = FORMSET_GUID; + guid = DRIVER_SAMPLE_FORMSET_GUID; // GUID of this buffer storage // // Define a EFI variable Storage (EFI_IFR_VARSTORE_EFI) // - efivarstore MyEfiVar, // Define referenced name in vfr - attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, // 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 + 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 Name/Value Storage (EFI_IFR_VARSTORE_NAME_VALUE) @@ -96,7 +91,7 @@ formset 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 = FORMSET_GUID; // GUID of this Name/Value storage + guid = DRIVER_SAMPLE_FORMSET_GUID; // GUID of this Name/Value storage defaultstore MyStandardDefault, prompt = STRING_TOKEN(STR_STANDARD_DEFAULT_PROMPT), @@ -141,6 +136,19 @@ formset flags = INTERACTIVE, key = 0x1238; + text + help = STRING_TOKEN(STR_SAVE_CURRENT), + text = 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), + text = STRING_TOKEN(STR_DISCARD_CURRENT_AND_EXIT), + flags = INTERACTIVE, + key = 0x1244; // // Define oneof (EFI_IFR_ONE_OF) // @@ -312,26 +320,27 @@ 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 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 | 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; @@ -349,6 +358,9 @@ formset 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 @@ -358,6 +370,8 @@ formset 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; // @@ -370,6 +384,13 @@ formset 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; @@ -385,6 +406,28 @@ formset 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; resetbutton defaultstore = MyStandardDefault, @@ -448,6 +491,30 @@ formset 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; + + endform; suppressif ideqval MyIfrNVData.BootOrderLarge == 0; @@ -508,7 +575,21 @@ formset 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 + text + help = STRING_TOKEN(STR_SAVE_CURRENT_AND_EXIT), + text = STRING_TOKEN(STR_SAVE_CURRENT_AND_EXIT), + text = STRING_TOKEN(STR_SAVE_CURRENT_AND_EXIT), + flags = INTERACTIVE, + key = 0x1241; + + text + help = STRING_TOKEN(STR_DISCARD_CURRENT), + text = STRING_TOKEN(STR_DISCARD_CURRENT), + text = STRING_TOKEN(STR_DISCARD_CURRENT), + flags = INTERACTIVE, + key = 0x1242; + + time hour varid = Time.Hour, // 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, @@ -516,7 +597,7 @@ formset 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 + minute varid = Time.Minute, // 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, @@ -524,7 +605,7 @@ formset 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 + second varid = Time.Second, // 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, @@ -533,7 +614,16 @@ formset default = 0, 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), @@ -554,12 +644,30 @@ formset 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, + // + // Set the defult value, format is QuestionId; FormId; FormsetGuid; Device Path String Token + // + default = 0;0;ZERO_GUID;STRING_TOKEN(STR_NULL_STRING), + ; // goto opcode end flag. + + goto + prompt = STRING_TOKEN(STR_GOTO_DYNAMIC4), + help = STRING_TOKEN(STR_GOTO_DYNAMIC4_HELP), + flags = INTERACTIVE, + key = 0x1249; + 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); @@ -588,7 +696,7 @@ formset formmap formid = 4, maptitle = STRING_TOKEN(STR_SAMPL_MAP_METHOD); - mapguid = FORMSET_GUID; + mapguid = DRIVER_SAMPLE_FORMSET_GUID; maptitle = STRING_TOKEN(STR_STANDARD_MAP_METHOD); mapguid = EFI_HII_STANDARD_FORM_GUID; @@ -645,6 +753,51 @@ formset 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), + 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), + 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; + form formid = 0x1234, // Dynamically created page, title = STRING_TOKEN(STR_DYNAMIC_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code