VFR file format

来源:互联网 发布:台湾中央曰报网络报 编辑:程序博客网 时间:2024/04/29 15:16

Visual Forms Representation File Format

(Redirected from Visual Forms Representation Syntax)

The file is formatted as UTF-8 encoded text. Comments are C++ ('//') style and all text to the end of the line will be ignored.

Each file contains two parts. The first part, which is optional, contains data definitions and #pragma commands. The second part contains the form set definition. There is only one form set allowed.

vfr-syntax    := data-declarations formset

Contents

[hide]
  • 1Syntax
    • 1.1action
    • 1.2banner
    • 1.3bitwisenot
    • 1.4boolval
    • 1.5catenate
    • 1.6checkbox
    • 1.7cond
    • 1.8constant-value
    • 1.9data-declarations
    • 1.10data-type
    • 1.11date
    • 1.12default
    • 1.13defaultstore
    • 1.14#define
    • 1.15disableif
    • 1.16dup
    • 1.17efivarstore
    • 1.18expression
    • 1.19find
    • 1.20form
    • 1.21formset
    • 1.22goto
    • 1.23grayoutif
    • 1.24ideqid
    • 1.25ideqval
    • 1.26ideqvallist
    • 1.27image
    • 1.28#include
    • 1.29inconsistentif
    • 1.30label
    • 1.31length
    • 1.32match
    • 1.33mid
    • 1.34namevaluevarstore
    • 1.35nosubmitif
    • 1.36numeric
    • 1.37oneof
    • 1.38option
    • 1.39orderedlist
    • 1.40password
    • 1.41pragma
    • 1.42pushthis
    • 1.43question-option-list
    • 1.44question-tag-list
    • 1.45questionref
    • 1.46questionrefval
    • 1.47refresh
    • 1.48resetbutton
    • 1.49rule
    • 1.50ruleref
    • 1.51security
    • 1.52span
    • 1.53storage-id
    • 1.54string
    • 1.55stringref
    • 1.56stringrefval
    • 1.57stringval
    • 1.58struct
    • 1.59subtitle
    • 1.60text
    • 1.61time
    • 1.62tolower
    • 1.63tok
    • 1.64toupper
    • 1.65uintval
    • 1.66value
    • 1.67varstore
    • 1.68varstoredevice

Syntax

action

Action buttons are buttons which cause a pre-defined configuration string to process immediately. There is no storage directly associated with the button.

Syntax

action   [ name = identifier , ]    [ questionid = uint , ]    prompt = string ,    help = string ,   [ flags = action-flags , ]    config = string ,  question-tag-listendaction ; 
action-flags := action-flags | action-flag |                action-flag |                <nothing>action-flag  := READ_ONLY |                INTERACTIVE |                OPTIONS_ONLY |                RESET_REQUIRED

Attributes

AttributeDescriptionname questionidA 16-bit unsigned integer which uniquely identifies the question within the form set in which it appears. The question identifier, along with the device path and form set identifier, uniquely identifies a question within a system.promptA string identifier that specifies the string for the question prompt.helpA string identifier that specifies the string for the question extended help text.flagsZero or more keywords, separated by a | character.
  • READ_ONLY. The question is read-only. The value cannot be changed and cannot be selected.
  • INTERACTIVE. The callback associated with this form will be called.
  • OPTIONS_ONLY. Only the values specified by nested option operators can be selected by the user.
  • RESET_REQUIRED. A system reset is required in order for changes in this question's value to take effect.
configThe string (in <ConfigResp> format) which will be processed usingRoutConfig() when the button is pressed.

Description
This operator creates an action question. When the question is selected, the configuration string specified byconfig will be processed. If config is not specified, then no no configuration string will be processed. This is useful when using an action button only for the callback.

If the question is marked read-only then the action question cannot be selected.

This operator corresponds to the IFR EFI_IFR_ACTION operator.

Example

action   prompt = STRING_TOKEN(STR_ACTION_TEXT),   help = STRING_TOKEN(STR_ACTION_HELP),   flags = INTERACTIVE | 0x22  config = STRING_TOKEN(STR_ACTION_CONFIG), endaction;

banner

Syntax

banner    title = string , line uint16 , align align-flags ;   title = string , timeout = uint16 ;
align-flags := left | center | right

Description
This operator does not correspond to any IFR operator and is ignored by the Forms Browser.

Example

banner   title = STRING_TOKEN(STR_BANNER_TEXT),   line 1,   align left; banner   timeout = 100;

bitwisenot

Bitwise NOT (~) operation on an unsigned integer expression.

Syntax

bitwisenot ( expression1 )


Parameters

ParameterDescriptionexpression1Expression which evaluates to an unsigned integer.


Description
This operator performs a bitwise NOT on an unsigned integer expression.

If the expression cannot be evaluated as an unsigned integer, return Undefined. Otherwise, zero-extend the unsigned integer to 64-bits, bitwise-NOT it and return it.

This operator corresponds to the IFR EFI_IFR_BITWISE_NOT operator.

boolval

Converts the unsigned integer, string or buffer expression to a boolean.

Syntax

boolval ( expression1 )


Parameters

ParameterDescriptionexpression1Expression to convert


Description
This operator converts expression1 to a boolean value. If expression1 evaluates as Undefined then it returns Undefined.

If converting from an unsigned integer expression, zero will be converted to FALSE and any other value will be converted to TRUE.

If converting from a string, if the string (case-insensitive) is "true" then return TRUE. If it (case-insensitive) is "false" then return FALSE. Otherwise return Undefined.

If converting from a buffer, if the buffer is all zeroes, then return FALSE. Otherwise return TRUE.

If converting from any other data type, return Undefined.

This operator corresponds to the IFR EFI_IFR_TO_BOOLEAN operator.


catenate

Syntax

catenate ( expression1 , expression2 )

Parameters

ParameterDescriptionexpression1, expression2String or buffer expression.


Description
If the first or second expression cannot be evaluated as a string or a buffer, return Undefined. If the first or second expressions are of different types, the return Undefined.

If the first and second expressions are strings, return a new string which contains the contents of the first string (without the NULL terminator) followed by the contents of the second string.

If the first and second expressions are buffers, return a new buffer which contains the contents of the first buffer followed by the contents of the second buffer.

This operator corresponds to the EFI_IFR_CATENATE operator.

checkbox

Boolean questions are those that allow a choice between true and false. The question’s value is Boolean. In general, construct questions so that the prompt text asks questions resulting in ‘yes/enabled/on’ is ‘true’ and ‘no/disabled/off’ is ‘false’.

Boolean questions may be displayed as a check box, two radio buttons, a selection list, a list box, or a drop list box.

Syntax

checkbox     [ name = identifier , ]    [ varid = storage-id , ]     [ questionid = uint , ]     prompt = string ,     help = string ,     [ flags = check-box-flags , ]     [ key = uint , ] question-option-list endcheckbox ;
checkbox-flags := checkbox-flags | checkbox-flag |                   checkbox-flag |                  <nothing>checkbox-flag  := uint8 |                   CHECKBOX_DEFAULT |                   CHECKBOX_DEFAULT_MFG |                  READ_ONLY |                   INTERACTIVE |                   OPTIONS_ONLY |                   RESET_REQUIRED


Attributes

AttributeDescriptionname varid questionidThe unique value that uniquely identifies the question within the form set. The question identifier, along with the device path and form set identifier uniquely identify a question within the system. The value of zero is reserved.promptA string identifier that specifies the string for the question prompt.helpA string identifier that specifies the string for the question extended help text.flagsZero or more keywords or integers, separated by the '|' character. The following keywords are supported:
  • CHECKBOX_DEFAULT. If specified, the standard default for the checkbox is TRUE. Otherwise, it is FALSE. If there is a nestedoption or default which specifies the standard default value for this checkbox question, then this flag is ignored.
  • CHECKBOX_DEFAULT_MFG. If specified, the manufacturing default for the checkbox is TRUE. Otherwise, it is false. If there is a nestedoption or default which specifies the manufacturing default value for this checkbox question, then this flag is ignored.
  • READ_ONLY. The question is read-only. The value cannot be changed and cannot be selected.
  • INTERACTIVE. The callback associated with this form will be called.
  • OPTIONS_ONLY. Only the values specified by nested option operators can be selected by the user.
  • RESET_REQUIRED. A system reset is required in order for changes in this question's value to take effect.
key 

Description
Creates a boolean checkbox question and adds it to the current form. The checkbox has two values: FALSE if the box is not checked and TRUE if it is.

There are three ways to specify defaults for this question: the Flags field (lowest priority), one or more nestedoption operators or a nested default operator (highest priority).

An image may be associated with the question using a nested image operator.

This operator corresponds to the IFR EFI_IFR_CHECKBOX operator.

cond

Return one of two expressions, depending on the value of a third expression.


Syntax

cond ( expression1 ? expression2 : expression3 )


Parameters

ParameterDescriptionexpression1Expression which evaluates to a boolean.expression2, expression3Normal expressions


Description
If the first expression cannot be evaluated as a boolean, return Undefined.

If the first expression evaluates to TRUE, return the third expression. Otherwise, return the second expression.

This operator corresponds to the IFR EFI_IFR_CONDITIONAL operator.

constant-value

Represents a constant value of integer or string, a constant value field can a one of the following.

Syntax

constant-value := uint |                   TRUE |                   FALSE |                   ONE |                   ONES |                   ZERO |                   uint : uint : uint |                   uint / uint / uint |                  string

Description
This operator will generate the EFI_IFR_UINT8, EFI_IFR_UINT16, EFI_IFR_UINT32 or EFI_IFR_UINT64 operators for unsigned integers.

This operator will generate the EFI_IFR_ZERO, EFI_IFR_ONE or EFI_IFR_ONES operators for constants.

data-declarations

Declare data structures and data types.

Syntax

data-declarations     := data-declarations data-declaration |                         data-declaration |                          <nothing>data-declaration      := pragma                         structguid                  := { uint32 , uint16 , uint16 , [ { ] uint8, uint8, uint8, uint8,                          uint8, uint8, uint8, uint8 [ } ] }optional-array-suffix := [ size ] | <nothing>

Description
This section declares zero or more data types to be used later with the form sets. For the most part, these are used for declaring data storage.

data-type

Syntax

data-type          := BOOLEAN |                       CHAR16 |                       EFI_HII_DATE |                       EFI_HII_TIME |                       EFI_STRING_ID |                       UINT8 |                       UINT16 |                       UINT32 |                       UINT64 |                       identifier


date

Date questions allow modification of part or all of a standard calendar date. The format of the date display depends on the Forms Browser and any localization.

Syntax

date   [ name = identifier , ]   [ varid = storage-id , ]    [ questionid = uint , ]    prompt = string ,    help = string ,   [ flags = date-flags , ]  question-option-list enddate ;
date-flags := date-flags | date-flag |              date-flag |              <nothing>date-flag  := YEAR_SUPPRESS |              MONTH_SUPPRESS |              DAY_SUPPRESS |              STORAGE_NORMAL |              STORAGE_TIME |              STORAGE_WAKEUP |              uint8

Attributes

AttributeDescriptionpromptA string identifier that specifies the string for the question prompt.helpA string identifier that specifies the string for the question extended help text.flagsZero or more keywords separated by the | character.
  • YEAR_SUPPRESS. The year is not displayed (or optionally, not editable)
  • MONTH_SUPPRESS. The month is not displayed (or optionally, not editable)
  • DAY_SUPPRESS. The day is not displayed (or optionally, not editable)
  • STORAGE_NORMAL. The date is stored using the EFI_HII_DATE format. May not be combined with STORAGE_TIME or STORAGE_WAKEUP.
  • STORAGE_TIME. The date is stored using SetTime(). May not be combined with STORAGE_NORMAL or STORAGE_WAKEUP.
  • STORAGE_WAKEUP. The date is stored using SetWakeupTime(). May not be combined with STORAGE_NORMAL or STORAGE_TIME.

Description
This operator corresponds to the IFR EFI_IFR_DATE operator.

default

Provides a default value for the current question.

Syntax

default value = expression ,  [defaultstore = identifier ,] default = constant-value , [defaultstore = identifier ,] 

Attributes

AttributeDescriptionvalueAn expression that provides the default value for the current question.constant-valueA constant value that provides the default value for the current question.defaultstoreA default store identifier that corresponds to a previously defined defaultstore. If none is specified, then 0 is used.

Description
This operator specifies a default value for the current question. The default value is either provided in the opcode itself (Value) or using a nestedvalue operator.

This operator corresponds to the IFR EFI_IFR_DEFAULT operator.

defaultstore

Default stores group together different types of default settings (normal, manufacturing, etc.) and give them a name.

Syntax

defaultstore identifier ,    prompt = string    [ , attribute = uint16 ] ;

Attributes

AttributeDescriptionidentifierA C-style identifier which can used to refer to this default store.promptA string identifier that specifies the string for the user-readable name of the default store.attributeAn optional default store identifier. If none is specified, then EFI_HII_DEFAULT_CLASS_STANDARD is used.

Description
This operator declares a class of defaults, which can then have question default values associated with.

This operator corresponds to the IFR EFI_IFR_DEFAULTSTORE operator.

#define

Assigns a meaningful name to a constant.

Syntax

#define identifier value...

Description
Similar to the C preprocessor operator of the same name, this operator can only handle simple substitution.

disableif

Disable all nested forms or questions if the expression evaluates to TRUE.

Syntax

disableif expression ;  forms/questions/statementsendif ;

Description
All nested statements, questions, options or expressions will not be processed if the expression appearing as the first nested object evaluates to TRUE.

When this opcode appears under a form, the expression may rely on question values in the same form which are not inside of adisableif expression.

This operator corresponds to the IFR EFI_IFR_DISABLE_IF operator.

dup

Duplicate the top value on the expression stack.

Syntax

dup

Description
This operator corresponds to the IFR EFI_IFR_DUP operator.

efivarstore

Creates a variable storage short-cut for EFI variable storage.

Syntax

efivarstore identifier ,    attribute = uint32 ,    name      = string ,    varsize   = uint32 ,    guid      = guid ;

Attributes

AttributeDescriptionattributeEFI variable attribute. Can be zero or more numbers, separated by a | character.nameThe string identifier of the string for the EFI variable name of the EFI variable which will hold question values.varsizeAn unsigned integer that specifies the maximum size of the EFI variable which will hold question values.guidThe GUID of the EFI variable name of the EFI variable which will hold question values.

Description
This operator describes an EFI Variable Variable Store within a form set. The Guid specified here and the name specified by VariableName in the question’s header will be used withGetVariable() and SetVariable(). A question can select this variable store by setting the VarStoreId field in its question header.

This operator corresponds to the IFR EFI_IFR_VARSTORE_EFI operator.

Example

efivarstore EfiVarStore,  attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS,  name = STRING_TOKEN(STR_TOKEN_NULL),  varsize = 1,  guid = GUID;

expression

Combinations of build-in functions and arithmetic, logic, shift, comparison, cast operators. Supported operators are: +, -, *, /, %, |, &, and, or, not, ==, !=, <, <=, >, >=, <<, >>, (TYPECAST).

expression  := expr1 expr1       := expr2 or expr1               expr2 || expr1expr2       := expr3 and expr2               expr3 && expr2expr3       := expr4 | expr3expr4       := expr5 & expr4expr5       := expr6 == expr5               expr6 != expr5expr6       := expr7 < expr6               expr7 > expr6               expr7 <= expr6               expr7 >= expr6expr7       := expr8 << expr7               expr8 >> expr7expr8       := expr9 + expr8               expr9 - expr8expr9       := expr10 * expr9               expr10 / expr9               expr10 % expr9expr10      := (typecast) expr10               expr1expr11      := not expr11               ! expr11               expr12expr12      := ( expression ) |               bitwisenot |               boolval |               catenate |               cond |               constant-value |               dup |               find |               ideqid   |               ideqval |               ideqvallist |               length |               match |               mid |               questionref |               questionrefval |               pushthis |               ruleref |               security |               span |               stringref |               stringrefval |               stringval |               tok |               tolower |               toupper |               unintval
typecast    :=  BOOLEAN |                UINT64 |                UINT32 |                UINT16 |                UINT8

Description
The expression is a C-style expression, with C-style operator precedence. The following table describes each of the C-style operators:

OperatorOperationDescriptionorLogical ORCorresponds to the IFR EFI_IFR_OR operator.andLogical ANDCorresponds to the IFR EFI_IFR_AND operator. In C/C++ the right-side operand will not be evaluated if the left-side operand evaluates to FALSE. However, in VFR, both sides will be evaluated in all cases. Bitwise ORCorresponds to the IFR EFI_IFR_BITWISE_OR operator.&Bitwise ANDCorresponds to the IFR EFI_IFR_BITWISE_AND operator.==EqualCorresponds to the IFR EFI_IFR_EQUAL operator.!=Not EqualCorresponds to the IFR EFI_IFR_NOT_EQUAL operator.>Greater ThanCorresponds to the IFR EFI_IFR_GREATER_THAN operator.>=Greater Than or EqualCorresponds to the IFR EFI_IFR_GREATER_EQUAL operator.<Less ThanCorresponds to the IFR EFI_IFR_LESS_THAN operator.<=Less Than or EqualCorresponds to the IFR EFI_IFR_LESS_EQUAL operator.<<Shift LeftCorresponds to the IFR EFI_IFR_SHIFT_LEFT operator.>>Shift RightCorresponds to the IFR EFI_IFR_SHIFT_RIGHT operator.+AddCorresponds to the IFR EFI_IFR_ADD operator.-SubtractCorresponds to the IFR EFI_IFR_SUBTRACT operator.*MultiplyCorresponds to the IFR EFI_IFR_MULTIPLY operator./DivideCorresponds to the IFR EFI_IFR_DIVIDE operator.%ModuloCorresponds to the IFR EFI_IFR_MODULO operator.

find

Syntax

find ( find-flags, expression , expression , expression )find-flags := find-flags | find-flag |              find-flag |              <nothing>find-flag  := SENSITIVE |              INSENSITIVE

Parameters

ParameterDescriptionexpression1A string identifier that specifies the string to search.expression2A string identifier that specifies the string to compare with.expression3A zero-based index into the string returned by expression1 which specifies the character from which to begin the search.flagsA keyword which specifies whether the search is case-sensitive (SENSITIVE) or case-insensitive (INSENSITIVE).

Description
This operator returns the zero-based index of a found sub-string within a string, starting at the specified character.

If expression1 and expression2 cannot be evaluated as a string, return Undefined. If theexpression3 cannot be evaluated as an unsigned integer, return Undefined.

If the string specified by expression2 is found within expression1 at a character index greater than or equal toexpression3, return the zero-based index of the found string. If the string is not found orexpression3 specifies a value which is greater-than or equal to the length of theexpression1, return 0xFFFFFFFFFFFFFFFF.

This operator corresponds to the IFR EFI_IFR_FIND operator.

form

Definition of a single form. Forms are logically-related groups of statements and questions designed to be displayed together.

Syntax

form    formid = uint16,    title = STRING_TOKEN(uint16) ;  image  locked  rules  default  subtitle  text  resetbutton  checkbox  action  goto  date  numeric  oneof  string  password  orderedlist  time  disableif  suppressif  grayoutif   label  bannerendform;

Attributes

AttributeDescriptionformidA 16-bit unsigned integer which acts as the unique identifier for this form within the form set.titleA string identifier that specifies the form's title.

Description
This operator creates a form. A form is the encapsulation of a browser page.

It correponds to the IFR EFI_IFR_FORM operator.

formset

Declares the one and only form set in the file.

Syntax

formset   guid     = guid,   title    = STRING_TOKEN(uint16),   help     = STRING_TOKEN(uint16),   class    = class-keywords, OPTIONAL  subclass = subclass-keyword  form  image  varstore  efivarstore  namevaluevarstore  defaultstore  disableif  labelendformset ;class-keywords   := class-keywords | class-keyword |                    class-keyword |                    <nothing>class-keyword    := NON_DEVICE  | DISK_DEVICE  | VIDEO_DEVICE  |                    NETWORK_DEVICE | INPUT_DEVICE  | ONBOARD_DEVICE  |                    OTHER_DEVICE | uint16subclass-keyword := SETUP_APPLICATION | GENERAL_APPLICATION | FRONT_PAGE |                    SINGLE_USE | uint16
AttributesDescriptionguidA GUID which uniquely identifies this form set.titleThe string which specifies the user-readable title for this form set.helpThe string which specifies the user-readable extended description of this form set.classZero or more keywords which identify the classification of this form. These can be used by aForms Browser to organize the forms for user browsing.subclassZero or one keywords which identify the sub-classification fo this form. This can be used by aForms Browser to organize the forms for user browsing.

Description
This operator declares the one and only form set.

It corresponds to the IFR operator EFI_IFR_FORM_SET.

goto

Redirect the execution to another formset, or any form inside the current formset. Since it supports many target types, there are 4 kinds statements to describe the target. All of them share the same attribute statements.

goto    devicepath    = string ,    formsetguid   = guid  ,    formid        = uint ,    question      = uint ,    [ name     = identifier ,]   [ questionid = uint ,]    prompt = string ,    help = string    [, image = image ]   [, locked ]   [, flags' = goto-flags]   [, key = uint] ;
goto    formsetguid = guid ,    formid = uint,    question = uint    [ name = identifier ,]   [ questionid = uint ,]    prompt = string ,    help = string    [, image = image ]   [, locked ]   [, flags = goto-flags]   [, key = uint] ;
goto    formid = uint,    question = uint    [ name = identifier ,]   [ questionid = uint ,]    prompt = string ,    help = string    [, image = image ]   [, locked ]   [, flags = goto-flags]   [, key = uint] ;
goto uint    [ name = identifier ,]   [ questionid = uint ,]    prompt = string ,    help = string    [, image = image ]   [, locked ]   [, flags = goto-flags]   [, key = uint] ; 
goto-flags := goto-flags goto-flag |              goto-flag |              <nothing>goto-flag  := READ_ONLY |               INTERACTIVE |               OPTIONS_ONLY |               RESET_REQUIRED |               uint8


Attributes

AttributeDescriptionformsetguidThe form set to which this link is referring. If this attribute is not present or nil, then the link is in the current form set.formidThe form to which this link is referring. If this attribute is not present or zero, then the link is on the current form.questionidThe question on the form to which this link is referring. If this attribute field is not present or the value is zero, then the link refers to the top of the form.promptA string identifier that specifies the string for the question prompt.helpA string identifier that specifies the string for the question extended help text.flagsZero or more flags, separated by |
  • READ_ONLY. The question is read-only. The value cannot be changed and cannot be selected.
  • INTERACTIVE. The callback associated with this form will be called.
  • OPTIONS_ONLY. Only the values specified by nested option operators can be selected by the user.
  • RESET_REQUIRED. A system reset is required in order for changes in this question's value to take effect.

Description
Creates a user-selectable link to a form or a question on a form. There are several forms of this operator.

If the question is marked read-only then the action question cannot be selected.

This operator corresponds to the IFR EFI_IFR_REF operator.

Examples

goto 1,    prompt = STRING_TOKEN(STR_GOTO_FORM1),    help = STRING_TOKEN(STR_GOTO_HELP); 
goto 0x1234,    prompt = STRING_TOKEN(STR_GOTO_DYNAMIC2),    help = STRING_TOKEN(STR_GOTO_HELP),    flags = INTERACTIVE | LATE_CHECK,    key = 0x1235;

grayoutif

Creates a group of statements which are conditionally grayed-out.

Syntax

grayoutif expression   statements/questions/optionsendif ;

Description
This operator causes nested statements or questions to be grayed out (not selectable and visually distinct) if the expression appearing as the first nested object evaluates to TRUE.

Different browsers may support this option to varying degrees. For example, HTML has no similar construct so it may not support this facility.

This operator corresponds tothe IFR EFI_IFR_GRAY_OUT_IF operator.

ideqid

Returns TRUE if two questions have the same value or FALSE if their values differ.

Syntax

ideqid data-field-name1 == data-field-name2 

Description
This operator evaluates whether the two questions specified by data-field-name1 anddata-field-name2 are equal and, if so, return TRUE. Otherwise, return FALSE. If the two question values cannot be converted to compatibile types, then return Undefined.

This operator corresponds to the IFR EFI_IFR_EQ_ID_ID operator.

ideqval

Return TRUE if a question’s value is equal to a 16-bit unsigned integer, otherwise FALSE.

Syntax

ideqval data-field-name == uint16

Description
This operator evaluates the value of the specified question (data-field-name). If the specified question cannot be evaluated as an unsigned integer, then return Undefined. If they are equal, return TRUE. Otherwise return FALSE.

This operator corresponds to the IFR EFI_IFR_EQ_ID_VAL operator.

ideqvallist

Return TRUE if the question’s value appears in a list of unsigned integers.

Syntax

ideqvallist data-field-name == uint16 [ uint16... ]

Attributes

AttributeDescriptiondata-field-nameName of the questionuint16One or more 16-bit unsigned integers to compare against.

Description
This operator evaluates the value of the specified question (data-field-name). If the specified question cannot be evaluated as an unsigned integer, then return Undefined. If the value is equal to one of theuint16 values, , then return TRUE. Otherwise return FALSE.

This operator corresponds to the IFR EFI_IFR_EQ_ID_LIST operator.

image

An image, usually used to create an image for a statement or question.

Syntax

image = image 

Attributes

AttributeDescriptionimageAn image identifier that specifies the image to associate with the parent statement, question, form or option.

Description
This operator may be nested within question, statement, form or option in order to associate an image with them.

This operator corresponds to the IFR EFI_IFR_IMAGE operator.

#include

Includes the specified file at the current location in the translation unit.

Syntax

#include string-literal

Example

#include “C:\Source\ DriverSampleStrDefs.h”

inconsistentif

Creates a validation expression and error message for a question.

Syntax

inconsistentif   prompt = string  ,   expression ,   statementsendif

Attributes

AttributeDescriptionpromptA string identifier that specifies the error message text to display when expression evaluates to TRUE.expressionThe expression to evaluate after a question value is changed.

Description
This operator specifies an expression to use when validating new question values. If the expression evaluates to TRUE, then the prompt string may be displayed and the new value is disallowed. If the expression evaluates to FALSE, then the new value is allowed. This does not replace other error checking (such as minimum and maximum for numeric).

The user should not be allowed to submit the results of a form with inconsistent values.

This operator corresponds to the IFR EFI_IFR_INCONSISTENT_IF operator.

label

Creates a label which can be used for building IFR forms at run-time.

Syntax

label uint16 ;

length

Returns the length of a string (in characters) or a buffer (in bytes).

Syntax

length ( expression1 )


Parameters

ParameterDescriptionexpression1Expression which evaluates to a string or buffer


Description
If the expression cannot be evaluated as a buffer or string, then return Undefined.If the expression can be evaluated as a buffer, return the length of the buffer, in bytes.If the expression can be evaluated as a string, return the length of the string, in characters.

This operator corresponds to the IFR EFI_IFR_LENGTH operator.

match

Returns whether a string matches a pattern.

Syntax

match ( expression1 , expression2 )

Parameters

ParameterDescriptionexpression1Evaluates to the string to searchexpression2Evaluates to the pattern. The format of the pattern is specified in MetaiMatch()

Description
If expression1 or expression2 cannot be evaluated as a string, then return Undefined.

The two strings are processed using MetaiMatch(). If the result is TRUE, then TRUE is returned. If the result is FALSE, then FALSE is returned.

This operator corresponds to the IFR EFI_IFR_MATCH operator.

mid

Extract a portion of a buffer or a string.

Syntax

mid ( expression1 , expression2 , expression3 )

Parameters

ParameterDescriptionexpression1Evaluates as the string or buffer to extract from.expression2Zero-based index of the first character in the string or first byute in the buffer to extract.expression3Number of characters in the string or number of bytes in the buffer to extract.


Description
If expression1 cannot be evaluated as a string or a buffer, return Undefined. Ifexpression2 or expression3 cannot be evaluated as unsigned integers, return Undefined.

If expression1 is a string, then expression2 is the 0-based index of the first character in the string to extract andexpression3 is the length of the string to extract. If expression3 is zero orexpression2 is greater than or equal the string’s length, then return an empty string. Return the extracted string . Ifexpression3 would cause extraction to extend beyond the end of the string, then only the characters up to and include the last character of the string are returned.

If expression1 is a buffer, then expression2 is the 0-based index of the first byte in the buffer to extract andexpression3 is the length of the buffer to extract. If expression3 is zero or the second expression is greater than the buffer’s length, then return an empty buffer. Return the extracted buffer . Ifexpression3 would cause extraction to extend beyond the end of the buffer, then only the bytes up to and include the last byte of the buffer are returned.

This operator corresponds to the IFR EFI_IFR_MID operator.

namevaluevarstore

Create a variable storage short-cut for name/value storage.

Syntax

namevaluevarstore identifier ,    name = string , [ name = string , ...]   guid = guid ;


Description
This operator corresponds to the IFR EFI_IFR_VARSTORE_NAME_VALUE operator.

Example

namevaluevarstore NameValueVarStore,  name = STRING_TOKEN(STR_NAMEVALUE_TABLE_ITEM1),  name = STRING_TOKEN(STR_NAMEVALUE_TABLE_ITEM2),  name = STRING_TOKEN(STR_NAMEVALUE_TABLE_ITEM3),  guid = GUID;

nosubmitif

Creates a validation expression and error message for a question.

Syntax

nosubmitif   prompt = string ,   expression,   statements/questionsendif   

Attributes

AttributeDescriptionpromptThe string identifier that specifies the error message to display if the expression is TRUE.expressionExpression to evaluate prior to submitting the values when the form is closed.

Description
This operator creates a conditional expression which will be evaluated when the form is submitted. If the conditional evaluates to TRUE, then the error message will be displayed to the user and the user will be prevented from submitting the form.

This operator corresponds to the IFR EFI_IFR_NO_SUBMIT_IF operator.

numeric

Number questions allow modification of an integer value up to 64-bits. Number questions can also specified pre-defined options.

Syntax

numeric    [ name = identifier, ]   [ varid = storage-id, ]   [ questionid = uint, ]    prompt = string ,    help = string ,    [ flags = numeric-flags , ]    [ key = uint , ]   [ minimum = uint , maximum = uint , [ step = uint , ]] question-option-listendnumeric ;
numeric-flags := numeric-flags | numeric-flag |                 numeric-flag |                 <nothing>numeric-flag  := DISPLAY_INT_DEC |                 DISPLAY_UINT_DEC |                  DISPLAY_UINT_HEX |                 NUMERIC_SIZE_1 |                 NUMERIC_SIZE_2 |                 NUMERIC_SIZE_4 |                 NUMERIC_SIZE_8 |                 READ_ONLY |                 INTERACTIVE |                  OPTIONS_ONLY |                 RESET_REQUIRED |                 uint8

Attributes

AttributeDescriptionpromptA string identifier that specifies the string for the question prompt.helpA string identifier that specifies the string for the question extended help text.flagsZero or more keywords, separated by the | character.
  • DISPLAY_INT_DEC. The question's value is displayed as a signed decimal value.
  • DISPLAY_UINT_DEC. The question's value is displayed as an unsigned decimal value.
  • DISPLAY_UINT_HEX. The question's value is displayed as an unsigned hexadecimal value.
  • NUMERIC_SIZE_1. The question's storage is forced to an unsigned 8-bit integer. Used with Name/Value variable stores, since the variable sizes are not specified.
  • NUMERIC_SIZE_2. The question's storage is forced to an unsigned 16-bit integer. Used with Name/Value variable stores, since the variable sizes are not specified.
  • NUMERIC_SIZE_4. The question's storage is forced to an unsigned 32-bit integer. Used with Name/Value variable stores, since the variable sizes are not specified.
  • NUMERIC_SIZE_8. The question's storage is forced to an unsigned 64-bit integer. Used with Name/Value variable stores, since the variable sizes are not specified.
  • READ_ONLY. The question is read-only. The value cannot be changed and cannot be selected.
  • INTERACTIVE. The callback associated with this form will be called.
  • OPTIONS_ONLY. Only the values specified by nested option operators can be selected by the user.
  • RESET_REQUIRED. A system reset is required in order for changes in this question's value to take effect.

Description
This operator creates a numeric question, where the user must select a value or one of the nested options. This is identical tonumeric. There are two ways to specify defaults for this question: one or more nestedoptions (lowest priority) or a nested default (highest priority).

An image may be associated with the option using a nested image operator.

This operator corresponds to the IFR EFI_IFR_NUMERIC operator.

Example

numeric varid = MyIfrNVData.Field16, prompt = STRING_TOKEN(STR_NUMERIC_PROMPT),   help = STRING_TOKEN(STR_NUMERIC_HELP0), flags = INTERACTIVE,   minimum = 0, maximum = 0x99, step = 0, default = 20,    inconsistent if prompt = STRING_TOKEN(STR_ERROR_POPUP),        ideqval MyIfrNVData.Field16 == 99 ideqvallist MyIfrNVData.Field16 == 1 3 5 6     endif endnumeric;

oneof

Makes a one-of choice from a list. Syntax

oneof    [ name = identifier, ]   [ varid = storage-id, ]   [ questionid = uint, ]    prompt = string ,    help = string ,    [ flags = oneof-flags , ]    [ key = uint , ]   [ minimum = uint , maximum = uint , [ step = uint , ]] question-option-listendoneof ;
oneof-flags   := numeric-flags | numeric-flag |                 numeric-flag |                 <nothing>
oneof-flag    := DISPLAY_INT_DEC |                 DISPLAY_UINT_DEC |                  DISPLAY_UINT_HEX |                 READ_ONLY |                 INTERACTIVE |                  OPTIONS_ONLY |                 RESET_REQUIRED |                 uint8

Attributes

AttributeDescriptionpromptA string identifier that specifies the string for the question prompt.helpA string identifier that specifies the string for the question extended help text.flagsZero or more keywords, separated by the | character.
  • DISPLAY_INT_DEC. The question's value is displayed as a signed decimal value.
  • DISPLAY_UINT_DEC. The question's value is displayed as an unsigned decimal value.
  • DISPLAY_UINT_HEX. The question's value is displayed as an unsigned hexadecimal value.
  • READ_ONLY. The question is read-only. The value cannot be changed and cannot be selected.
  • INTERACTIVE. The callback associated with this form will be called.
  • OPTIONS_ONLY. Only the values specified by nested option operators can be selected by the user.
  • RESET_REQUIRED. A system reset is required in order for changes in this question's value to take effect.

Description
This operator creates a select-on-of object, where the user must select from one of the nested options. This is identical tonumeric. There are two ways to specify defaults for this question: one or more nestedoptions (lowest priority) or a nested default (highest priority).

An image may be associated with the option using a nested image operator.

This operator corresponds to the IFR EFI_IFR_ONE_OF operator.

Example

 oneof     varid  = MyIfrNVData.Test     prompt = STRING_TOKEN(STR_TEST_OPCODE),     help   = STRING_TOKEN(STR_ONE_OF_HELP),    option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = RESET_REQUIRED;    option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = DEFAULT | RESET_REQUIRED;  endoneof;

option

Also known as a one-of option, this operator creates a pre-defined option for a question.

Syntax

option   text = string ,   value = constant-value ,   flags = one-of-option-flags   [ , image = image ] ;
one-of-option-flags := one-of-option-flags | one-of-option-flag |                       one-of-option-flag |                       <nothing>one-of-option-flag  := OPTION_DEFAULT |                       OPTION_DEFAULT_MFG |                       INTERACTIVE |                       MANUFACTURING |                       DEFAULT |                       RESET_REQUIRED |                       LATE_CHECK |                       uint8

Description
This operator corresponds to the IFR EFI_IFR_ONE_OF_OPTION operator.

orderedlist

Creates a set question using an ordered list.

Syntax

orderedlist    [ name = identifier , ]   [ varid = storage-id , ]    [ questionid = uint , ]    prompt = string ,    help = string ,    [ maxcontainers = uint8 ]   [ flags = ordered-list-flags ,] question-option-listendlist ;
ordered-list-flags := ordered-list-flags | ordered-list-flag |                      ordered-list-flag |                      <nothing>ordered-list-flag  := UNIQUE |                      NOEMPTY |                      READ_ONLY |                      INTERACTIVE |                      OPTIONS_ONLY |                      RESET_REQUIRED |                      uint
AttributeDescriptionpromptA string identifier that specifies the string for the question prompt.helpA string identifier that specifies the string for the question extended help text.flagsZero or more keywords, separated by the | character.
  • UNIQUE. All entries in the ordered list must be unique.
  • NOEMPTY. There can be no empty items in the ordered list.
  • READ_ONLY. The question is read-only. The value cannot be changed and cannot be selected.
  • INTERACTIVE. The callback associated with this form will be called.
  • OPTIONS_ONLY. Only the values specified by nested option operators can be selected by the user.
  • RESET_REQUIRED. A system reset is required in order for changes in this question's value to take effect.

Description
This operator creates an ordered list question in the current form. The valid values for the options in ordered lists should never include a 0. The value of 0 is used to determine if a particular "slot" in the array is empty.

This operator corresponds to the IFR EFI_IFR_ORDERED_LIST operator.

Example

orderedlist    varid = MyIfrNVData.OrderedList,    prompt = STRING_TOKEN(STR_TEST_OPCODE),    help = STRING_TOKEN(STR_TEXT_HELP),  option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 3, flags = RESET_REQUIRED;  option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 2, flags = RESET_REQUIRED;  option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 1, flags = RESET_REQUIRED; endlist;

password

Syntax

password   [ name = identifier, ]   [ varid = storage-id , ]    [ questionid = uint, ]    prompt = string ,   help = string ,    [ flags = password-flags , ]   [ key = uint , ]   minsize = uint16,    maxsize = uint16, question-option-listendpassword ;
password-flags := password-flags | password-flag |                  password-flag |                  <nothing>password-flag  := READ_ONLY |                  INTERACTIVE |                  OPTIONS_ONLY |                  LATE_CHECK |                  uint8

Attributes

AttributeDescriptionpromptA string identifier that specifies the string for the question prompt.helpA string identifier that specifies the string for the question extended help text.flagsZero or more keywords, separated by the | character.
  • READ_ONLY. The question is read-only. The value cannot be changed and cannot be selected.
  • INTERACTIVE. The callback associated with this form will be called.
  • OPTIONS_ONLY. Only the values specified by nested option operators can be selected by the user.
  • RESET_REQUIRED. A system reset is required in order for changes in this question's value to take effect.

Description
This operator corresponds to the IFR operator EFI_IFR_PASSWORD.

Example

password   varid = MyIfrNVData.Password,   prompt = STRING_TOKEN(STR_PASSWORD_PROMPT),   help = STRING_TOKEN(STR_PASSWORD_HELP),   minsize = 6,   maxsize = 20, endpassword;

pragma

Declare the packing for subsequent structs.

Syntax

#pragma pack ( [ show ] | [ push | pop ] [ , identifier:string ] [ , number:integer ] | number:integer )

Description
Changes the packing of structures to either a previously defined value or to the value specified bynumber.

pushthis

Retrieves the working value of the current question.

Syntax

pushthis

Description
This operator returns the current question's value. It is only valid when evaluatinginconsistentif or nosubmitif expressions.

This operator corresponds to the IFR EFI_IFR_THIS operator.

question-option-list

Syntax

question-option-list := question-option-list , question-option |                        question-tag-list , question-option |                        question-option |                         <nothing>question-option      := suppressif |                        value |                        default |                        option

question-tag-list

Syntax

question-tag-list := question-tag-list , question-tag |                     question-tag |                     <nothing>
question-tag := image |                locked |                inconsistentif |                nosubmitif |                disableif |                refresh |                varstoredevice |

questionref

Return a question's value.

Syntax

questionref [ path = string ][ guid = guid ] ( identifier | uint )

Description
Returns the value of the question specified by the identifier. If the question’s value cannot be determined or the question does not exist, then return Undefined.

This operator corresponds to the IFR EFI_IFR_QUESTION_REF1 or EFI_IFR_QUESTION_REF3 operators, depending on whether path andguid are present.

Example

questionref (MyCheckBox) // generates EFI_IFR_QUESTION_REF1questionref path = STRING_TOKEN (STR_DEVICE_PATH) (MyCheckBox) // generates EFI_IFR_QUESTION_REF3

questionrefval

Returns a question's value.

Syntax

questionrefval ( expression1 )

Attributes

AttributeDescriptionexpression1An expression that evaluates to a question identifier.

Description
If the expression cannot be evaluated as an unsigned integer or the value of the unsigned integer is greater than 0xFFFF, return Undefined. If the value of the question specified by the unsigned integer (converted to a question id) cannot be determined or the question does not exist, return Undefined. Otherwise, return the questions’ value.

This operator corresponds to the IFR EFI_IFR_QUESTION_REF2 operator.

refresh

Mark a question for periodic refresh.

Syntax

refresh interval = uint8 

Attributes

AttributeDescriptionintervalSpecifies the minimum number of seconds before the question's value is refresh.


Description
This operator causes the question's value to be refreshed at least every interval sections. The value may be refreshed less often, depending on browser policy or capabilities.

This operator corresponds to the IFR EFI_IFR_REFRESH operator.

resetbutton

Create a reset button on the current form.

Syntax

resetbutton    defaultstore = identifier ,    prompt = string ,    help = string ,   [ , image = image ]   [ , locked ]endresetbutton;

Attributes

AttributeDescriptiondefaultstoreAn identifier that specifies the defaultstore containing the default values.promptA string identifier that specifies the string for the question prompt.helpA string identifier that specifies the string for the question extended help text.imageAn optional image identifier that specifies the image to display with the question.lockedAn optional indicator that a Forms Editor should not permit the question to be edited.

Description
This opcode creates a user-selectable button that resets the question values for all questions on the current form to the default values associated with thedefaultstore associated with defaultstore.

If EFI_IFR_FLAGS_CALLBACK is set in the question header, then the callback associated with the form set will be called. An image may be associated with the statement using a nestedimage operator.

This operator corresponds to the IFR EFI_IFR_RESET_BUTTON operator.


rule

Rules are pre-defined expressions attached to the form. These rules may be used in any expression within the form’s scope.

Syntax

rule identifier ,  expression endrule ;

Description
This operator creates a rule, which associates an expression with an identifier and attaches it to the currently opened form. These rules allow common sub-expressions to be re-used within a form.

This operator corresponds to the IFR EFI_IFR_RULE operator.

Example

rule RULE_1, MYIfrNVData.Field8 >= 0x05 endrule;

ruleref

Evaluate a form rule and return its result.

Syntax

ruleref ( identifier )

Description
This operator looks up the rule specified by identifier and returns the evaluated result. If the rule specified byidentifier does not exist, return Undefined.

This operator corresponds to the IFR EFI_IFR_RULE_REF operator.

security

Returns whether the current user profile contains specified setup access privileges.

Syntax

security ( permissions-guid )
ParametersDescriptionpermissions-guidA GUID that uniquely identifies the security permissions being queried.

Description
This operator returns whether or not the current user profile contains the specified setup access permissions. If the current user profile contains the specified setup access permissions, then return true. Otherwise, return false.
This operator can be used in expressions to disable, suppress or gray-out forms, statements and questions. It can also be used in checking question values to disallow or allow certain values.This operator corresponds to the IFREFI_IFR_SECURITY opcode.

span

Return the index of first character in string that follows certain characters.

Syntax

span ( flags = span-flags , expression1  , expression2  , expression3 )
span-flags := span-flags | span-flag |              span-flag |              <nothing>span-flag  := FIRST_NON_MATCH |              LAST_NON_MATCH |              uint
ParametersDescriptionflagsZero or more keywords, separated by the | character.expression1An expression that evaluates to the string to scan.expression2An expression that evaluates to the string containing character pairs representing the low-end and high-end of a range of character values. For example "AZ" would represent all characters starting with the character value for "A" up to and including the character value for "Z"expression3An expression that evaluates to an unsigned integer that specifies the first character to be scanned.


Description
This operator will returns the zero-based index of the first character in the string specified byexpression1 after the index specified by expression3 that falls within any one of the ranges (FIRST_NON_MATCH) or falls within none of the ranges (LAST_NON_MATCH) specified byexpression2.

This operator corresponds to the IFR EFI_IFR_SPAN operator.

If expression1 or expression2 cannot be evaluated as a string, return Undefined. Ifexpression3 cannot be evaluated as an unsigned integer, return Undefined.

storage-id

An identifer representing a variable storage space.

Syntax

identifier [ uint ] identifier [ . identifier [ [ uint ] ] ]

Example

TEST_DATA.MemberTEST_DATA.Set[5]

string

Creates a string question.

Syntax

string   [ name = identifier, ]   [ varid = storage-id, ]    [ questionid = uint, ]    prompt = string ,   help = string ,    [ flags = string-flags , ]   [ key = uint , ]   minsize = uint8,    maxsize = uint8, question-option-listendstring ;
string-flags := string-flags | string-flag |                string-flag |                <nothing>string-flag  := MULTI_LINE |                READ_ONLY |                INTERACTIVE |                OPTIONS_ONLY |                LATE_CHECK |                uint8

Attributes

AttributeDescriptionpromptA string identifier that specifies the string for the question prompt.helpA string identifier that specifies the string for the question extended help text.flagsZero or more keywords, separated by the | character. If not specified, zero is assumed.
  • MULTI_LINE. Multi-line editing is allowed.
  • READ_ONLY. The question is read-only. The value cannot be changed and cannot be selected.
  • INTERACTIVE. The callback associated with this form will be called.
  • OPTIONS_ONLY. Only the values specified by nested option operators can be selected by the user.
  • RESET_REQUIRED. A system reset is required in order for changes in this question's value to take effect.
minsizeAn unsigned integer (0-255) that specifies the minimum number of the user-editable characters in the string. If not specified, zero is assumed.maxsizeAn unsigned integer (0-255) that specifies the maximum number of the user-editable characters in the string. If not specified, 255 is assumed.

Description
This operator creates a string question.

An image may be associated with the question using a nested image operator.

There are two ways to specify defaults for this question: one or more nested option operators (lowest priority) or a nested default operator (highest priority).

If EFI_IFR_STRING_MULTI_LINE is set, it is a hint to the Forms Browser that multi-line text can be allowed. If it is clear, then multi-line editing should not be allowed.

This operator corresponds to the IFR operator EFI_IFR_STRING.

Example

string   varid = MyIfrNVData.StringData,   prompt = STRING_TOKEN(STR_STRING_PROMPT),   help = STRING_TOKEN(STR_STRING_HELP2),   flags = INTERACTIVE,   key = 0x1234,   minsize = 6,   maxsize = 20, endstring;

stringref

Return a string associated with a string identifier.

Syntax

stringref ( uint16 )

Parameters

ParameterDescriptionuint16The string identifier.

Description
This operator returns the string assocated with the unsigned integer. If there is no string associated with the string identifier, then return an empty string.

This operator corresponds to the IFR EFI_IFR_STRING_REF1 operator.

stringrefval

Return a string associated with a calculated string identifier.

Syntax

stringrefval ( expression1 )

Parameters

ParameterDescriptionexpression1Expression evaluate as a a string identifier.

Description
This operator returns the string associated with the string identifier calculated byexpression.

If the expression cannot be evaluated as an unsigned integer or the value of the unsigned integer is greater than 0xFFFF, return Undefined. If the string specified by the unsigned integer (converted to a string identifier) cannot be determined or the string does not exist, return an empty string. Otherwise, return the string.

This operator corresponds to the IFR EFI_IFR_STRING_REF2 operator.

stringval

Convert the expression to a string.

Syntax

 stringval [ format = uint , ] ( expression1 )

Attributes

AttributeDescriptionformatWhen converting from unsigned integers, these flags control the format: 0 = unsigned decimal, 1 = signed decimal, 2 = hexadecimal (lower-case alpha), 3 = hexadecimal (upper-case alpha)

When converting from a buffer, these flags control the format: 0 = ASCII, 8 = Unicode

Parameters

ParameterDescriptionexpression1Expression to convert.

Description
If the expression is Undefined or cannot be evaluated as a string, return Undefined.

When converting from an unsigned integer, the number will be converted to a unsigned decimal string (format = 0), signed decimal string (format = 1) or a hexadecimal string (format = 2 or 3).

When converting from a boolean, the boolean will be converted to “True” (True) or “False” (False).

When converting from a buffer, each 8-bit (Format = 0) or 16-bit (Format = 8) value will be converted into a character and appended to the string, up until the end of the buffer or a NULL character.

This operator corresponds to the IFR EFI_IFR_TO_STRING operator.

struct

Declare zero or more structure members.

Syntax

[ typedef ] struct [ _NON_NV_DATA_MAP ] {  struct-member-statements} [ identifier ] ;
struct-member-statements   := struct-member-statements struct-member-statement |                              struct-member-statement |                              <nothing>struct-member-statement    := data-type identifier [ [ uint ] ] ;

Description
This operator creates a new data structure with the name identifier, along with the structure members. Each structure member consists of a data type, an identifier and, optionally, an array suffix.

subtitle

Creates a sub-title in the current form.

Syntax

subtitle    text = string   [, flags = subtitle-flags ]   [, image = image ]   [, locked ] ;
subtitle-flags := subtitle-flags | subtitle-flag |                   subtitle-flag |                  <nothing>subtitle-flag  := HORIZONTAL |                  uint8

Attributes

AttributeDescriptiontextA string identifier that specifies the string which will be displayed with the subtitle.flagsZero or more keywords, separated by the | character.
  • HORIZONTAL. Hint that the nested statements and questions should be organized horizontally.


Description
This operator creates a sub-title. Subtitle strings are intended to be used by authors to separate sections of questions into semantic groups. If there are nested statements and questions, then theForms Browser may further distinguish the end of the semantic group as including only those statements and questions which are nested.

If EFI_IFR_FLAGS_HORIZONTAL is set, then this provides a hint that the nested statements or questions should be horizontally arranged. Otherwise, they are assumed to be vertically arranged.

An image may be associated with the statement using a nested image.

This operator corresponds to the IFR EFI_IFR_SUBTITLE operator.

Example

subtitle text = STRING_TOKEN(STR_SUBTITLE_STRING_1);

text

Creates a static text and image.

Syntax

text   help = string ,   text = string    [ , text = string ]    [ , flags = static-text-flags ]   [ , key   = uint ]   [ , image = image ]   [ , locked ] ;
static-text-flags := static-text-flags | static-text-flag |                     static-text-flag |                     <nothing>static-text-flag  := READ_ONLY |                     INTERACTIVE |                     OPTIONS_ONLY |                     LATE_CHECK |                     uint8

Attributes

AttributeDescriptionhelp text flags key 

Description
This operator corresponds to the IFR EFI_IFR_TEXT operator (if CALLBACK is not specified) or the EFI_IFR_ACTION operator (if CALLBACK is specified).

Example

text help = STRING_TOKEN(STR_TEXT_HELP), text = STRING_TOKEN(STR_TEXT_TEXT_1), text = STRING_TOKEN(STR_TEXT_TEXT_2),      image = IMAGE_TOKEN(IMAGE_TEXT);

time

Create a Time question.

Syntax

time   [ name = identifier, ]   [ varid = storage-id, ]   [ questionid = uint , ]    prompt = string ,    help = string ,   [ flags = time-flags , ] question-option-list endtime ;
time-flags := time-flags | time-flag |              time-flag |              <nothing>time-flag  := HOUR_SUPPRESS |              MINUTE_SUPPRESS |              SECOND_SUPPRESS |              STORAGE_NORMAL |              STORAGE_TIME |              STORAGE_WAKEUP |              uint8

Attributes

AttributeDescriptionpromptA string identifier that specifies the string for the question prompt.helpA string identifier that specifies the string for the question extended help text.flagsZero or more keywords, separated by the | character.
  • HOUR_SUPPRESS. The year is not displayed (or optionally, not editable)
  • MINUTE_SUPPRESS. The month is not displayed (or optionally, not editable)
  • SECOND_SUPPRESS. The day is not displayed (or optionally, not editable)
  • STORAGE_NORMAL. The date is stored using the EFI_HII_DATE format. May not be combined with STORAGE_TIME or STORAGE_WAKEUP.
  • STORAGE_TIME. The date is stored using SetTime(). May not be combined with STORAGE_NORMAL or STORAGE_WAKEUP.
  • STORAGE_WAKEUP. The date is stored using SetTime(). May not be combined with STORAGE_NORMAL or STORAGE_TIME.

Description
This operator creates a time question and adds it to the current form. An image may be associated with this question by nesting animage operator.

This operator corresponds to the IFR EFI_IFR_TIME operator.

tolower

Convert a string to lower case.

Syntax

tolower ( expression )

Description
If the expression is Undefined or cannot be evaluated as a string, return Undefined. Otherwise, convert the string to all lower case usingStrLwr and return the string.

This operator corresponds to the IFR EFI_IFR_TO_LOWER operator.

tok

Syntax

tok ( expression1 , expression2 , expression3 )

Parameters

ParameterDescriptionexpression1A string to tokenize.expression2A string containing the valid delimiting characters.expression3An unsigned integer which specifies the zero-based sub-string index.

Description
If expression1 or expression2 cannot be evaluated as a string, return Undefined. If theexpression3 cannot be evaluated as an unsigned integer, return Undefined.

This operator returns the nth delimited sub-string (0 = left of the first delimiter). The end of the string always acts a the final delimiter. The no such string exists, an empty string is returned.

This operator corresponds to the IFR EFI_IFR_TOKEN operator.

toupper

Convert a string to upper case.

Syntax

toupper ( expression1 )

Parameters

ParameterDescriptionexpression1Expression which evaluates to a string.

Description
If the expression is Undefined or cannot be evaluated as a string, return Undefined. Otherwise, convert the string to all upper case usingStrUpr and reutrn the string .

This operator corresponds to the IFR EFI_IFR_TO_UPPER operator.

uintval

Convert an expression to an unsigned integer.

Syntax

uintval ( expression )

Description
This operator converts the specified expression to an unsigned integer. If the expression is Undefined or cannot be evaluated as an unsigned integer, return Undefined. Otherwise return the unsigned integer.

When converting from a boolean, if True, return 1 and if False, return 0.

When converting from a string, whitespace is skipped. The prefix ‘0x’ or ‘0X’ indicates to convert from a hexadecimal string while the prefix ‘-‘ indicates conversion from a signed integer string.

When converting from a buffer, if the buffer is greater than 8 bytes in length, return Undefined. Otherwise, zero-extend the contents of the buffer to 64-bits and return the unsigned integer.

This operator corresponds to the IFR EFI_IFR_TO_UINT operator.

value

Provides a value for the current question or default.

Syntax

value = expression

Description
This operator specifies a value for the current question or default, with no storage. The value is the result of the expression.

If used for a question, then the question will be read-only.

This operator corresponds to the IFR EFI_IFR_VALUE operator.

Example

value = 5 value = 0x12

varstore

Creates a variable storage short-cut for linear buffer storage.

Syntax

varstore    data-type ,    [ varid = uint16 , ]    name = identifier ,    guid = guid   [, exportdefaults]    ;

Description
This operator corresponds to the IFR EFI_IFR_VARSTORE operator.

Parameters

ParameterDescriptiondata-typeIndicates the C-style data type used to describe the contents of the buffer-style variable store.varidAn unsigned integer that specifies the identifier for this variable store. The value must be unique among all variable stores in the current from set. The value must be between 1 and 65535. If no number is specified, then an unused value will be assigned.nameA C-style identifier that specifies the name of the variable store. Within the form set, the combination of GUID and name must be unique.guidA GUID (in registry format) that specifies the identifier of the variable store. Within the form set, the combination of GUID and name must be unique.exportdefaultsIf present, this flag indicates that the default values specified by the IFR for the various fields within the variable store will be exported a.evi file so that the EFI variable named by name and guid will exist on first boot.

Example

varstore MyData , name = RefName , guid = FORMSET_GUID, exportdefaults;

varstoredevice

Syntax

varstoredevice = string 
0 0