X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FDriverSampleDxe%2FVfr.vfr;h=c1682913faf17630bb9c008e8247bfbd9ba6a22d;hb=911405a3f1122892f4d40a0f44e4e0c79b379f07;hp=8da0d4b30bda51dc24e055d4551394a8e6f67a6d;hpb=e68c776bf83b698dad76df1202bb763fe32de89e;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr index 8da0d4b30b..c1682913fa 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -2,7 +2,7 @@ // // Sample Setup formset. // -// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2017, 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 @@ -87,6 +87,19 @@ formset name = MyEfiVar, guid = DRIVER_SAMPLE_FORMSET_GUID; + // + // 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) // @@ -215,7 +228,7 @@ formset 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 = 0; - endif + endif; endlist; // @@ -234,6 +247,7 @@ formset 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; @@ -262,7 +276,7 @@ formset 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 + endif; endoneof; @@ -275,7 +289,7 @@ formset inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), ideqid MyIfrNVData.TestLateCheck == MyIfrNVData.TestLateCheck2 - endif + endif; endoneof; @@ -300,7 +314,7 @@ formset maxsize = 40, inconsistentif prompt = STRING_TOKEN(STR_STRING_CHECK_ERROR_POPUP), pushthis != stringref(STRING_TOKEN(STR_STRING_CHECK)) - endif + endif; endstring; // @@ -333,7 +347,7 @@ formset ideqid MyIfrNVData.HowOldAreYouInYearsManual == MyEfiVar.Field8 OR ideqvallist MyIfrNVData.HowOldAreYouInYearsManual == 1 3 5 7 - endif + endif; endnumeric; @@ -433,6 +447,17 @@ formset 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, @@ -446,36 +471,6 @@ formset help = STRING_TOKEN(STR_MANUFACTURE_DEFAULT_HELP), endresetbutton; - // - // Non-interactive password, validate by Setup Browser - // - password varid = MyIfrNVData.WhatIsThePassword, - prompt = STRING_TOKEN(STR_PASSWORD_PROMPT), - help = STRING_TOKEN(STR_PASSWORD_HELP), - minsize = 6, - maxsize = 20, - endpassword; - - string varid = MyIfrNVData.PasswordClearText, - prompt = STRING_TOKEN(STR_MY_STRING_PROMPT), - help = STRING_TOKEN(STR_MY_STRING_HELP), - minsize = 6, - maxsize = 0x14, - default = STRING_TOKEN(STR_MY_STRING_DEFAULT), - endstring; - - // - // 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; - // // Sample use case for IFR Security op-code // @@ -484,7 +479,23 @@ formset help = STRING_TOKEN(STR_TEXT_SECRUITY_TEST_HELP), text = STRING_TOKEN(STR_TEXT_SECRUITY_TEST_TEXT); endif; - + + 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; + + 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 help = STRING_TOKEN(STR_GOTO_HELP); @@ -520,6 +531,9 @@ formset data.OrderedList[0] = 0x21, endguidop; + goto 7, + prompt = STRING_TOKEN(STR_GOTO_FORM7), + help = STRING_TOKEN(STR_GOTO_FORM7_HELP); endform; @@ -538,7 +552,7 @@ formset ideqval Date.Day == 31 AND ideqvallist Date.Month == 2 4 6 9 11 - endif + endif; // // If the day is 30 AND month is 2 @@ -547,7 +561,7 @@ formset ideqval Date.Day == 30 AND ideqval Date.Month == 2 - endif + endif; // // If the day is 29 AND month is 2 AND it year is NOT a leapyear @@ -559,7 +573,7 @@ formset AND NOT ideqvallist Date.Year == 2004 2008 20012 20016 2020 2024 2028 2032 2036 - endif + endif; enddate; @@ -782,4 +796,160 @@ 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.ByteField, + 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; + + numeric varid = MyEfiUnionVar.BitField, + prompt = STRING_TOKEN(STR_UNION_BIT_NUMERIC_PROMPT), + help = STRING_TOKEN(STR_UNION_BIT_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;