FrameworkInternalFormRepresentation.h revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/** @file
This file defines the encoding for the VFR (Visual Form Representation) language.
Framework IFR is primarily consumed by the EFI presentation engine, and produced by EFI
internal application and drivers as well as all add-in card option-ROM drivers
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
These definitions are from the Framework Specification HII 0.92.
**/
typedef UINT16 STRING_REF;
//
// IFR Op codes
//
#define FRAMEWORK_EFI_IFR_FORM_OP 0x01
#define FRAMEWORK_EFI_IFR_SUBTITLE_OP 0x02
#define FRAMEWORK_EFI_IFR_TEXT_OP 0x03
#define EFI_IFR_GRAPHIC_OP 0x04
#define FRAMEWORK_EFI_IFR_ONE_OF_OP 0x05
#define FRAMEWORK_EFI_IFR_CHECKBOX_OP 0x06
#define FRAMEWORK_EFI_IFR_NUMERIC_OP 0x07
#define FRAMEWORK_EFI_IFR_PASSWORD_OP 0x08
#define FRAMEWORK_EFI_IFR_SUPPRESS_IF_OP 0x0A
#define EFI_IFR_END_FORM_OP 0x0B
#define EFI_IFR_HIDDEN_OP 0x0C
#define EFI_IFR_END_FORM_SET_OP 0x0D
#define FRAMEWORK_EFI_IFR_FORM_SET_OP 0x0E
#define FRAMEWORK_EFI_IFR_REF_OP 0x0F
#define EFI_IFR_END_ONE_OF_OP 0x10
#define FRAMEWORK_EFI_IFR_INCONSISTENT_IF_OP 0x11
#define FRAMEWORK_EFI_IFR_EQ_ID_VAL_OP 0x12
#define FRAMEWORK_EFI_IFR_EQ_ID_ID_OP 0x13
#define FRAMEWORK_EFI_IFR_EQ_ID_LIST_OP 0x14
#define FRAMEWORK_EFI_IFR_AND_OP 0x15
#define FRAMEWORK_EFI_IFR_OR_OP 0x16
#define FRAMEWORK_EFI_IFR_NOT_OP 0x17
#define EFI_IFR_GRAYOUT_IF_OP 0x19
#define FRAMEWORK_EFI_IFR_DATE_OP 0x1A
#define FRAMEWORK_EFI_IFR_TIME_OP 0x1B
#define FRAMEWORK_EFI_IFR_STRING_OP 0x1C
#define EFI_IFR_LABEL_OP 0x1D
#define EFI_IFR_SAVE_DEFAULTS_OP 0x1E
#define EFI_IFR_RESTORE_DEFAULTS_OP 0x1F
#define EFI_IFR_BANNER_OP 0x20
#define EFI_IFR_INVENTORY_OP 0x21
#define EFI_IFR_EQ_VAR_VAL_OP 0x22
#define FRAMEWORK_EFI_IFR_ORDERED_LIST_OP 0x23
#define FRAMEWORK_EFI_IFR_VARSTORE_OP 0x24
#define EFI_IFR_VARSTORE_SELECT_OP 0x25
#define EFI_IFR_VARSTORE_SELECT_PAIR_OP 0x26
#define EFI_IFR_OEM_OP 0xFE
#define EFI_IFR_NV_ACCESS_COMMAND 0xFF
//
// Define values for the flags fields in some VFR opcodes. These are
// bitmasks.
//
#define EFI_IFR_FLAG_DEFAULT 0x01
#define EFI_IFR_FLAG_MANUFACTURING 0x02
#define EFI_IFR_FLAG_INTERACTIVE 0x04
#define EFI_IFR_FLAG_NV_ACCESS 0x08
#define EFI_IFR_FLAG_RESET_REQUIRED 0x10
#define EFI_IFR_FLAG_LATE_CHECK 0x20
#define EFI_DISK_DEVICE_CLASS 0x01
#define EFI_VIDEO_DEVICE_CLASS 0x02
#define EFI_NETWORK_DEVICE_CLASS 0x04
#define EFI_INPUT_DEVICE_CLASS 0x08
#define EFI_ON_BOARD_DEVICE_CLASS 0x10
#define EFI_OTHER_DEVICE_CLASS 0x20
#define EFI_SETUP_APPLICATION_SUBCLASS 0x00
#define EFI_GENERAL_APPLICATION_SUBCLASS 0x01
#define EFI_FRONT_PAGE_SUBCLASS 0x02
///
/// Used to flag dynamically created op-codes. This is meaningful to the IFR Library set
/// and the browser because we need to distinguish between compiled NV map data and created data.
/// We do not allow new entries to be created in the NV map dynamically, but we do need
/// to display this information correctly. To dynamically create op-codes and assume that their
/// data will be saved, ensure that the NV starting location they refer to is pre-defined in the
/// NV map.
///
#define EFI_IFR_FLAG_CREATED 128
#pragma pack(1)
//
// IFR Structure definitions
//
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
//
// goto
//
typedef struct {
typedef struct {
typedef struct {
//
// Also notice that the IFR_ONE_OF and IFR_CHECK_BOX are identical in structure......
// code assumes this to be true, if this ever changes we need to revisit the InitializeTagStructures code
//
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
//
// There is an interesting twist with regards to Time and Date. This is one of the few items which can accept input
// from a user, and may or may not need to use storage in the NVRAM space. The decided method for determining
// if NVRAM space will be used (only for a TimeOp or DateOp) is: If .QuestionId == 0 && .Width == 0 (normally an
// impossibility) then use system resources to store the data away and not NV resources. In other words, the setup
// engine will call gRT->SetTime, and gRT->SetDate for the saving of data, and the values displayed will be from the
// gRT->GetXXXX series of calls.
//
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
///
/// Inconsistent with specification here:
/// The following defintion may not comply with Framework Specification HII 0.92. To
/// keep the inconsistant is for implementation needed.
///@{
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
///@}
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
///
/// Used for the ideqid VFR statement where two variable stores may be referenced in the
/// same VFR statement.
/// A browser should treat this as an FRAMEWORK_EFI_IFR_VARSTORE_SELECT statement and assume that all following
/// IFR opcodes use the VarId as defined here.
///
typedef struct {
///
/// Save defaults and restore defaults have same structure.
///
typedef struct {
#define EFI_IFR_BANNER_ALIGN_LEFT 0
#define EFI_IFR_BANNER_ALIGN_CENTER 1
#define EFI_IFR_BANNER_ALIGN_RIGHT 2
#define EFI_IFR_BANNER_TIMEOUT 0xFF
#pragma pack()
#endif