diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-30 12:39:53 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-30 12:39:53 +0000 |
commit | 78c2b9a33478ee0cb7e39466fb12191dde56b210 (patch) | |
tree | 811726b37c34ef0add39df3ab1f89b6c29ce6a2b /MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr | |
parent | da58863885b7d6416891d15c03a89c8be1798d63 (diff) | |
download | edk2-platforms-78c2b9a33478ee0cb7e39466fb12191dde56b210.tar.xz |
Add new op-code samples, includes efi varstore, refresh guid group and ref op-code.
Signed-off-by:ydong10
Reviewed-by:lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12232 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr')
-rw-r--r-- | MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr | 104 |
1 files changed, 87 insertions, 17 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr index 47304ab0f9..d316511133 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -74,20 +74,12 @@ formset guid = FORMSET_GUID; // GUID of this buffer storage
//
- // Define another Buffer Storage
- //
- varstore MY_DATA2,
- name = MyIfrNVData2,
- guid = FORMSET_GUID;
-
- //
// 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 = FORMSET_GUID;
//
// Define a Name/Value Storage (EFI_IFR_VARSTORE_NAME_VALUE)
@@ -330,21 +322,22 @@ formset 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;
@@ -383,6 +376,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;
@@ -483,9 +483,17 @@ 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);
+
guidop
guid = FORMSET_GUID,
- datatype = MY_DATA2,
+ datatype = MY_EFI_VARSTORE_DATA,
data.Field8 = 0x21,
data.Field16 = 0x2121,
data.OrderedList[0] = 0x21,
@@ -621,12 +629,29 @@ 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
+ 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);
@@ -712,6 +737,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
|