Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
TABLEOFCONTENTSEDKIIVFRProgrammingLanguageSpecification
1Introduction
1.1Overview
1.2AssumedKnowledge
1.3RelatedInformation
1.4Terms
2VFRDescriptioninBNF
2.1VFRProgrammingKeywords
2.2VFRProgram
2.3VFRDataStructDefinition
2.4VFRFormSetDefinition
2.5VFRFormSetListDefinition
2.6VFRDefaultStoresDefinition
2.7VFRVariableStoreDefinition
2.8VFRFormSetDisableIfDefinition
2.9VFRFormSetSuppressIfDefinition
2.10VFRGeneralTokenDefinition
2.11VFRFormDefinition
2.12VFRExpressionStatementDefinition
EDKIIVFRProgrammingLanguageSpecification
2Revision1.92
EDKIIVFRProgrammingLanguageSpecificationRevision1.92
12/01/202006:01:10
AcknowledgementsRedistributionanduseinsource(originaldocumentform)and'compiled'forms(convertedtoPDF,epub,HTMLandotherformats)withorwithoutmodification,arepermittedprovidedthatthefollowingconditionsaremet:
1. Redistributionsofsourcecode(originaldocumentform)mustretaintheabovecopyrightnotice,thislistofconditionsandthefollowingdisclaimerasthefirstlinesofthisfileunmodified.
2. Redistributionsincompiledform(transformedtootherDTDs,convertedtoPDF,epub,HTMLandotherformats)mustreproducetheabovecopyrightnotice,thislistofconditionsandthefollowingdisclaimerinthedocumentationand/orothermaterialsprovidedwiththedistribution.
THISDOCUMENTATIONISPROVIDEDBYTIANOCOREPROJECT"ASIS"ANDANYEXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOFMERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAREDISCLAIMED.INNOEVENTSHALLTIANOCOREPROJECTBELIABLEFORANYDIRECT,INDIRECT,INCIDENTAL,SPECIAL,EXEMPLARY,ORCONSEQUENTIALDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENTOFSUBSTITUTEGOODSORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTLIABILITY,ORTORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEUSEOFTHISDOCUMENTATION,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE.
Copyright(c)2007-2018,IntelCorporation.Allrightsreserved.
RevisionHistory
Revision RevisionHistory Date
0.90 Preliminaryrelease December12,2007
1.00 Firstgeneralrelease December212007
1.10 Updatesomesyntaxandfixsomeliteralissues February20,2008
1.20 AddmoredefaultstoreIDdescriptionandfixsomeliteralerrors May26,2008
1.30Addnewsyntaxclassguid,suppressifformset,security,formmaptosupportUEFI2.3HIIIFRopcodes,updatesomesyntaxandfixsomeliteralerrors.
Feb12,2010
1.40AddgenericGuidopcode,inconsistentifcheckforEFI_IFR_TIMEopcode,and,supportquestionVarStorageIddefinedbyDataTypeandVarStorename.
May3,2011
1.50
Updateefivarstoresyntax,addmodal,refresheventgroupandREF5opcode,andaddEFI_HII_REFdatatypetosupportUEFI2.3.1HIIIFRopcodes,correctsTimestatementexample.Minoreditingand August
31,2011
EDKIIVFRProgrammingLanguageSpecificationEDKIIVFRProgrammingLanguageSpecification
3Revision1.92
formatting
1.60Updatesyntaxforgoto,image,questionrefandconstantvalueopcodes,correctCALLBACKflagtoINTEREACTIVE,correcthelpstringforoldsyntaxdate/timeexample,andaddexamplesforexpressionopcodes.
December1,2011
1.70 Clarifyrestrictionthatenumtypeandstructdatafiledwithmorethanonedimensionsarrayarenotsupported.
May18,2012
1.80Addsyntaxforwarningifopcode,updatedefinitionforname/valuevarstoreandsubtitleopcode,updatereferencedUEFIspecversioninfo.
Jan14,2014
1.90Correctsamplecodeforcatenate/match/condopcode.Addsyntaxformatch2opcode.Addsamplecodetoshowthebuffertypeconstantvaluefororderedlistopcodeanddefaultopcode.
July2,2015
1.91 ConverttoGitbook April2017
1.92 #683VFRSpec:AdduniondatatypeandbitfieldsinVFRDataStructDefinition Mar2018
EDKIIVFRProgrammingLanguageSpecificationEDKIIVFRProgrammingLanguageSpecification
4Revision1.92
1INTRODUCTION
1.1OverviewInternalFormsRepresentation(IFR)isabinaryencoding.Thisencodingisdesignedtobecomparativelyeasytoparseandtomanipulateprogrammatically.
TosimplifythecreationofIFR,ahigh-levelVisualFormsRepresentation(VFR)languageisdefinedbelow.Usingthislanguagesyntax,acompilercanbedesignedtotakeanordinarytextfilecontainingVFRasaninput,andoutputIFRforuseinauser'sprogram.TherearevariousmethodstodefinetheVFRlanguage.ThisdocumentsetsoutamethodanddescribesitusingBNF-stylesyntax.
1.2AssumedKnowledgeAfullunderstandingoftheUEFISpecificationisassumedthroughoutthisdocument.
ThisdocumentisareferencemanualfordevelopersadoptingtheVFRlanguagetocreateproductscompliantwithcurrentUEFISpecification.Itoffersenoughmaterialtocreateinfrastructurefilesfortheuserinterface,andtocreateadrivertoexportsetup-relatedinformationtotheHumanInterfaceInfrastructureprogramminginterface.
1.3RelatedInformationUnifiedExtensibleFirmwareInterfaceSpecification,UnifiedEFI,Inc.,http://www.uefi.org
1.4TermsThefollowingtermsareusedthroughoutthisdocumenttodescribevaryingaspectsofinputlocalization:
BNF
BNFisanacronymfor"BackusNaurForm".JohnBackusandPeterNaurintroducedforthefirsttimeaformalnotationtodescribethesyntaxofagivenlanguage.
HII
HumanInterfaceInfrastructure.Thisgenerallyreferstothedatabasethatcontainsstring,font,andIFRinformationalongwithotherpiecesthatuseoneofthedatabasecomponents.
IFR
InternalFormsRepresentation.Thisisthebinaryencodingthatisusedfortherepresentationofuserinterfacepages.
VFR
VisualFormsRepresentation.Thisisthesourcecodeformatthatisusedbydeveloperstocreateauserinterfacewithvaryingpiecesofdataorquestions.Thisislatercompiledintoabinaryencoding
1IntroductionEDKIIVFRProgrammingLanguageSpecification
5Revision1.92
2VFRDESCRIPTIONINBNFThissectiondescribesalanguagefordeveloperstousewhenwritingforms.Thislanguageiscompiledintoanarchitecturalform(i.e.,IFR)describedintheUEFISpecification.Eachsectiondescribesadifferentlanguageterminalornon-terminal.
Note:ThetextformattingoftheVFRstatementsandexamplesinthisdocumentareconsistentwithBNF-styleconventionsratherthanwithEFIorUEFIconventions.
VFRformsconsistofaseriesofVFRstatements.ThesubsectionsinthischapterdesignatethebasedefinitionsofthedifferentVFRstatementsbyspecifyingthekeyword"Statement"inthesectiontitle,followedbytheBNFnon-terminalnameenclosedinparentheses.
Subsectionswithoutthe"Statement"keywordinthetitlearenon-terminaldefinitionsreferencedbyoneormoreoftheVFRstatementdefinitions.
TheVFRlanguageusesBNF-stylesyntax:
FortheBNF-stylesyntaxusedhere,literalcharactersandtermsareinboldandmarkedwithquotationmark.Example:"formset"iscomposedofliteralcharacters:
"formset"
Termsarecase-sensitive.VFRcommentsstartwith"//"andendattheendoftheline.Example:acommentline:
//thisisatypicalcommentmarker
Optionaltermsareenclosedinnon-boldedbraces{}.Example:"classguid"definitionisoptionalforformset:
{"classguid""="classguidDefinition","}
Termsenclosedinparentheses,"()",andfollowedbyanasterisk,""maybespecifiedintheinputVFRzeroormoretimes.*Example:",vfrStatementStatTag"couldappearzeroormoretimesinvfrStatementStatTagList:
vfrStatementStatTagList::=
vfrStatementStatTag(","vfrStatementStatTag)*
Iftheparenthesisisfollowedbyaplus"+"sign,thenthetermmustbepresentoneormoretimes.Example:oneormorenumberscouldbeusedinideqvallistexpression:
ideqvallistExp::=
"ideqvallist"
vfrQuestionDataFieldName"=="(Number)+
Groupsoftermsaresometimesenclosedinparentheses.Thecharacter"|"betweenthetwotermsindicatesthateithertermhasacceptablesyntax.Example:either"push"or"pop"isacceptableforvfrPragmaPackType:
2VFRDescriptioninBNFEDKIIVFRProgrammingLanguageSpecification
6Revision1.92
vfrPragmaPackType::=
{
"show"
|("push"|"pop"){","StringIdentifier}{","Number}
|{Number}
}
Asuperscriptnumber,"n",followedbyacomma","andanothernumber,"m",suchasitem{n,m}isusedtoindicatethatthenumberofoccurrencescanbefromntomoccurrencesoftheitem,inclusive.Example:therecouldbe1to8hexadecimalcharactersin"Hex8":
Hex8::="0x"["0"-"9""A"-"F""a"-"f"]{1,8}
2VFRDescriptioninBNFEDKIIVFRProgrammingLanguageSpecification
7Revision1.92
2.1VFRProgrammingKeywordsThefollowingkeywordsconstitutetheworkingsetofcommandsfortheVFRlanguage.AnexamplelineofVFRcodefollowseachkeyworddescriptiontohelpprogrammersunderstandhowasamplesuchcodeshouldlook.
//(commentmarker)ThisallowsaprogrammertoleavecommentsintheVFRfile.TheyhavenoeffectontheIFRbinarythatisgenerated.Example:
//thisisatypicalcommentmarker
#defineThiscommandisusedtoassignameaningfulnametoaconstant,andisverysimilarinfunctiontothe'C'style.Example:
#defineFORMSET_GUID{0xA04A27f4,0xDF00,0x4D42,0xB5,0x52,0x39,0x51,0x13,0x02,0x11,0x3D}
#includeThiscommandtellstheVFRcompilertousethecontentsofafileaspartofthesourcetocompile.Example:
#include"C:\Source\DriverSampleStrDefs.h"
2.1VFRProgrammingKeywordsEDKIIVFRProgrammingLanguageSpecification
8Revision1.92
2.2VFRProgramAcompleteVFRprogramtakesthefollowingform:
vfrProgram::=
(
vfrPragmaPackDefinition
|vfrDataStructDefinition
)*
vfrFormSetDefinition
vfrPragmaPackDefinition::=
"#pragma""pack""("vfrPragmaPackType")"
vfrPragmaPackType::=
{
"show"
|("push"|"pop"){","StringIdentifier}{","Number}
|{Number}
}
BEHAVIORSANDRESTRICTIONSThedatastructuremustbedefinedbeforeformsetstatements.Thepragmapacknumbermustbethesecondpowerof2.
ExampleNone.
2.2VFRProgramEDKIIVFRProgrammingLanguageSpecification
9Revision1.92
2.3VFRDataStructDefinition
vfrDataStructDefinition::=
{"typedef"}"struct"
{StringIdentifier}
"{"vfrDataStructFields"}"
{StringIdentifier}";"
vfrDataStructDefinition::=
{"typedef"}"union"
{StringIdentifier}
"{"vfrDataStructFields"}"
{StringIdentifier}";"
vfrDataStructFields::=
(
dataStructField64
|dataStructField32
|dataStructField16
|dataStructField8
|dataStructFieldBool
|dataStructFieldString
|dataStructFieldDate
|dataStructFieldTime
|dataStructFieldRef
|dataStructFieldUser
|dataStructBitField64
|dataStructBitField32
|dataStructBitField16
|dataStructBitField8
)*
dataStructField64::=
"UINT64"
StringIdentifier{"["Number"]"}";"
dataStructField32::=
"UINT32"
StringIdentifier{"["Number"]"}";"
dataStructField16::=
"UINT16"
StringIdentifier{"["Number"]"}";"
dataStructField8::=
"UINT8"
StringIdentifier{"["Number"]"}";"
dataStructFieldBool::=
"BOOLEAN"
StringIdentifier{"["Number"]"}";"
dataStructFieldString::=
"EFI_STRING_ID"
StringIdentifier{"["Number"]"}";"
dataStructFieldDate::=
"EFI_HII_DATE"
StringIdentifier{"["Number"]"}";"
dataStructFieldTime::=
"EFI_HII_TIME"
StringIdentifier{"["Number"]"}";"
dataStructFieldRef::=
"EFI_HII_REF"
StringIdentifier{"["Number"]"}";"
2.3VFRDataStructDefinitionEDKIIVFRProgrammingLanguageSpecification
10Revision1.92
dataStructFieldUser::=
StringIdentifier
StringIdentifier{"["Number"]"}";"
dataStructBitField64::=
"UINT64"
{StringIdentifier}":"Number";"
dataStructBitField32::=
"UINT32"
{StringIdentifier}":"Number";"
dataStructBitField16::=
"UINT16"
{StringIdentifier}":"Number";"
dataStructBitField8::=
"UINT8"
{StringIdentifier}":"Number";"
BEHAVIORSANDRESTRICTIONSThedatastructuredefinitionisinC-stylelanguage.enumtypeisnotsupported.Thekeywordofthefields'typemustbeauserdefineddatastructureoroneofthesetypes:UINT8,UINT16,UINT32,UINT64,BOOLEAN,EFI_STRING_ID,EFI_HII_DATA,EFI_HII_TIMEEFI_HII_REF,andatmostone-dimensionalarrayispermitted.Note:forthebitfield,thenumberofthebitwidthcouldnotexceed32.
Example
typedefstruct{
UINT8mU8;
UINT16mU16;
UINT32mU32[10];
UINT64mU64;
}MyData;
typedefunion{
UINT16Field16;
UINT8Field8;
}MyUnionData;
typedefstruct{
UINT16Field16;
UINT8MyBits1:1;
UINT8MyBits2:3;
UINT8MyBits3:3;
UINT16MyBits4:4;
}MyBitsData;
UnsupportedExampleofenumtype:
typedefenum{
MyEnumValue1,
MyEnumValue2,
MyEnumValueMax
}MyEnum;
UnsupportedExampleoftwodimensionalarraysindatastructure:
typedefstruct{
UINT8mU8;
UINT32mU32[10][20];
}MyUnsupportedData;
2.3VFRDataStructDefinitionEDKIIVFRProgrammingLanguageSpecification
11Revision1.92
2.3VFRDataStructDefinitionEDKIIVFRProgrammingLanguageSpecification
12Revision1.92
2.4VFRFormSetDefinition
vfrFormSetDefinition::=
"formset"
"guid""="guidDefinition","
"title""="getStringId","
"help""="getStringId","
{"classguid""="classguidDefinition","}
{"class""="classDefinition","}
{"subclass""="subclassDefinition","}
vfrFormSetList
"endformset"";"
classguidDefinition::=
guidDefinition{"|"guidDefinition}{"|"guidDefinition}
classDefinition::=
validClassNames("|"validClassNames)*
validClassNames::=
"NON_DEVICE"
|"DISK_DEVICE"
|"VIDEO_DEVICE"
|"NETWORK_DEVICE"
|"INPUT_DEVICE"
|"ONBOARD_DEVICE"
|"OTHER_DEVICE"
|Number
subclassDefinition::=
"SETUP_APPLICATION"
|"GENERAL_APPLICATION"
|"FRONT_PAGE"
|"SINGLE_USE"
|Number
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.4VFRFormSetDefinitionEDKIIVFRProgrammingLanguageSpecification
13Revision1.92
2.5VFRFormSetListDefinition
vfrFormSetList::=
(
vfrFormDefinition
|vfrFormMapDefinition
|vfrStatementImage
|vfrStatementVarStoreLinear
|vfrStatementVarStoreEfi
|vfrStatementVarStoreNameValue
|vfrStatementDefaultStore
|vfrStatementDisableIfFormSet
|vfrStatementSuppressIfFormSet
|vfrStatementExtension
)*
BEHAVIORSANDRESTRICTIONSIntheformset,therecanbemorethanoneformofvariablestoresanddefaultstores.TheformsetcancontrolwhethertoprocessanindividualformbynestingitinsideofanEFI_IFR_DISABLE_IFexpression.
Thevariablestoresanddefaultstoresmustbedefinedbeforebeingreferenced.
ExampleNone.
2.5VFRFormSetListDefinitionEDKIIVFRProgrammingLanguageSpecification
14Revision1.92
2.6VFRDefaultStoresDefinition
vfrStatementDefaultStore::=
"defaultstore"StringIdentifier","
"prompt""="getStringId
{",""attribute""="Number}";"
BEHAVIORSANDRESTRICTIONS
Note:attributeisusedtospecifythedefaultID.
Itisoptional.TheStandardDefaultsIdentifier,EFI_HII_DEFAULT_CLASS_STANDARD,isusediftheattributeisnotdefined.TheManufacturingDefaultsIdentifier,EFI_HII_DEFAULT_CLASS_MANUFACTURING,andtheSafeDefaultsIdentifier,EFI_HII_DEFAULT_CLASS_SAFE,canbealsousediftheheaderfiledefiningthemisincluded.
Example
defaultstoreMyStandard,prompt=STRING_TOKEN(STR_STANDARD_DEFAULT);
2.6VFRDefaultStoresDefinitionEDKIIVFRProgrammingLanguageSpecification
15Revision1.92
2.7VFRVariableStoreDefinition
2.7.1VFRBufferStoreDefinition
vfrStatementVarStoreLinear::=
"varstore"
(
StringIdentifier","
|"UINT8"","
|"UINT16"","
|"UINT32"","
|"UINT64"","
|"EFI_HII_DATE"","
|"EFI_HII_TIME"","
|"EFI_HII_REF"","
)
{"varid""="Number","}
"name""="StringIdentifier","
"guid""="guidDefinition";"
BEHAVIORSANDRESTRICTIONS
Note:TheStringIdentifierfollowingvarstoreisthereferreddatastructurename.TheStringIdentifierofnameisthevarstorename.
Note:nameandguidareusedjointlytospecifythevariablestore.
Example
varstoreMyData,name=RefName,guid=FORMSET_GUID;
2.7.2VFREFIVariableStoreDefinition
vfrStatementVarStoreEfi::=
"efivarstore"
(
StringIdentifier","
|"UINT8"","
|"UINT16"","
|"UINT32"","
|"UINT64"","
|"EFI_HII_DATE"","
|"EFI_HII_TIME"","
|"EFI_HII_REF"","
)
{"varid""="Number","}
"attribute""="Number("|"Number)*","
"name""="StringIdentifier","
"guid""="guidDefinition";"
BEHAVIORSANDRESTRICTIONS
2.7VFRVariableStoreDefinitionEDKIIVFRProgrammingLanguageSpecification
16Revision1.92
Note:TheStringIdentifierfollowingefivarstoreisthereferreddatastructurename.TheStringIdentifierofnameisthevarstorename.
Note:nameandguidareusedjointlytospecifytheefivariablestore.
Example
efivarstoreEfiDataStructure
attribute=EFI_VARIABLE_BOOTSERVICE_ACCESS,
name=EfiData,
guid=GUID;
2.7.3VFRVariableNameStoreDefinition
vfrStatementVarStoreNameValue::=
"namevaluevarstore"StringIdentifier","
{"varid""="Number","}
("name""="getStringId",")+
"guid""="guidDefinition";"
BEHAVIORSANDRESTRICTIONS
Example
namevaluevarstoreNameValueVarStore,
name=STRING_TOKEN(STR_NAMEVALUE_TABLE_ITEM1),
name=STRING_TOKEN(STR_NAMEVALUE_TABLE_ITEM2),
name=STRING_TOKEN(STR_NAMEVALUE_TABLE_ITEM3),
guid=GUID;
2.7VFRVariableStoreDefinitionEDKIIVFRProgrammingLanguageSpecification
17Revision1.92
2.8VFRFormSetDisableIfDefinition
vfrStatementDisableIfFormSet::=
"disableif"vfrStatementExpression";"
vfrFormSetList
"endif"";"
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.8VFRFormSetDisableIfDefinitionEDKIIVFRProgrammingLanguageSpecification
18Revision1.92
2.9VFRFormSetSuppressIfDefinition
vfrStatementSuppressIfFormSet::=
"suppressif"vfrStatementExpression";"
vfrFormSetList
"endif"";"
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.9VFRFormSetSuppressIfDefinitionEDKIIVFRProgrammingLanguageSpecification
19Revision1.92
2.10VFRGeneralTokenDefinition
2.10.1GUIDDefinition
Hex8::=
"0x"["0"-"9""A"-"F""a"-"f"]{1,8}
Hex4::=
"0x"["0"-"9""A"-"F""a"-"f"]{1,4}
Hex2::=
"0x"["0"-"9""A"-"F""a"-"f"]{1,2}
guidSubDefinition::=
Hex2","Hex2","Hex2","Hex2","
Hex2","Hex2","Hex2","Hex2
guidDefinition::=
"{"
Hex8","Hex4","Hex4","
(
"{"guidSubDefinition"}"
|guidSubDefinition
)
"}"
BEHAVIORSANDRESTRICTIONSInpractice,theVFRonlysupportsGUIDsinaC-stylelanguagestructure.Itisdefinedastwo32-bitvalues,followedbytwo16-bitvalues,followedbyeight1-bytevalues.
2.10.2String&StringIdentifierDefinition
StringIdentifier::=
["A"-"Z""a"-"z""_"]["A"-"Z""a"-"z""_""0"-"9"]*
getStringId::=
"STRING_TOKEN""("Number")"
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.10.3NumberDefinition
Number::=
("0x"["0"-"9""A"-"F""a"-"f"]+)|["0"-"9"]+
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.10.4VFRStatementHeaderDefinition
vfrStatementHeader::=
2.10VFRGeneralTokenDefinitionEDKIIVFRProgrammingLanguageSpecification
20Revision1.92
"prompt""="getStringId","
"help""="getStringId","
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.10.5VFRQuestionHeaderDefinition
vfrQuestionHeader::=
{"name""="StringIdentifier","}
{"varid""="vfrStorageVarId","}
{"questionid""="Number","}
vfrStatementHeader
questionheaderFlagsField::=
"READ_ONLY"
|"INTERACTIVE"
|"RESET_REQUIRED"
|"OPTIONS_ONLY"
vfrStorageVarId::=
(StringIdentifier"["Number"]")
|
(
StringIdentifier
(
"."StringIdentifier{"["Number"]"}
)*
)
BEHAVIORSANDRESTRICTIONS
Note:questionidisusedtospecifythequestionID.Ifitisnotdefined,thecompilerautomaticallyassignsauniqueID.
Note:nameisusedtospecifythereferencename,whichisoptional.
Note:ThefirstStringIdentifierdefinedinvfrStorageVarIdisthevarstorenameorthestructurenamereferredbyvarstore.Whenthesamestructureisreferredtobymorethanonevarstorestatement,onlythevarstorenamecanbeusedhere.Ifitisnotdefined,thisquestionhasnostorage.
ExampleNone.
2.10.6VFRConstantValueDefinition
vfrConstantValueField::=
Number
|"TRUE"
|"FALSE"
|"ONE"
2.10VFRGeneralTokenDefinitionEDKIIVFRProgrammingLanguageSpecification
21Revision1.92
|"ONES"
|"ZERO"
|Number":"Number":"Number
|Number"/"Number"/"Number
|"STRING_TOKEN""("Number")"
|{Number(","Number)*}
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.10.7VFRStatementImage&LockedTagDefinition
vfrImageTag::=
"image""=""IMAGE_TOKEN""("Number")"
vfrLockedTag::=
"locked"
vfrStatementStatTag::=
vfrImageTag|vfrLockedTag
vfrStatementStatTagList::=
vfrStatementStatTag(","vfrStatementStatTag)*
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.10VFRGeneralTokenDefinitionEDKIIVFRProgrammingLanguageSpecification
22Revision1.92
2.11VFRFormDefinition
vfrFormDefinition::=
"form""formid""="Number","
"title""="getStringId";"
(
vfrStatementImage
|vfrStatementLocked
|vfrStatementRules
|vfrStatementDefault
|vfrStatementStat
|vfrStatementQuestions
|vfrStatementConditional
|vfrStatementLabel
|vfrStatementBanner
|vfrStatementExtension
|vfrStatementModal
)*
"endform"";"
BEHAVIORSANDRESTRICTIONS
Note:formidmustbeuniqueforeachformstatementinagivenformset.
ExampleNone.
2.11.1VFRFormMapDefinition
vfrFormMapDefinition::=
"formmap""formid""="Number","
(
"maptitle""="getStringId";"
"mapguid""="guidDefinition";"
)*
(
vfrStatementImage
|vfrStatementLocked
|vfrStatementRules
|vfrStatementDefault
|vfrStatementStat
|vfrStatementQuestions
|vfrStatementConditional
|vfrStatementLabel
|vfrStatementBanner
|vfrStatementExtension
|vfrStatementModal
)*
"endform"";"
BEHAVIORSANDRESTRICTIONS
Note:formidmustbeuniqueforeachformstatementinagivenformset.
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
23Revision1.92
ExampleNone.
2.11.2VFRImageStatementDefinition
vfrStatementImage::=
vfrImageTag";"
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.3VFRLockedStatementDefinition
vfrStatementLocked::=
vfrLockedTag";"
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.4VFRRuleStatementDefinition
vfrStatementRules::=
"rule"StringIdentifier","
vfrStatementExpression
"endrule"";"
BEHAVIORSANDRESTRICTIONS:StringIdentifieristhenamethatcanbereferencedbyaquestion.Itshouldbeuniqueintheformset.
Example
ruleMyRule,1+2
endrule;
2.11.5VFRStatementDefinition
vfrStatementStat::=
vfrStatementSubTitle
|vfrStatementStaticText
|vfrStatementCrossReference
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.5.1VFRSubTitleDefinition
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
24Revision1.92
vfrStatementSubTitle::=
"subtitle"
"text""="getStringId
{",""flags""="vfrSubtitleFlags}
(
{","vfrStatementStatTagList}";"
|
{","vfrStatementStatTagList}
{","(vfrStatementStat|vfrStatementQuestions)*}
"endsubtitle"";"
)
vfrSubtitleFlags::=
subtitleFlagsField("|"subtitleFlagsField)*";"
subtitleFlagsField::=
Number
|"HORIZONTAL"
BEHAVIORSANDRESTRICTIONS
Note:flagsisoptional,andthedefaultvalueis0.
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.2VFRTextDefinition
vfrStatementStaticText::=
"text"
"help""="getStringId","
"text""="getStringId
{",""text""="getStringId}
{
",""flags""="staticTextFlagsField("|"staticTextFlagsField)*
",""key""="Number
}
{","vfrStatementStatTagList}";"
staticTextFlagsField::=
Number
|questionheaderFlagsField
BEHAVIORSANDRESTRICTIONS
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
25Revision1.92
Note:flagsisoptional.Thedefaultvalueis0.
IfEFI_IFR_FLAGS_CALLBACKissetinflagsthenitwillgenerateanEFI_IFR_ACTIONop-code.Otherwise,itgeneratestheEFI_IFR_TEXTop-code.
ThevalueofkeywillbeusedasaquestionID.
ExampleGeneratesEFI_IFR_TEXT:
text
help=STRING_TOKEN(STR_TEXT_TEXT),
text=STRING_TOKEN(STR_TEXT_TEXT);
GeneratesEFI_IFR_ACTION:
text
help=STRING_TOKEN(STR_TEXT_TEXT),
text=STRING_TOKEN(STR_TEXT_TEXT);
flags=RESET_REQUIRED,
key=0x0001;
2.11.5.3VFRCrossReferenceTypeStatementsDefinition
vfrStatementCrossReference::=
vfrStatementGoto
|vfrStatementResetButton
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.5.3.1VFRGotoStatementDefinition
vfrStatementGoto::=
"goto"
{
(
"devicePath""="getStringId","
"formsetguid""="guidDefinition","
"formid""="Number","
"question""="Number","
)
|
(
"formsetguid""="guidDefinition","
"formid""="Number","
"question""="Number","
)
|
(
"formid""="Number","
"question""="
(
StringIdentifier","
|Number","
)
)
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
26Revision1.92
|
(
Number","
)
}
vfrQuestionHeader
{",""flags""="vfrGotoFlags}
{",""key""="Number}
{","vfrStatementQuestionOptionList}
";"
vfrGotoFlags::=
gotoFlagsField("|"gotoFlagsField)*
gotoFlagsField::=
Number
|questionheaderFlagsField
BEHAVIORSANDRESTRICTIONSThevalueofkeyisusedasaquestionID.
ExampleGenerateEFI_IFR_REFwithoutkey
goto1,
prompt=STRING_TOKEN(STR_GOTO_PROMPT),
help=STRING_TOKEN(STR_GOTO_HELP);
GenerateEFI_IFR_REFwithkey
goto1,
prompt=STRING_TOKEN(STR_GOTO_PROMPT),
help=STRING_TOKEN(STR_GOTO_HELP);
key=0x1234;
GenerateEFI_IFR_REF2
goto
formid=1,
question=QuesttionRef,
prompt=STRING_TOKEN(STR_GOTO_PROMPT),
help=STRING_TOKEN(STR_GOTO_HELP);
GenerateEFI_IFR_REF3
goto
formsetguid=FORMSET_GUID,
formid=1,
question=QuesttionRef,
prompt=STRING_TOKEN(STR_GOTO_PROMPT),
help=STRING_TOKEN(STR_GOTO_HELP);
GenerateEFI_IFR_REF4
goto
devicepath=STRING_TOKEN(STR_DEVICE_PATH),
formsetguid=FORMSET_GUID,
formid=1,
question=QuesttionRef,
prompt=STRING_TOKEN(STR_GOTO_PROMPT),
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
27Revision1.92
help=STRING_TOKEN(STR_GOTO_HELP);
GenerateEFI_IFR_REF5withoutvarid
goto
prompt=STRING_TOKEN(STR_GOTO_PROMPT),
help=STRING_TOKEN(STR_GOTO_HELP);
GenerateEFI_IFR_REF5withvarid
goto
varid=MySTestData.mFieldRef,
prompt=STRING_TOKEN(STR_GOTO_PROMPT),
help=STRING_TOKENSTR_GOTO_HELP);
default=FID;QID;GuidValue;STRING_TOKEN(STR_DEVICE_PATH),
;
GenerateEFI_IFR_REFwithoptioncode
goto1,
prompt=STRING_TOKEN(STR_GOTO_PROMPT),
help=STRING_TOKEN(STR_GOTO_HELP),
refreshinterval=3
;
2.11.5.3.2VFRResetButtonStatementDefinition
vfrStatementResetButton::=
"resetbutton"
"defaultStore""="StringIdentifier","
vfrStatementHeader","
{vfrStatementStatTagList","}
"endresetbutton"";"
BEHAVIORSANDRESTRICTIONS
Note:defaultStoreshouldpointtothedefaultstoredefinedbefore.
Example
resetbutton
defaultstore=DefaultStoreRef,
prompt=STRING_TOKEN(STR_RESET_BUTTON_PROMPT),
help=STRING_TOKEN(STR_RESET_BUTTON_HELP),
endresetbutton;
2.11.6VFRQuestionTypeStatementsDefinition
vfrStatementQuestions::=
vfrStatementBooleanType
|vfrStatementDate
|vfrStatementNumericType
|vfrStatementStringType
|vfrStatementOrderedList
|vfrStatementTime
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
28Revision1.92
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.6.1VFRQuestionTagDefinition
vfrStatementQuestionTag::=
vfrStatementStatTag","
|vfrStatementInconsistentIf
|vfrStatementNoSubmitIf
|vfrStatementDisableIfQuest
|vfrStatementRefresh
|vfrStatementVarstoreDevice
|vfrStatementExtension
|vfrStatementRefreshEvent
|vfrStatementWarningIf
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.6.1.1VFRQuestionTagInconsistentIfDefinition
vfrStatementInconsistentIf::=
"inconsistentif"
"prompt""="getStringId","
vfrStatementExpression
"endif"
BEHAVIORSANDRESTRICTIONSItcanonlybeusedinquestions.
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),
ideqvalMySTestData.mField1==2007
endif
endcheckbox;
2.11.6.1.2VFRQuestionTagNoSubmitIfDefinition
vfrStatementNoSubmitIf::=
"nosubmitif"
"prompt""="getStringId","
vfrStatementExpression
"endif"
BEHAVIORSANDRESTRICTIONS
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
29Revision1.92
Itcanonlybeusedinquestions.
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,
nosubmitifprompt=STRING_TOKEN(STR_NOSUBMIT_IF),
ideqvalMySTestData.mField1==2007
endif
endcheckbox;
2.11.6.1.3VFRQuestionTagDisableIfDefinition
vfrStatementDisableIfQuest::=
"disableif"vfrStatementExpression";"
vfrStatementQuestionOptionList
"endif"
BEHAVIORSANDRESTRICTIONSNone.
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
ideqvallistMySTestData.mField1==1357;
refreshinterval=1
endif
endcheckbox;
2.11.6.1.4VFRQuestionTagRefreshDefinition
vfrStatementRefresh::=
"refresh""interval""="Number
BEHAVIORSANDRESTRICTIONSItcanonlybeusedinquestions.
Example
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=0xff,
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
30Revision1.92
refreshinterval=3
endnumeric;
2.11.6.1.5VFRQuestionTagVarstoreDeviceDefinition
vfrStatementVarstoreDevice::=
"varstoredevice""="getStringId","
BEHAVIORSANDRESTRICTIONSItcanonlybeusedinquestions.
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.6VFRQuestionTagRefreshEventDefinition
vfrStatementRefreshEvent::=
"refreshguid""="guidDefinition","
BEHAVIORSANDRESTRICTIONSItcanonlybeusedinquestions.
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.7VFRQuestionTagWarningIfDefinitionvfrStatement
WarningIf::=
"warningif""prompt""="getStringId","{"timeout""="Number","}
vfrStatementExpression
"endif"
BEHAVIORSANDRESTRICTIONSItcanonlybeusedinquestions.
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
31Revision1.92
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,
warningifprompt=STRING_TOKEN(STR_INCONSISTENT_IF),timeout=5,
ideqvalMySTestData.mField1==2007
endif
endcheckbox;
2.11.6.2VFRQuestionTagListDefinition
vfrStatementQuestionTagList::=
(vfrStatementQuestionTag)*
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.6.3VFRQuestionOptionTagDefinition
vfrStatementQuestionOptionTag::=
vfrStatementSuppressIfQuest
|vfrStatementValue
|vfrStatementDefault
|vfrStatementOptions
|vfrStatementRead
|vfrStatementWrite
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.6.3.1VFRQuestionSuppressIfStatementDefinition
vfrStatementSuppressIfQuest::=
"suppressif"vfrStatementExpression";"
vfrStatementQuestionOptionList
"endif"
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.6.3.2VFRDefaultStatementDefinition
vfrStatementDefault::=
"default"
(
(
vfrStatementValue","
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
32Revision1.92
|"="vfrConstantValueField","
)
{"defaultstore""="StringIdentifier","}
)
BEHAVIORSANDRESTRICTIONSItcanonlybeusedinaquestiondefinition.
Note:defaultstoreisoptionalanditpointstothedefaultstoredefinedpreviously.Ifdefaultstoreisnotdefined,theEFIHII_DEFAULT_CLASS_STANDARDisassigned.
Example
default=1,
defaultvalue=1+2,
default={1,2,3},
2.11.6.3.3VFRValueStatementDefinition
vfrStatementValue::=
"value""="vfrStatementExpression";"
BEHAVIORSANDRESTRICTIONSNone.
Example
Value=0;
2.11.6.3.4VFROptionTypeStatementsDefinition
vfrStatementOptions::=
vfrStatementOneOfOption
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.6.3.5VFROneOfOptionStatementDefinition
vfrStatementOneOfOption::=
"option"
"text""="getStringId","
"value""="vfrConstantValueField","
"flags""="vfrOneOfOptionFlags
(","vfrImageTag)*
";"
vfrOneOfOptionFlags::=
oneofoptionFlagsField("|"oneofoptionFlagsField)*
oneofoptionFlagsField::=
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
33Revision1.92
Number
|"OPTION_DEFAULT"
|"OPTION_DEFAULT_MFG"
|"INTERACTIVE"
|"RESET_REQUIRED"
|"DEFAULT"
BEHAVIORSANDRESTRICTIONSAnoptionstatementisspecial;itisusedtoembellishordescribequestions.
Thesestatementscanbeusedtogivethepossiblevalueandsetthedefaultvalueforquestions.Inotherwords,theyarenotquestions,buttheyinfluencethequestionstheyembellish.Therefore,theoptions'flagsaretreatedasquestionflagsandcanacceptallvaluesofquestionflags.
OptionswiththeDEFAULTflagscanbeusedtosetthedefaultvalueforquestions.
Example
optiontext=STRING_TOKEN(STR_ONE_OF_TEXT),value=0x2,flags=DEFAULT|RESET_REQUIRED;
2.11.6.3.6VFRReadStatementDefinition
vfrStatementRead::=
"read"vfrStatementExpression";"
BEHAVIORSANDRESTRICTIONSNone.
ExampleNone
2.11.6.3.7VFRWriteStatementDefinition
vfrStatementWrite::=
"write"vfrStatementExpression";"
BEHAVIORSANDRESTRICTIONSNone.
ExampleNone
2.11.6.4VFRQuestionTagListDefinition
vfrStatementQuestionOptionList::=
(
vfrStatementQuestionTag
|vfrStatementQuestionOptionTag
)*
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
34Revision1.92
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.6.5VFRBooleanTypeStatementDefinition
vfrStatementBooleanType::=
vfrStatementCheckBox
|vfrStatementAction
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.6.5.1VFRCheckBoxStatementDefinition
vfrStatementCheckBox::=
"checkbox"
vfrQuestionHeader","
{"flags""="vfrCheckBoxFlags","}
{"key""="Number","}
vfrStatementQuestionOptionList
"endcheckbox"";"
vfrCheckBoxFlags::=
checkboxFlagsField("|"checkboxFlagsField)*
checkboxFlagsField::=
Number
|"CHECKBOX_DEFAULT"
|"CHECKBOX_DEFAULT_MFG"
|questionheaderFlagsField
BEHAVIORSANDRESTRICTIONSThevalueofkeyisusedasquestionID.
Note:flagsisoptional,andthedefaultvalueis0.
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.2VFRActionStatementDefinition
vfrStatementAction::=
"action"
vfrQuestionHeader","
{"flags""="vfrActionFlags","}
"config""="getStringId","
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
35Revision1.92
vfrStatementQuestionTagList
"endaction"";"
vfrActionFlags::=
actionFlagsField("|"actionFlagsField)*
actionFlagsField::=
Number
|questionheaderFlagsField
BEHAVIORSANDRESTRICTIONS
Note:flagsisoptional,andthedefaultvalueis0.
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.6VFRNumericTypeStatementsDefinition
vfrStatementNumericType::=
vfrStatementNumeric
|vfrStatementOneOf
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.6.6.1VFRNumericStatementDefinition
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"
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
36Revision1.92
|"DISPLAY_UINT_DEC"
|"DISPLAY_UINT_HEX"
|questionheaderFlagsField
BEHAVIORSANDRESTRICTIONS
Note:flagsisoptional,andthedefaultvaluepartlydependsonthesizeofvariddefinedinvfrQuestionHeader.
ThedefaultdisplayformatisDISPLAY_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.2VFROneOfStatementDefinition
vfrStatementOneOf::=
"oneof"
vfrQuestionHeader,
{"flags""="vfrOneofFlagsField","}
{vfrSetMinMaxStep}
vfrStatementQuestionOptionList
"endoneof"";"
vfrOneofFlagsField::=
numericFlagsField("|"numericFlagsField)*
BEHAVIORSANDRESTRICTIONS
Note:flagsisoptional,andthedefaultvaluepartlydependsonthesizeofvariddefinedinvfrQuestionHeadersyntax.
TheflagisdefinedintheVFRNumericStatementDefinition.
Example
oneof
varid=STestData.mField3[0],
prompt=STRING_TOKEN(STR_ONE_OF_PROMPT),
help=STRING_TOKEN(STR_ONE_OF_HELP),
flags=DISPLAY_UINT_DEC,
optiontext=STRING_TOKEN(STR_ONE_OF_TEXT1),value=0x0,flags=0;
optiontext=STRING_TOKEN(STR_ONE_OF_TEXT2),value=0x1,flags=0;
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
37Revision1.92
optiontext=STRING_TOKEN(STR_ONE_OF_TEXT3),value=0x2,flags=DEFAULT;
endoneof;
2.11.6.7VFRStringTypeStatementsDefinition
vfrStatementStringType::=
vfrStatementString
|vfrStatementPassword
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.6.7.1VFRStringStatementDefinition
vfrStatementString::=
"string"
vfrQuestionHeader","
{"flags""="vfrStringFlagsField","}
{"key""="Number","}
"minsize""="Number","
"maxsize""="Number","
vfrStatementQuestionOptionList
"endstring"";"
vfrStringFlagsField::=
stringFlagsField("|"stringFlagsField)*
stringFlagsField::=
Number
|"MULTI_LINE"
|questionheaderFlagsField
BEHAVIORSANDRESTRICTIONS
Note:flagsisoptional,andthedefaultvalueis0.
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=0x14,
endstring;
2.11.6.7.2VFRPasswordStatementDefinition
vfrStatementPassword::=
"password"
vfrQuestionHeader,
{"flags""="vfrPasswordFlagsField","}
{"key""="Number","}
"minsize""="Number","
"maxsize""="Number","
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
38Revision1.92
vfrStatementQuestionOptionList
"endpassword"";"
vfrPasswordFlagsField::=
passwordFlagsField("|"passwordFlagsField)*
passwordFlagsField::=
Number
|questionheaderFlagsField
BEHAVIORSANDRESTRICTIONS
Note:flagsisoptional,andthedefaultvalueis0.
ThevalueofkeyisusedasaquestionID.
Example
password
varid=STestData.mPrivate.mField2,
prompt=STRING_TOKEN(STR_PASSWORD_PROMPT),
help=STRING_TOKEN(STR_PASSWORD_HELP),
minsize=6,
maxsize=20,
endpassword;
2.11.6.8VFROrderedListStatementDefinition
vfrStatementOrderedList::=
"orderedlist"
vfrQuestionHeader","
{"maxcontainers""="Number","}
{"flags""="vfrOrderedListFlags}
vfrStatementQuestionOptionList
"endlist"";"
vfrOrderedListFlags::=
orderedlistFlagsField("|"orderedlistFlagsField)*
orderedlistFlagsField::=
Number
|"UNIQUE"
|"NOEMPTY"
|questionheaderFlagsField
BEHAVIORSANDRESTRICTIONS
Note:maxcontainersisoptional,andthedefaultvaluedependsonthevariablesizedefinedbyvaridinvfrQuestionHeader.
Note:flagsisoptional,andthedefaultvalueis0.
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
39Revision1.92
Example
orderedlist
varid=STestPriData.mField3,
prompt=STRING_TOKEN(STR_BOOT_OPTIONS),
help=STRING_TOKEN(STR_BOOT_OPTIONS),
optiontext=STRING_TOKEN(STR_BOOT_OPTION2),value=2,flags=RESET_REQUIRED;
optiontext=STRING_TOKEN(STR_BOOT_OPTION1),value=1,flags=RESET_REQUIRED;
optiontext=STRING_TOKEN(STR_BOOT_OPTION3),value=3,flags=RESET_REQUIRED;
optiontext=STRING_TOKEN(STR_BOOT_OPTION4),value=4,flags=RESET_REQUIRED;
optiontext=STRING_TOKEN(STR_EMPTY_STRING),value={1,2,3,4},flags=DEFAULT;
endlist;
2.11.6.9VFRDateStatementDefinition
vfrStatementDate::=
"date"
(
(
vfrQuestionHeader,
{"flags""="vfrDateFlags","}
vfrStatementQuestionOptionList
)
|
(
"year""varid""="StringIdentifier"."StringIdentifier","
"prompt""="getStringId","
"help""="getStringId","
minMaxDateStepDefault
"month""varid""="StringIdentifier"."StringIdentifier","
"prompt""="getStringId","
"help""="getStringId","
minMaxDateStepDefault
"day""varid""="StringIdentifier"."StringIdentifier","
"prompt""="getStringId","
"help""="getStringId","
minMaxDateStepDefault
(vfrStatementInconsistentIf)*
)
)
"enddate"";"
minMaxDateStepDefault::=
"minimum""="Number","
"maximum""="Number","
{"step""="Number","}
{"default""="Number","}
vfrDateFlags::=
dateFlagsField("|"dateFlagsField)*
dateFlagsField::=
Number
|"YEAR_SUPPRESS"
|"MONTH_SUPPRESS"
|"DAY_SUPPRESS"
|"STORAGE_NORMAL"
|"STORAGE_TIME"
|"STORAGE_WAKEUP"
BEHAVIORSANDRESTRICTIONS
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
40Revision1.92
ThereareoldandnewsyntaxoftheVFRDatestatement,buttheyareincompatible.TheoldVFRDateonlyusesEFIDate/TimeStorage,insteadofnormalquestionvaluestorage.ThenewVFRDatecanuseeitherthenormalquestionvaluestorageorEFIDate/TimeStorage.
ForthenewsyntaxofVFR,flagsisoptional,andthedefaultvalueis0Examplesfollow.
NewsyntaxofVFRDate:
date
varid=STestData.mDate,
prompt=STRING_TOKEN(STR_DATE_PROMPT),
help=STRING_TOKEN(STR_DATE_PROMPT),
flags=STORAGE_NORMAL,
default=2007/08/26,
enddate;
OldsyntaxofVFRDate:
dateyearvarid=Date.Year,
prompt=STRING_TOKEN(STR_DATE_PROMPT),
help=STRING_TOKEN(STR_DATE_HELP),
minimum=2003,
maximum=2100,
step=1,
default=2003,
monthvarid=Date.Month
prompt=STRING_TOKEN(STR_DATE_PROMPT),
help=STRING_TOKEN(STR_DATE_HELP),
minimum=1,
maximum=12,
step=1,
default=1,
dayvarid=Date.Day,
prompt=STRING_TOKEN(STR_DATE_PROMPT),
help=STRING_TOKEN(STR_DATE_HELP),
minimum=1,
maximum=31,
step=0x1,
default=1,
enddate;
2.11.6.10VFRTimeStatementDefinition
vfrStatementTime:
"time"
(
(
vfrQuestionHeader","
{"flags""="vfrTimeFlags","}
vfrStatementQuestionOptionList
)
|
(
"hour""varid""="StringIdentifier"."StringIdentifier","
"prompt""="getStringId","
"help""="getStringId","
minMaxTimeStepDefault
"minute""varid""="StringIdentifier"."StringIdentifier","
"prompt""="getStringId","
"help""="getStringId","
minMaxTimeStepDefault
"second""varid""="StringIdentifier"."StringIdentifier","
"prompt""="getStringId","
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
41Revision1.92
"help""="getStringId","
minMaxTimeStepDefault
(vfrStatementInconsistentIf)*
)
)
"endtime"";"
minMaxTimeStepDefault::=
"minimum""="Number","
"maximum""="Number","
{"step""="Number","}
{"default""="Number","}
vfrTimeFlags::=
timeFlagsField("|"timeFlagsField)*
timeFlagsField::=
Number
|"HOUR_SUPPRESS"
|"MINUTE_SUPPRESS"
|"SECOND_SUPPRESS"
|"STORAGE_NORMAL"
|"STORAGE_TIME"
|"STORAGE_WAKEUP"
BEHAVIORSANDRESTRICTIONS:ThereareoldandnewsyntaxofVFRTimestatements.Theyareincompatible.
New:VFRTimecanuseeitherthenormalquestionvaluestorageorEFIDate/TimeStorage.
Old:VFRDatecanuseonlyEFIDate/TimeStorage,insteadofnormalquestionvaluestorage.
InthenewsyntaxofVFR,flagsisoptional,andthedefaultvalueis0
ExampleNewTimeSyntax:
time
name=MyTime,
varid=STestData.mTime,
prompt=STRING_TOKEN(STR_TIME_PROMPT),
help=STRING_TOKEN(STR_TIME_PROMPT),
flags=STORAGE_NORMAL,
default=15:33:33,
endtime;
OldTimeSyntax:
timehourvarid=Time.Hour,
prompt=STRING_TOKEN(STR_TIME_PROMPT),
help=STRING_TOKEN(STR_TIME_HELP),
minimum=0,
maximum=23,
step=1,
default=0,
minutevarid=Time.Minute,
prompt=STRING_TOKEN(STR_TIME_PROMPT),
help=STRING_TOKEN(STR_TIME_HELP),
minimum=0,
maximum=59,
step=1,
default=0,
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
42Revision1.92
secondvarid=Time.Second,
prompt=STRING_TOKEN(STR_TIME_PROMPT),
help=STRING_TOKEN(STR_TIME_HELP),
minimum=0,
maximum=59,
step=1,
default=0,
endtime;
2.11.7VFRConditionalTypeStatementsDefinition
vfrStatementConditional::=
vfrStatementDisableIfStat
|vfrStatementSuppressIfStat
|vfrStatementGrayOutIfStat
Note:TherearenoBEHAVIORSANDRESTRICTIONoranExampleforthissection.
2.11.7.1VFRStatementListDefinition
vfrStatementStatList::=
vfrStatementStat
|vfrStatementQuestions
|vfrStatementConditional
|vfrStatementLabel
|vfrStatementExtension
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.7.2VFRStatementDisalbeIfDefinition
vfrStatementDisableIfStat::=
"disableif"vfrStatementExpression";"
(vfrStatementStatList)*
"endif"";"
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.7.3VFRStatementSuppressIfDefinition
vfrStatementSuppressIfStat::=
"suppressif"vfrStatementExpression";"
(vfrStatementStatList)*
"endif"";"
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
43Revision1.92
2.11.7.4VFRStatementGrayOutIfDefinition
vfrStatementGrayOutIfStat::=
"grayoutif"vfrStatementExpression";"
(vfrStatementStatList)*
"endif"";"
Note:TherearenoBEHAVIORSANDRESTRICTIONSoranExampleforthissection.
2.11.8VFRGUIDStatementDefinition
2.11.8.1VFRLabelStatementDefinition
vfrStatementLabel::=
"label"Number";"
BEHAVIORSANDRESTRICTIONSItisanextendedEFI_IFR_GUIDop-code.
ItshouldbepairedintheVFRprogram.
Note:labelisusedtoinsertop-codesatruntime.
Example
labelLABEL_START;
labelLABEL_END;
2.11.8.2VFRBannerStatementDefinition
vfrStatementBanner::=
"banner"{","}
"title""="getStringId","
(
(
"line"Number","
"align"("left"|"center"|"right")";"
)
|
("timeout""="Number";")
)
BEHAVIORSANDRESTRICTIONSItisanextendedEFI_IFR_GUIDop-code.
Example
banner
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
44Revision1.92
title=STRING_TOKEN(STR_BANNER_TITLE),
line1,
aligncenter;
2.11.8.3VFRGUIDExtensionDefinition
vfrStatementExtension::=
"guidop"
"guid""="guidDefinition
{
",""datatype""="
(
"UINT64"{"["Number"]"}
|"UINT32"{"["Number"]"}
|"UINT16"{"["Number"]"}
|"UINT8"{"["Number"]"}
|"BOOLEAN"{"["Number"]"}
|"EFI_STRING_ID"{"["Number"]"}
|"EFI_HII_DATE"{"["Number"]"}
|"EFI_HII_TIME"{"["Number"]"}
|"EFI_HII_REF"{"["Number"]"}
|StringIdentifier{"["Number"]"}
)
vfrExtensionData
}
{
","(vfrStatementExtension)*
"endguidop"
}
";"
vfrExtensionData::=
(
",""data"{"["Number"]"}
(
"."StringIdentifier{"["Number"]"}
)*
"="Number
)*
BEHAVIORSANDRESTRICTIONSThegenericguidopstatementisusedtospecifyuserextensionopcodes.Bydefault,unassignedbytewillbezero.Thearraynumberinthe"data"partcannotbeequaltoorlargerthantheoneinthe"datatype"part.Thatis,thearrayindexstartsfromzero.
Example
guidop
guid=GUID,
datatype=UINT32,
data=0x12345678;
2.11.9VFRModalStatementDefinition
vfrStatementModal::=
modal";"
BEHAVIORSANDRESTRICTIONSItisonlyusedinaform.
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
45Revision1.92
Example
modal;
2.11VFRFormDefinitionEDKIIVFRProgrammingLanguageSpecification
46Revision1.92
2.12VFRExpressionStatementDefinitionTheVFRexpressionisdefinedinC-stylelanguage.
ThesyntaxofVFRexpressionisdefinedasatree.Thepositionsinthetreearedeterminedaccordingtothepriorityoftheoperator(forexample:+-*/).AttherootofitarethetermsofOR,followedbythetermsofAND,becausethepriorityofoperatorORislowerthantheoperatorAND(s).Theleavesofthetreearesub-expressionsofbuilt-in-functions,unaryoperators,ternaryoperators,andconstants.
2.12.1OR
vfrStatementExpression::=
andTerm("OR"andTerm)*
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_ORop-codes.
2.12.2AND
andTerm::=
bitwiseorTerm("AND"bitwiseorTerm)*
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_ANDop-codes.
2.12.3bitwiseor
bitwiseorTerm::=
bitwiseandTerm("|"bitwiseandTerm)*
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_BITWISE_ORop-codes.
2.12.4bitwiseand
bitwiseandTerm::=
equalTerm("&"equalTerm)*
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_BITWISE_ANDop-codes.
2.12.5equal
equalTerm::=
compareTerm
(
"=="compareTerm
|"!="compareTerm
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
47Revision1.92
)*
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_EQUALorEFI_IFR_NOT_EQUALop-codes.
2.12.6compare
compareTerm::=
shiftTerm
(
"<"shiftTerm
|"<="shiftTerm
|">"shiftTerm
|">="shiftTerm
)*
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_LESS_THANEFI_IFR_LESS_EQUAL,EFI_IFR_IFR_GREATER_EQUAL,orEFI_IFR_GREATER_THANop-codes.
2.12.7shift
shiftTerm::=
addMinusTerm
(
"<<"addMinusTerm
|">>"addMinusTerm
)*
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_SHIFT_LEFTorEFI_IFR_SHIFT_RIGHTop-codes.
2.12.8add/minus
addMinusTerm::=
multdivmodTerm
(
"+"multdivmodTerm
|"-"multdivmodTerm
)*
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_ADDorEFI_IFR_SUBTRACTop-codes.
2.12.9multiply/divide/modulo
multdivmodTerm::=
castTerm
(
"*"castTerm
|"/"castTerm
|"%"castTerm
)*
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
48Revision1.92
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_MULTIPLYEFI_IFR_MODULOorEFI_IFR_DIVIDEop-codes.
2.12.10castterms
castTerm::=
(
"("
(
"BOOLEAN"
|"UINT64"
|"UINT32"
|"UINT16"
|"UINT8"
)
")"
)*
atomTerm
BEHAVIORSANDRESTRICTIONSTheVFRsupportstheC-styletypeconversion.Thevaluescanbeconvertedintooneofthefollowingtypes:BOOLEAN,UINT64,UINT32,UINT16,UINT8.
2.12.11atomterms
atomTerm::=
vfrExpressionCatenate
|vfrExpressionMatch
|vfrExpressionParen
|vfrExpressionBuildInFunction
|vfrExpressionConstant
|vfrExpressionUnaryOp
|vfrExpressionTernaryOp
|vfrExpressionMap
|("NOT"atomTerm)
|vfrExpressionMatch2
2.12.11.1catenate
vfrExpressionCatenate::=
"catenate"
"("vfrStatementExpression","vfrStatementExpression")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_CATENATEop-codes.
Example
stringvarid=MyData.String,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minsize=6,
maxsize=40,
inconsistentifprompt=STRING_TOKEN(STR_CHECK),
pushthis!=catenate(stringref(STRING_TOKEN(STR_STRING_RIGHT)),
stringref(STRING_TOKEN(STR_STRING_LEFT))),
endif
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
49Revision1.92
endstring;
2.12.11.2match
vfrExpressionMatch::=
"match"
"("vfrStatementExpression","vfrStatementExpression")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_MATCHop-codes.
Example
grayoutifmatch(stringref(STRING_TOKEN(STR_PATTERN)),
stringref(STRING_TOKEN(STR_STRING)))
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=243,
endnumeric;
endif;
2.12.11.3parenthesis
vfrExpressionParen::=
"("vfrStatementExpression")"
BEHAVIORSANDRESTRICTIONSChangestheorderofthecalculation.
2.12.11.4build-infunctions
vfrExpressionBuildInFunction::=
dupExp
|ideqvalExp
|ideqidExp
|ideqvallistExp
|questionref1Exp
|rulerefExp
|stringref1Exp
|pushthisExp
|securityExp
|getExp
2.12.11.4.1dup
dupExp::=
"dup"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_DUPop-codes.
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
50Revision1.92
Example
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=0xf0,
defaultvalue=2+dup,
endnumeric;
2.12.11.4.2ideqval
ideqvalExp::=
"ideqval"
vfrQuestionDataFieldName"=="Number
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_EQ_ID_VALop-codes.
Example
grayoutifideqvalMyData.Data1==99;
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=0xf0,
endnumeric;
endif;
2.12.11.4.3ideqid
ideqidExp::=
"ideqid"
vfrQuestionDataFieldName"=="vfrQuestionDataFieldName
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_EQ_ID_IDop-codes.
Example
grayoutifideqidMyData.Data2==MyData.Data3;
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=0xf0,
endnumeric;
endif;
2.12.11.4.4ideqvallist
ideqvallistExp::=
"ideqvallist"
vfrQuestionDataFieldName"=="(Number)+
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
51Revision1.92
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_EQ_ID_LISTop-codes.
grayoutifideqvallistMyData.Data1==13;
numericname=MyNumeric,
varid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=0xf0,
endnumeric;
endif;
2.12.11.4.5questionref
questionref1Exp::=
"questionref"
"("StringIdentifier|Number")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_QUESTION_REF1op-codes.
Example
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=0xf0,
defaultvalue=questionref(MyNumeric),
endnumeric;
2.12.11.4.6ruleref
rulerefExp::=
"ruleref""("StringIdentifier")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_RULE_REFop-codes.
Example
grayoutifruleref(MyRule)==1;
stringvarid=MyData.String,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minsize=6,
maxsize=40,
endstring;
endif;
2.12.11.4.7stringref
stringref1Exp::=
"stringref""("getStringId")"
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
52Revision1.92
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_STRING_REF1op-codes.
Example
grayoutifstringref(STRING_TOKEN(STR_STRING))==1;
stringvarid=MyData.String,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minsize=6,
maxsize=40,
endstring;
endif;
2.12.11.4.8pushthis
pushthisExp::=
"pushthis"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_THISop-codes.
Example
stringvarid=MyData.String,
prompt=STRING_TOKEN(STR_PROMPT),help=STRING_TOKEN(STR_HELP),
minsize=6,
maxsize=40,
inconsistentifprompt=STRING_TOKEN(STR_CHECK),
pushthis!=stringref(STRING_TOKEN(STR_STRING))
endif
endstring;
2.12.11.4.9security
securityExp::=
"security""("guidDefinition")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_SECURITYop-codes.
Example
grayoutifNOTsecurity(EFI_GUID);
text
help=STRING_TOKEN(STR_HELP),
text=STRING_TOKEN(STR_TEXT);
endif;
2.12.11.4.10get
getExp::=
"get""("vfrStorageVarId{"|""flags""="vfrNumericFlags}")"
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
53Revision1.92
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_GETop-codes.
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,
readget(MyData.Data1);
endnumeric;
2.12.11.5constant
vfrExpressionConstant::=
"TRUE"
|"FALSE"|"ONE"
|"ONES"
|"ZERO"
|"UNDEFINED"
|"VERSION"
|Number
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_TRUEEFI_IFR_FALSE,EFI_IFR_ONEEFI_IFR_ONES,EFI_IFR_ZERO,EFI_IFR_UNDEFINED,orEFI_IFR_VERSIONop-codes.
2.12.11.6unaryoperators
vfrExpressionUnaryOp::=
lengthExp
|bitwisenotExp
|question23refExp
|stringref2Exp
|toboolExp
|tostringExp
|unintExp
|toupperExp
|tolwerExp
|setExp
2.12.11.6.1length
lengthExp::=
"length""("vfrStatementExpression")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_LENGTHop-codes.
Example
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,
defaultvalue=length(stringref(STRING_TOKEN(STR_STRING))),
endnumeric;
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
54Revision1.92
2.12.11.6.2bitwisenot
bitwisenotExp::=
"~""("vfrStatementExpression")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_BITWISENOTop-codes.
Example
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,
defaultvalue=~(length(stringref(STRING_TOKEN(STR_STRING)))),
endnumeric;
2.12.11.6.3questionrefval
question23refExp::=
"questionrefval"
"("
{
DevicePath"=""STRING_TOKEN""\("S:Number"\)"","
}
{
Uuid"="guidDefinition[Guid]","
}
vfrStatementExpression
")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_QUESTION_REF2orEFI_IFR_QUESTION_REF3op-codes.
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,
defaultvalue=questionrefval(QuestionID),
endnumeric;
2.12.11.6.4stringrefval
stringref2Exp::=
"stringrefval""("vfrStatementExpression")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_STRING_REF2op-codes.
Example
numericvarid=MyData.Data,
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
55Revision1.92
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,
defaultvalue=length(stringrefval(STR_STRING)),
endnumeric;
2.12.11.6.5boolval
toboolExp::=
"boolval""("vfrStatementExpression")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_TO_BOOLEANop-codes.
Example
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,defaultvalue=boolval(12),
endnumeric;
2.12.11.6.6stringval
tostringExp::=
"stringval"{"format""="Number","}
"("vfrStatementExpression")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_TO_STRINGop-codes.
Example
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,
defaultvalue=length(stringval(format=8,12)),
endnumeric;
2.12.11.6.7unintval
unintExp::=
"unintval""("vfrStatementExpression")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_TO_UINTop-codes.
Example
numericvarid=MyData.Data,
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
56Revision1.92
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,
defaultvalue=unintval(12*3),
endnumeric;
2.12.11.6.8toupper
toupperExp::=
"toupper""("vfrStatementExpression")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_TO_UPPERop-codes.
Example
grayoutiflength(toupper(stringref(STRING_TOKEN(STR_STRING))))==1;
stringvarid=MyData.String,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minsize=6,
maxsize=40,
endstring;
endif;
2.12.11.6.9tolower
tolwerExp::=
"tolower""("vfrStatementExpression")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_TO_LOWERop-codes.
grayoutiflength(tolower(stringref(STRING_TOKEN(STR_STRING))))==2;
stringvarid=MyData.String,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minsize=6,
maxsize=40,
endstring;
endif;
2.12.11.6.10set
setExp::=
"set"
"("
vfrStorageVarId{"|""flags""="vfrNumericFlags}","
vfrStatementExpression
")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_SETop-codes.
Example
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
57Revision1.92
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,
writeset(MyData.Data1,10);
endnumeric;
2.12.11.7ternaryoperators
vfrExpressionTernaryOp::=
conditionalExp
|findExp
|midExp
|tokenExp
|spanExp
2.12.11.7.1cond
conditionalExp::=
"cond"
"("
vfrStatementExpression1
"?"
vfrStatementExpression2
":"
vfrStatementExpression3
")"
BEHAVIORSANDRESTRICTIONSIf(Expr1)thenx=Expr3elseExpr2
GeneratesEFI_IFR_CONDITIONALop-codes.
Example
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,
defaultvalue=cond(2==1?5:10),
endnumeric;
2.12.11.7.2find
findExp::=
"find"
"("
findFormat("|"findFormat)*
","
vfrStatementExpression
","
vfrStatementExpression
","
vfrStatementExpression
")"
findFormat::=
"SENSITIVE"
|"INSENSITIVE"
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
58Revision1.92
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_FINDop-codes.
Example
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,
defaultvalue=
find(INSENSITIVE,(stringref(STRING_TOKEN(STR_STRING1))),
(stringref(STRING_TOKEN(STR_STRING2))),1),
endnumeric;
2.12.11.7.3mid
midExp::=
"mid"
"("
vfrStatementExpression
","
vfrStatementExpression
","
vfrStatementExpression
")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_MIDop-codes.
Example
grayoutiflength(mid(stringref(STRING_TOKEN(STR_STRING)),6,8))==1;
stringvarid=MyData.String,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minsize=6,
maxsize=40,
endstring;
endif;
2.12.11.7.4tok
tokenExp::=
"token"
"("
vfrStatementExpression
","
vfrStatementExpression
","
vfrStatementExpression
")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_TOKENop-codes.
Example
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
59Revision1.92
grayoutiflength(token(stringref(STRING_TOKEN(STR_STRING1)),
stringref(STRING_TOKEN(STR_STRING2)),0))==2;
stringvarid=MyData.String,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minsize=6,
maxsize=40,
endstring;
endif;
2.12.11.7.5span
spanExp::=
"span"
"("
"flags""="spanFlags("|"spanFlags)*
","
vfrStatementExpression
","
vfrStatementExpression
","
vfrStatementExpression
")"
spanFlags::=
Number
|"LAST_NON_MATCH"
|"FIRST_NON_MATCH"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_SPANop-codes.
Example
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,
defaultvalue=span(flags=LAST_NON_MATCH,
stringref(STRING_TOKEN(STR_STRING1)),
stringref(STRING_TOKEN(STR_STRING2)),0),
endnumeric;
2.12.11.8map
vfrExpressionMap::=
"map"
"("
vfrStatementExpression
":"
(
vfrStatementExpression
","
vfrStatementExpression
";"
)*
")"
BEHAVIORSANDRESTRICTIONS
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
60Revision1.92
GeneratesEFI_IFR_MAPop-codes.
Example
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=255,
defaultvalue=map(pushthis:0,10;1,2;3,5;6,8;),
endnumeric;
2.12.11.9match2
vfrExpressionMatch::=
"match2"
"("
vfrStatementExpressionPattern
","
vfrStatementExpressionString
","
guidDefinition[Guid]
")"
BEHAVIORSANDRESTRICTIONSGeneratesEFI_IFR_MATCH2op-codes.
Example
grayoutifmatch2(stringref(STRING_TOKEN(STR_PATTERN)),
stringref(STRING_TOKEN(STR_STRING)),
PERL_GUID);
numericvarid=MyData.Data,
prompt=STRING_TOKEN(STR_PROMPT),
help=STRING_TOKEN(STR_HELP),
minimum=0,
maximum=243,
endnumeric;
endif;
2.12VFRExpressionStatementDefinitionEDKIIVFRProgrammingLanguageSpecification
61Revision1.92