EDK II VFR Specification
1.0.0
Search…
⌃K

2.11 VFR Form Definition

vfrFormDefinition ::=
"form" "formid" "=" Number ","
"title" "=" getStringId ";"
(
vfrStatementImage
| vfrStatementLocked
| vfrStatementRules
| vfrStatementDefault
| vfrStatementStat
| vfrStatementQuestions
| vfrStatementConditional
| vfrStatementLabel
| vfrStatementBanner
| vfrStatementExtension
| vfrStatementModal
)*
"endform" ";"

BEHAVIORS AND RESTRICTIONS

Note: formid must be unique for each form statement in a given formset.

Example

None.

2.11.1 VFR Form Map Definition

vfrFormMapDefinition ::=
"formmap" "formid" "=" Number ","
(
"maptitle" "=" getStringId ";"
"mapguid" "=" guidDefinition ";"
)*
(
vfrStatementImage
| vfrStatementLocked
| vfrStatementRules
| vfrStatementDefault
| vfrStatementStat
| vfrStatementQuestions
| vfrStatementConditional
| vfrStatementLabel
| vfrStatementBanner
| vfrStatementExtension
| vfrStatementModal
)*
"endform" ";"

BEHAVIORS AND RESTRICTIONS

Note: formid must be unique for each form statement in a given formset.

Example

None.

2.11.2 VFR Image Statement Definition

vfrStatementImage ::=
vfrImageTag ";"
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.3 VFR Locked Statement Definition

vfrStatementLocked ::=
vfrLockedTag ";"
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.4 VFR Rule Statement Definition

vfrStatementRules ::=
"rule" StringIdentifier ","
vfrStatementExpression
"endrule" ";"

BEHAVIORS AND RESTRICTIONS:

StringIdentifier is the name that can be referenced by a question. It should be unique in the formset.

Example

rule MyRule, 1 + 2
endrule;

2.11.5 VFR Statement Definition

vfrStatementStat ::=
vfrStatementSubTitle
| vfrStatementStaticText
| vfrStatementCrossReference
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.5.1 VFR SubTitle Definition

vfrStatementSubTitle ::=
"subtitle"
"text" "=" getStringId
{ "," "flags" "=" vfrSubtitleFlags }
(
{ "," vfrStatementStatTagList } ";"
|
{ "," vfrStatementStatTagList }
{ "," (vfrStatementStat | vfrStatementQuestions)*}
"endsubtitle" ";"
)
vfrSubtitleFlags ::=
subtitleFlagsField ( "|" subtitleFlagsField )* ";"
subtitleFlagsField ::=
Number
| "HORIZONTAL"

BEHAVIORS AND RESTRICTIONS

Note: flags is optional, and the default value is 0.

Example

subtitle
text = STRING_TOKEN(STR_SUBTITLE_TEXT),
flags = HORIZONTAL;
subtitle
text = STRING_TOKEN(STR_SUBTITLE_TEXT),
text
help = STRING_TOKEN(STR_TEXT_TEXT),
text = STRING_TOKEN(STR_TEXT_TEXT);
flags = RESET_REQUIRED,
key = 0x0001;
endsubtitle;

2.11.5.2 VFR Text Definition

vfrStatementStaticText ::=
"text"
"help" "=" getStringId ","
"text" "=" getStringId
{ "," "text" "=" getStringId }
{
"," "flags" "=" staticTextFlagsField ( "|" staticTextFlagsField )*
"," "key" "=" Number
}
{ "," vfrStatementStatTagList } ";"
staticTextFlagsField ::=
Number
| questionheaderFlagsField

BEHAVIORS AND RESTRICTIONS

Note: flags is optional. The default value is 0.
If EFI_IFR_FLAGS_CALLBACK is set in flags then it will generate an EFI_IFR_ACTION op-code. Otherwise, it generates the EFI_IFR_TEXT op-code.
The value of key will be used as a question ID.

Example

Generates EFI_IFR_TEXT:
text
help = STRING_TOKEN(STR_TEXT_TEXT),
text = STRING_TOKEN(STR_TEXT_TEXT);
Generates EFI_IFR_ACTION:
text
help = STRING_TOKEN(STR_TEXT_TEXT),
text = STRING_TOKEN(STR_TEXT_TEXT);
flags = RESET_REQUIRED,
key = 0x0001;

2.11.5.3 VFR Cross Reference Type Statements Definition

vfrStatementCrossReference ::=
vfrStatementGoto
| vfrStatementResetButton
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.5.3.1 VFR Goto Statement Definition

vfrStatementGoto ::=
"goto"
{
(
"devicePath" "=" getStringId ","
"formsetguid" "=" guidDefinition ","
"formid" "=" Number ","
"question" "=" Number ","
)
|
(
"formsetguid" "=" guidDefinition ","
"formid" "=" Number ","
"question" "=" Number ","
)
|
(
"formid" "=" Number ","
"question" "="
(
StringIdentifier ","
| Number ","
)
)
|
(
Number ","
)
}
vfrQuestionHeader
{ "," "flags" "=" vfrGotoFlags }
{ "," "key" "=" Number }
{ "," vfrStatementQuestionOptionList }
";"
vfrGotoFlags ::=
gotoFlagsField ( "|" gotoFlagsField )*
gotoFlagsField ::=
Number
| questionheaderFlagsField

BEHAVIORS AND RESTRICTIONS

The value of key is used as a question ID.

Example

Generate EFI_IFR_REF without key
goto 1,
prompt = STRING_TOKEN(STR_GOTO_PROMPT),
help = STRING_TOKEN(STR_GOTO_HELP);
Generate EFI_IFR_REF with key
goto 1,
prompt = STRING_TOKEN(STR_GOTO_PROMPT),
help = STRING_TOKEN(STR_GOTO_HELP);
key = 0x1234;
Generate EFI_IFR_REF2
goto
formid = 1,
question = QuesttionRef,
prompt = STRING_TOKEN(STR_GOTO_PROMPT),
help = STRING_TOKEN(STR_GOTO_HELP);
Generate EFI_IFR_REF3
goto
formsetguid = FORMSET_GUID,
formid = 1,
question = QuesttionRef,
prompt = STRING_TOKEN(STR_GOTO_PROMPT),
help = STRING_TOKEN(STR_GOTO_HELP);
Generate EFI_IFR_REF4
goto
devicepath = STRING_TOKEN(STR_DEVICE_PATH),
formsetguid = FORMSET_GUID,
formid = 1,
question = QuesttionRef,
prompt = STRING_TOKEN(STR_GOTO_PROMPT),
help = STRING_TOKEN(STR_GOTO_HELP);
Generate EFI_IFR_REF5 without varid
goto
prompt = STRING_TOKEN(STR_GOTO_PROMPT),
help = STRING_TOKEN(STR_GOTO_HELP);
Generate EFI_IFR_REF5 with varid
goto
varid = MySTestData.mFieldRef,
prompt = STRING_TOKEN(STR_GOTO_PROMPT),
help = STRING_TOKEN STR_GOTO_HELP);
default = FID;QID;GuidValue;STRING_TOKEN(STR_DEVICE_PATH),
;
Generate EFI_IFR_REF with option code
goto 1,
prompt = STRING_TOKEN(STR_GOTO_PROMPT),
help = STRING_TOKEN(STR_GOTO_HELP),
refresh interval = 3
;

2.11.5.3.2 VFR ResetButton Statement Definition

vfrStatementResetButton ::=
"resetbutton"
"defaultStore" "=" StringIdentifier ","
vfrStatementHeader ","
{ vfrStatementStatTagList "," }
"endresetbutton" ";"

BEHAVIORS AND RESTRICTIONS

Note: defaultStore should point to the default store defined before.

Example

resetbutton
defaultstore = DefaultStoreRef,
prompt = STRING_TOKEN(STR_RESET_BUTTON_PROMPT),
help = STRING_TOKEN(STR_RESET_BUTTON_HELP),
endresetbutton;

2.11.6 VFR Question Type Statements Definition

vfrStatementQuestions ::=
vfrStatementBooleanType
| vfrStatementDate
| vfrStatementNumericType
| vfrStatementStringType
| vfrStatementOrderedList
| vfrStatementTime
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.6.1 VFR Question Tag Definition

vfrStatementQuestionTag ::=
vfrStatementStatTag ","
| vfrStatementInconsistentIf
| vfrStatementNoSubmitIf
| vfrStatementDisableIfQuest
| vfrStatementRefresh
| vfrStatementVarstoreDevice
| vfrStatementExtension
| vfrStatementRefreshEvent
| vfrStatementWarningIf
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.6.1.1 VFR Question Tag InconsistentIf Definition

vfrStatementInconsistentIf ::=
"inconsistentif"
"prompt" "=" getStringId ","
vfrStatementExpression
"endif"

BEHAVIORS AND RESTRICTIONS

It can only be used in questions.

Example

checkbox
name = MyCheckBox,
varid = MySTestData.mField1,
questionid = 0xcb,
prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),
help = STRING_TOKEN(STR_CHECK_BOX_HELP),
flags = CHECKBOX_DEFAULT | INTERACTIVE,
inconsistentif
prompt = STRING_TOKEN(STR_INCONSISTENT_IF),
ideqval MySTestData.mField1 == 2007
endif
endcheckbox;

2.11.6.1.2 VFR Question Tag NoSubmitIf Definition

vfrStatementNoSubmitIf ::=
"nosubmitif"
"prompt" "=" getStringId ","
vfrStatementExpression
"endif"

BEHAVIORS AND RESTRICTIONS

It can only be used in questions.

Example

checkbox
name = MyCheckBox,
varid = MySTestData.mField1,
questionid = 0xcb,
prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),
help = STRING_TOKEN(STR_CHECK_BOX_HELP),
flags = CHECKBOX_DEFAULT | INTERACTIVE,
nosubmitif prompt = STRING_TOKEN(STR_NOSUBMIT_IF),
ideqval MySTestData.mField1 == 2007
endif
endcheckbox;

2.11.6.1.3 VFR Question Tag DisableIf Definition

vfrStatementDisableIfQuest ::=
"disableif" vfrStatementExpression ";"
vfrStatementQuestionOptionList
"endif"

BEHAVIORS AND RESTRICTIONS

None.

Example

checkbox
name = MyCheckBox,
varid = MySTestData.mField1,
questionid = 0xcb,
prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),
help = STRING_TOKEN(STR_CHECK_BOX_HELP),
flags = CHECKBOX_DEFAULT | INTERACTIVE,
disableif
ideqvallist MySTestData.mField1 == 1 3 5 7;
refresh interval = 1
endif
endcheckbox;

2.11.6.1.4 VFR Question Tag Refresh Definition

vfrStatementRefresh ::=
"refresh" "interval" "=" Number

BEHAVIORS AND RESTRICTIONS

It can only be used in questions.

Example

numeric varid = MyData.Data,
prompt = STRING_TOKEN(STR_PROMPT),
help = STRING_TOKEN(STR_HELP),
minimum = 0,
maximum = 0xff,
refresh interval = 3
endnumeric;

2.11.6.1.5 VFR Question Tag VarstoreDevice Definition

vfrStatementVarstoreDevice ::=
"varstoredevice" "=" getStringId ","

BEHAVIORS AND RESTRICTIONS

It can only be used in questions.

Example

checkbox
name = MyCheckBox,
varid = MySTestData.mField1,
questionid = 0xcb,
prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),
help = STRING_TOKEN(STR_CHECK_BOX_HELP),
flags = CHECKBOX_DEFAULT | INTERACTIVE,
varstoredevice = STRING_TOKEN(STR_VARSTOREDEVICE),
endcheckbox;

2.11.6.1.6 VFR Question Tag RefreshEvent Definition

vfrStatementRefreshEvent ::=
"refreshguid" "=" guidDefinition ","

BEHAVIORS AND RESTRICTIONS

It can only be used in questions.

Example

numeric
varid = MySTestData.mField2,
prompt = STRING_TOKEN(STR_NUMERIC_PROMPT),
help = STRING_TOKEN(STR_NUMERIC_HELP),
flags = DISPLAY_UINT_HEX,
minimum = 0,
maximum = 300,
step = 0,
refreshguid = EFI_IFR_REFRESH_ID_OP_GUID,
default = 175,
endnumeric;

2.11.6.1.7 VFR Question Tag WarningIf Definition vfrStatement

WarningIf ::=
"warningif" "prompt" "=" getStringId "," {"timeout" "=" Number ","}
vfrStatementExpression
"endif"

BEHAVIORS AND RESTRICTIONS

It can only be used in questions.

Example

checkbox
name = MyCheckBox,
varid = MySTestData.mField1,
questionid = 0xcb,
prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),
help = STRING_TOKEN(STR_CHECK_BOX_HELP),
flags = CHECKBOX_DEFAULT | INTERACTIVE,
warningif prompt = STRING_TOKEN(STR_INCONSISTENT_IF), timeout = 5,
ideqval MySTestData.mField1 == 2007
endif
endcheckbox;

2.11.6.2 VFR Question Tag List Definition

vfrStatementQuestionTagList ::=
( vfrStatementQuestionTag )*
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.6.3 VFR Question Option Tag Definition

vfrStatementQuestionOptionTag ::=
vfrStatementSuppressIfQuest
| vfrStatementValue
| vfrStatementDefault
| vfrStatementOptions
| vfrStatementRead
| vfrStatementWrite
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.6.3.1 VFR Question SuppressIf Statement Definition

vfrStatementSuppressIfQuest ::=
"suppressif" vfrStatementExpression ";"
vfrStatementQuestionOptionList
"endif"
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.6.3.2 VFR Default Statement Definition

vfrStatementDefault ::=
"default"
(
(
vfrStatementValue ","
| "=" vfrConstantValueField ","
)
{ "defaultstore" "=" StringIdentifier "," }
)

BEHAVIORS AND RESTRICTIONS

It can only be used in a question definition.
Note: defaultstore is optional and it points to the default store defined previously. If defaultstore is not defined, the EFIHII_DEFAULT_CLASS_STANDARD is assigned.

Example

default = 1,
default value = 1 + 2,
default = {1,2,3},

2.11.6.3.3 VFR Value Statement Definition

vfrStatementValue ::=
"value" "=" vfrStatementExpression ";"

BEHAVIORS AND RESTRICTIONS

None.

Example

Value = 0;

2.11.6.3.4 VFR Option Type Statements Definition

vfrStatementOptions ::=
vfrStatementOneOfOption
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.6.3.5 VFR OneOf Option Statement Definition

vfrStatementOneOfOption ::=
"option"
"text" "=" getStringId ","
"value" "=" vfrConstantValueField ","
"flags" "=" vfrOneOfOptionFlags
( "," vfrImageTag )*
";"
vfrOneOfOptionFlags ::=
oneofoptionFlagsField ( "|" oneofoptionFlagsField )*
oneofoptionFlagsField ::=
Number
| "OPTION_DEFAULT"
| "OPTION_DEFAULT_MFG"
| "INTERACTIVE"
| "RESET_REQUIRED"
| "DEFAULT"
| "REST_STYLE"

BEHAVIORS AND RESTRICTIONS

An option statement is special; it is used to embellish or describe questions.
These statements can be used to give the possible value and set the default value for questions. In other words, they are not questions, but they influence the questions they embellish. Therefore, the options' flags are treated as question flags and can accept all values of question flags.
Options with the DEFAULT flags can be used to set the default value for questions.

Example

option text = STRING_TOKEN(STR_ONE_OF_TEXT), value = 0x2, flags = DEFAULT | RESET_REQUIRED;

2.11.6.3.6 VFR Read Statement Definition

vfrStatementRead ::=
"read" vfrStatementExpression ";"

BEHAVIORS AND RESTRICTIONS

None.

Example

None

2.11.6.3.7 VFR Write Statement Definition

vfrStatementWrite ::=
"write" vfrStatementExpression ";"

BEHAVIORS AND RESTRICTIONS

None.

Example

None

2.11.6.4 VFR Question Tag List Definition

vfrStatementQuestionOptionList ::=
(
vfrStatementQuestionTag
| vfrStatementQuestionOptionTag
)*
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.6.5 VFR Boolean Type Statement Definition

vfrStatementBooleanType ::=
vfrStatementCheckBox
| vfrStatementAction
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.6.5.1 VFR CheckBox Statement Definition

vfrStatementCheckBox ::=
"checkbox"
vfrQuestionHeader ","
{ "flags" "=" vfrCheckBoxFlags "," }
{ "key" "=" Number "," }
vfrStatementQuestionOptionList
"endcheckbox" ";"
vfrCheckBoxFlags ::=
checkboxFlagsField ( "|" checkboxFlagsField )*
checkboxFlagsField ::=
Number
| "CHECKBOX_DEFAULT"
| "CHECKBOX_DEFAULT_MFG"
| questionheaderFlagsField

BEHAVIORS AND RESTRICTIONS

The value of key is used as question ID.
Note: flags is optional, and the default value is 0.

Example

checkbox
name = MyCheckBox,
varid = MySTestData.mField1,
prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),
help = STRING_TOKEN(STR_CHECK_BOX_HELP),
flags = CHECKBOX_DEFAULT | INTERACTIVE,
default = TRUE,
endcheckbox;

2.11.6.5.2 VFR Action Statement Definition

vfrStatementAction ::=
"action"
vfrQuestionHeader ","
{ "flags" "=" vfrActionFlags "," }
"config" "=" getStringId ","
vfrStatementQuestionTagList
"endaction" ";"
vfrActionFlags ::=
actionFlagsField ( "|" actionFlagsField )*
actionFlagsField ::=
Number
| questionheaderFlagsField

BEHAVIORS AND RESTRICTIONS

Note: flags is optional, and the default value is 0.

Example

action
prompt = STRING_TOKEN(STR_ACTION_PROMPT),
help = STRING_TOKEN(STR_ACTION_HELP),
flags = INTERACTIVE,
config = STRING_TOKEN(STR_ACTION_CONFIG),
endaction;

2.11.6.6 VFR Numeric Type Statements Definition

vfrStatementNumericType ::=
vfrStatementNumeric
| vfrStatementOneOf
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.6.6.1 VFR Numeric Statement Definition

vfrStatementNumeric ::=
"numeric"
vfrQuestionHeader ,
{ "flags" "=" vfrNumericFlags "," }
{ "key" "=" Number "," }
vfrSetMinMaxStep
vfrStatementQuestionOptionList
"endnumeric" ";"
vfrSetMinMaxStep ::=
"minimum" "=" Number ","
"maximum" "=" Number ","
{ "step" "=" Number "," }
vfrNumericFlags ::=
numericFlagsField ( "|" numericFlagsField )*
numericFlagsField ::=
Number
| "NUMERIC_SIZE_1"
| "NUMERIC_SIZE_2"
| "NUMERIC_SIZE_4"
| "NUMERIC_SIZE_8"
| "DISPLAY_INT_DEC"
| "DISPLAY_UINT_DEC"
| "DISPLAY_UINT_HEX"
| questionheaderFlagsField

BEHAVIORS AND RESTRICTIONS

Note: flags is optional, and the default value partly depends on the size of varid defined in vfrQuestionHeader.
The default display format is DISPLAY_UINT_DEC.

Example

numeric
varid = STestData.mField2,
prompt = STRING_TOKEN(STR_NUMERIC_PROMPT),
help = STRING_TOKEN(STR_NUMERIC_HELP),
flags = DISPLAY_UINT_HEX,
minimum = 0,
maximum = 300,
step = 0,
default = 175,
endnumeric;

2.11.6.6.2 VFR OneOf Statement Definition

vfrStatementOneOf ::=
"oneof"
vfrQuestionHeader,
{ "flags" "=" vfrOneofFlagsField "," }
{ vfrSetMinMaxStep }
vfrStatementQuestionOptionList
"endoneof" ";"
vfrOneofFlagsField ::=
numericFlagsField ( "|" numericFlagsField )*

BEHAVIORS AND RESTRICTIONS

Note: flags is optional, and the default value partly depends on the size of varid defined in vfrQuestionHeader syntax.
The flag is defined in the VFR Numeric Statement Definition.

Example

oneof
varid = STestData.mField3[0],
prompt = STRING_TOKEN(STR_ONE_OF_PROMPT),
help = STRING_TOKEN(STR_ONE_OF_HELP),
flags = DISPLAY_UINT_DEC,
option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0x0, flags = 0;
option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 0x1, flags = 0;
option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 0x2, flags = DEFAULT;
endoneof;

2.11.6.7 VFR String Type Statements Definition

vfrStatementStringType ::=
vfrStatementString
| vfrStatementPassword
Note: There are no BEHAVIORS AND RESTRICTIONS or an Example for this section.

2.11.6.7.1 VFR String Statement Definition

vfrStatementString ::=
"string"
vfrQuestionHeader ","
{ "flags" "=" vfrStringFlagsField "," }
{ "key" "=" Number "," }
"minsize" "=" Number ","
"maxsize" "=" Number ","
vfrStatementQuestionOptionList
"endstring" ";"
vfrStringFlagsField ::=
stringFlagsField ( "|" stringFlagsField )*
stringFlagsField ::=
Number
| "MULTI_LINE"
| questionheaderFlagsField

BEHAVIORS AND RESTRICTIONS

Note: flags is optional, and the default value is 0.

Example

string
varid = STestData.mField1,
prompt = STRING_TOKEN(STR_MY_STRING_PROMPT),
help = STRING_TOKEN(STR_MY_STRING_HELP),
flags = MULTI_LINE,
minsize = 6,
maxsize =