mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/DriverSample: Add questions with bit/union VarStore
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=545 Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
a63be426f8
commit
911405a3f1
|
@ -20,6 +20,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
CHAR16 VariableName[] = L"MyIfrNVData";
|
CHAR16 VariableName[] = L"MyIfrNVData";
|
||||||
CHAR16 MyEfiVar[] = L"MyEfiVar";
|
CHAR16 MyEfiVar[] = L"MyEfiVar";
|
||||||
|
CHAR16 MyEfiBitVar[] = L"MyEfiBitVar";
|
||||||
|
CHAR16 MyEfiUnionVar[] = L"MyEfiUnionVar";
|
||||||
|
|
||||||
EFI_HANDLE DriverHandle[2] = {NULL, NULL};
|
EFI_HANDLE DriverHandle[2] = {NULL, NULL};
|
||||||
DRIVER_SAMPLE_PRIVATE_DATA *mPrivateData = NULL;
|
DRIVER_SAMPLE_PRIVATE_DATA *mPrivateData = NULL;
|
||||||
EFI_EVENT mEvent;
|
EFI_EVENT mEvent;
|
||||||
|
@ -664,6 +667,13 @@ ExtractConfig (
|
||||||
if (HiiIsConfigHdrMatch(Request, &gDriverSampleFormSetGuid, MyEfiVar)) {
|
if (HiiIsConfigHdrMatch(Request, &gDriverSampleFormSetGuid, MyEfiVar)) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
if (HiiIsConfigHdrMatch(Request, &gDriverSampleFormSetGuid, MyEfiBitVar)) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
if (HiiIsConfigHdrMatch(Request, &gDriverSampleFormSetGuid, MyEfiUnionVar)) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set Request to the unified request string.
|
// Set Request to the unified request string.
|
||||||
//
|
//
|
||||||
|
@ -885,6 +895,12 @@ RouteConfig (
|
||||||
if (HiiIsConfigHdrMatch(Configuration, &gDriverSampleFormSetGuid, MyEfiVar)) {
|
if (HiiIsConfigHdrMatch(Configuration, &gDriverSampleFormSetGuid, MyEfiVar)) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
if (HiiIsConfigHdrMatch(Configuration, &gDriverSampleFormSetGuid, MyEfiBitVar)) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
if (HiiIsConfigHdrMatch(Configuration, &gDriverSampleFormSetGuid, MyEfiUnionVar)) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get Buffer Storage data from EFI variable
|
// Get Buffer Storage data from EFI variable
|
||||||
|
@ -1297,6 +1313,10 @@ DriverCallback (
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0x6666:
|
||||||
|
Value->u8 = 12;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Status = EFI_UNSUPPORTED;
|
Status = EFI_UNSUPPORTED;
|
||||||
break;
|
break;
|
||||||
|
@ -1311,6 +1331,10 @@ DriverCallback (
|
||||||
Value->u8 = DEFAULT_CLASS_MANUFACTURING_VALUE;
|
Value->u8 = DEFAULT_CLASS_MANUFACTURING_VALUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0x6666:
|
||||||
|
Value->u8 = 13;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Status = EFI_UNSUPPORTED;
|
Status = EFI_UNSUPPORTED;
|
||||||
break;
|
break;
|
||||||
|
@ -1705,6 +1729,8 @@ DriverSampleInit (
|
||||||
EFI_STRING ConfigRequestHdr;
|
EFI_STRING ConfigRequestHdr;
|
||||||
EFI_STRING NameRequestHdr;
|
EFI_STRING NameRequestHdr;
|
||||||
MY_EFI_VARSTORE_DATA *VarStoreConfig;
|
MY_EFI_VARSTORE_DATA *VarStoreConfig;
|
||||||
|
MY_EFI_BITS_VARSTORE_DATA *BitsVarStoreConfig;
|
||||||
|
MY_EFI_UNION_DATA *UnionConfig;
|
||||||
EFI_INPUT_KEY HotKey;
|
EFI_INPUT_KEY HotKey;
|
||||||
EDKII_FORM_BROWSER_EXTENSION_PROTOCOL *FormBrowserEx;
|
EDKII_FORM_BROWSER_EXTENSION_PROTOCOL *FormBrowserEx;
|
||||||
|
|
||||||
|
@ -1993,6 +2019,100 @@ DriverSampleInit (
|
||||||
}
|
}
|
||||||
FreePool (ConfigRequestHdr);
|
FreePool (ConfigRequestHdr);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Initialize Bits efi varstore configuration data
|
||||||
|
//
|
||||||
|
BitsVarStoreConfig = &mPrivateData->BitsVarStoreConfig;
|
||||||
|
ZeroMem (BitsVarStoreConfig, sizeof (MY_EFI_BITS_VARSTORE_DATA));
|
||||||
|
|
||||||
|
ConfigRequestHdr = HiiConstructConfigHdr (&gDriverSampleFormSetGuid, MyEfiBitVar, DriverHandle[0]);
|
||||||
|
ASSERT (ConfigRequestHdr != NULL);
|
||||||
|
|
||||||
|
BufferSize = sizeof (MY_EFI_BITS_VARSTORE_DATA);
|
||||||
|
Status = gRT->GetVariable (MyEfiBitVar, &gDriverSampleFormSetGuid, NULL, &BufferSize, BitsVarStoreConfig);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
//
|
||||||
|
// Store zero data to EFI variable Storage.
|
||||||
|
//
|
||||||
|
Status = gRT->SetVariable(
|
||||||
|
MyEfiBitVar,
|
||||||
|
&gDriverSampleFormSetGuid,
|
||||||
|
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
|
||||||
|
sizeof (MY_EFI_BITS_VARSTORE_DATA),
|
||||||
|
BitsVarStoreConfig
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DriverSampleUnload (ImageHandle);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// EFI variable for NV config doesn't exit, we should build this variable
|
||||||
|
// based on default values stored in IFR
|
||||||
|
//
|
||||||
|
ActionFlag = HiiSetToDefaults (ConfigRequestHdr, EFI_HII_DEFAULT_CLASS_STANDARD);
|
||||||
|
if (!ActionFlag) {
|
||||||
|
DriverSampleUnload (ImageHandle);
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//
|
||||||
|
// EFI variable does exist and Validate Current Setting
|
||||||
|
//
|
||||||
|
ActionFlag = HiiValidateSettings (ConfigRequestHdr);
|
||||||
|
if (!ActionFlag) {
|
||||||
|
DriverSampleUnload (ImageHandle);
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FreePool (ConfigRequestHdr);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Initialize Union efi varstore configuration data
|
||||||
|
//
|
||||||
|
UnionConfig = &mPrivateData->UnionConfig;
|
||||||
|
ZeroMem (UnionConfig, sizeof (MY_EFI_UNION_DATA));
|
||||||
|
|
||||||
|
ConfigRequestHdr = HiiConstructConfigHdr (&gDriverSampleFormSetGuid, MyEfiUnionVar, DriverHandle[0]);
|
||||||
|
ASSERT (ConfigRequestHdr != NULL);
|
||||||
|
|
||||||
|
BufferSize = sizeof (MY_EFI_UNION_DATA);
|
||||||
|
Status = gRT->GetVariable (MyEfiUnionVar, &gDriverSampleFormSetGuid, NULL, &BufferSize, UnionConfig);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
//
|
||||||
|
// Store zero data to EFI variable Storage.
|
||||||
|
//
|
||||||
|
Status = gRT->SetVariable(
|
||||||
|
MyEfiUnionVar,
|
||||||
|
&gDriverSampleFormSetGuid,
|
||||||
|
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
|
||||||
|
sizeof (MY_EFI_UNION_DATA),
|
||||||
|
UnionConfig
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DriverSampleUnload (ImageHandle);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// EFI variable for NV config doesn't exit, we should build this variable
|
||||||
|
// based on default values stored in IFR
|
||||||
|
//
|
||||||
|
ActionFlag = HiiSetToDefaults (ConfigRequestHdr, EFI_HII_DEFAULT_CLASS_STANDARD);
|
||||||
|
if (!ActionFlag) {
|
||||||
|
DriverSampleUnload (ImageHandle);
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//
|
||||||
|
// EFI variable does exist and Validate Current Setting
|
||||||
|
//
|
||||||
|
ActionFlag = HiiValidateSettings (ConfigRequestHdr);
|
||||||
|
if (!ActionFlag) {
|
||||||
|
DriverSampleUnload (ImageHandle);
|
||||||
|
return EFI_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FreePool (ConfigRequestHdr);
|
||||||
|
|
||||||
Status = gBS->CreateEventEx (
|
Status = gBS->CreateEventEx (
|
||||||
EVT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
|
|
|
@ -85,6 +85,8 @@ typedef struct {
|
||||||
EFI_HII_HANDLE HiiHandle[2];
|
EFI_HII_HANDLE HiiHandle[2];
|
||||||
DRIVER_SAMPLE_CONFIGURATION Configuration;
|
DRIVER_SAMPLE_CONFIGURATION Configuration;
|
||||||
MY_EFI_VARSTORE_DATA VarStoreConfig;
|
MY_EFI_VARSTORE_DATA VarStoreConfig;
|
||||||
|
MY_EFI_BITS_VARSTORE_DATA BitsVarStoreConfig;
|
||||||
|
MY_EFI_UNION_DATA UnionConfig;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Name/Value storage Name list
|
// Name/Value storage Name list
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -31,8 +31,24 @@ Revision History:
|
||||||
#include <Guid/ZeroGuid.h>
|
#include <Guid/ZeroGuid.h>
|
||||||
|
|
||||||
#define CONFIGURATION_VARSTORE_ID 0x1234
|
#define CONFIGURATION_VARSTORE_ID 0x1234
|
||||||
|
#define BITS_VARSTORE_ID 0x2345
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
UINT16 NestByteField;
|
||||||
|
UINT8 : 1; // unamed field can be used for padding
|
||||||
|
UINT8 NestBitCheckbox : 1;
|
||||||
|
UINT8 NestBitOneof : 2;
|
||||||
|
UINT8 : 0; // Special width 0 can be used to force alignment at the next word boundary
|
||||||
|
UINT8 NestBitNumeric : 4;
|
||||||
|
} MY_BITS_DATA;
|
||||||
|
|
||||||
|
typedef union {
|
||||||
|
UINT16 BitField : 10;
|
||||||
|
UINT8 ByteField;
|
||||||
|
} MY_EFI_UNION_DATA;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT16 MyStringData[40];
|
UINT16 MyStringData[40];
|
||||||
UINT16 SomethingHiddenForHtml;
|
UINT16 SomethingHiddenForHtml;
|
||||||
|
@ -67,6 +83,11 @@ typedef struct {
|
||||||
UINT8 RefreshGuidCount;
|
UINT8 RefreshGuidCount;
|
||||||
UINT8 Match2;
|
UINT8 Match2;
|
||||||
UINT8 GetDefaultValueFromCallBackForOrderedList[3];
|
UINT8 GetDefaultValueFromCallBackForOrderedList[3];
|
||||||
|
UINT8 BitCheckbox : 1;
|
||||||
|
UINT16 BitOneof : 6;
|
||||||
|
UINT16 BitNumeric : 12;
|
||||||
|
MY_BITS_DATA MyBitData;
|
||||||
|
MY_EFI_UNION_DATA MyUnionData;
|
||||||
} DRIVER_SAMPLE_CONFIGURATION;
|
} DRIVER_SAMPLE_CONFIGURATION;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -79,6 +100,17 @@ typedef struct {
|
||||||
UINT16 SubmittedCallback;
|
UINT16 SubmittedCallback;
|
||||||
} MY_EFI_VARSTORE_DATA;
|
} MY_EFI_VARSTORE_DATA;
|
||||||
|
|
||||||
|
//
|
||||||
|
// 3rd NV data structure definition
|
||||||
|
//
|
||||||
|
typedef struct {
|
||||||
|
MY_BITS_DATA BitsData;
|
||||||
|
UINT32 EfiBitGrayoutTest : 5;
|
||||||
|
UINT32 EfiBitNumeric : 4;
|
||||||
|
UINT32 EfiBitOneof : 10;
|
||||||
|
UINT32 EfiBitCheckbox : 1;
|
||||||
|
} MY_EFI_BITS_VARSTORE_DATA;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Labels definition
|
// Labels definition
|
||||||
//
|
//
|
||||||
|
|
|
@ -87,6 +87,19 @@ formset
|
||||||
name = MyEfiVar,
|
name = MyEfiVar,
|
||||||
guid = DRIVER_SAMPLE_FORMSET_GUID;
|
guid = DRIVER_SAMPLE_FORMSET_GUID;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Define a Buffer Storage (EFI_IFR_VARSTORE)
|
||||||
|
//
|
||||||
|
efivarstore MY_EFI_BITS_VARSTORE_DATA, // This is the data structure type
|
||||||
|
attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, // EFI variable attribures
|
||||||
|
name = MyEfiBitVar, // Define referenced name in vfr
|
||||||
|
guid = DRIVER_SAMPLE_FORMSET_GUID; // GUID of this buffer storage
|
||||||
|
|
||||||
|
efivarstore MY_EFI_UNION_DATA,
|
||||||
|
attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, // EFI variable attribures
|
||||||
|
name = MyEfiUnionVar,
|
||||||
|
guid = DRIVER_SAMPLE_FORMSET_GUID;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Define a Name/Value Storage (EFI_IFR_VARSTORE_NAME_VALUE)
|
// Define a Name/Value Storage (EFI_IFR_VARSTORE_NAME_VALUE)
|
||||||
//
|
//
|
||||||
|
@ -518,6 +531,9 @@ formset
|
||||||
data.OrderedList[0] = 0x21,
|
data.OrderedList[0] = 0x21,
|
||||||
endguidop;
|
endguidop;
|
||||||
|
|
||||||
|
goto 7,
|
||||||
|
prompt = STRING_TOKEN(STR_GOTO_FORM7),
|
||||||
|
help = STRING_TOKEN(STR_GOTO_FORM7_HELP);
|
||||||
|
|
||||||
endform;
|
endform;
|
||||||
|
|
||||||
|
@ -780,4 +796,160 @@ formset
|
||||||
|
|
||||||
endform;
|
endform;
|
||||||
|
|
||||||
|
|
||||||
|
form formid = 7, // Form to show the question refer to union and bit Varstore
|
||||||
|
title = STRING_TOKEN(STR_FORM7_TITLE);
|
||||||
|
|
||||||
|
subtitle text = STRING_TOKEN(STR_NEST_BIT_EFI_VARSTORE);
|
||||||
|
|
||||||
|
checkbox varid = MyEfiBitVar.BitsData.NestBitCheckbox,
|
||||||
|
prompt = STRING_TOKEN(STR_BIT_NEST_CHECK_BOX_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_BIT_NEST_CHECK_BOX_HELP),
|
||||||
|
flags = CHECKBOX_DEFAULT,
|
||||||
|
endcheckbox;
|
||||||
|
|
||||||
|
oneof varid = MyEfiBitVar.BitsData.NestBitOneof,
|
||||||
|
prompt = STRING_TOKEN(STR_ONE_OF_BIT_NEST_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_ONE_OF_BIT_NEST_HELP),
|
||||||
|
option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0, flags = MANUFACTURING;
|
||||||
|
option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 1, flags = DEFAULT;
|
||||||
|
endoneof;
|
||||||
|
|
||||||
|
numeric varid = MyEfiBitVar.BitsData.NestBitNumeric,
|
||||||
|
questionid = 0x6666,
|
||||||
|
prompt = STRING_TOKEN(STR_BIT_NEST_NUMERIC_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_BIT_NEST_NUMERIC_DEFAULT_HELP),
|
||||||
|
flags = DISPLAY_UINT_HEX | INTERACTIVE,
|
||||||
|
minimum = 2,
|
||||||
|
maximum = 15,
|
||||||
|
step = 1,
|
||||||
|
endnumeric;
|
||||||
|
|
||||||
|
oneof varid = MyEfiBitVar.BitsData.NestByteField,
|
||||||
|
prompt = STRING_TOKEN(BYTE_QUESTION_NEST_BIT_PROMPT),
|
||||||
|
help = STRING_TOKEN(BYTE_QUESTION_NEST_BIT_HELP),
|
||||||
|
option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0, flags = MANUFACTURING;
|
||||||
|
option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 1, flags = DEFAULT;
|
||||||
|
endoneof;
|
||||||
|
|
||||||
|
subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2);
|
||||||
|
subtitle text = STRING_TOKEN(STR_BIT_EFI_VARSTORE);
|
||||||
|
|
||||||
|
checkbox varid = MyEfiBitVar.EfiBitCheckbox,
|
||||||
|
prompt = STRING_TOKEN(STR_BIT_CHECK_BOX_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_BIT_CHECK_BOX_HELP),
|
||||||
|
flags = CHECKBOX_DEFAULT,
|
||||||
|
endcheckbox;
|
||||||
|
|
||||||
|
grayoutif ideqval MyEfiBitVar.EfiBitGrayoutTest == 0;
|
||||||
|
numeric varid = MyEfiBitVar.EfiBitNumeric,
|
||||||
|
prompt = STRING_TOKEN(STR_BIT_NUMERIC_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_BIT_NUMERIC_HELP),
|
||||||
|
minimum = 0,
|
||||||
|
maximum = 7,
|
||||||
|
step = 0,
|
||||||
|
default = 4, defaultstore = MyStandardDefault,
|
||||||
|
default = 5, defaultstore = MyManufactureDefault,
|
||||||
|
endnumeric;
|
||||||
|
endif;
|
||||||
|
|
||||||
|
oneof varid = MyEfiBitVar.EfiBitOneof,
|
||||||
|
questionid = 0x9999,
|
||||||
|
prompt = STRING_TOKEN(STR_ONE_OF_BIT_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_ONE_OF_BIT_HELP),
|
||||||
|
option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0x0, flags = MANUFACTURING;
|
||||||
|
option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 0x1, flags = DEFAULT;
|
||||||
|
endoneof;
|
||||||
|
|
||||||
|
subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2);
|
||||||
|
subtitle text = STRING_TOKEN(STR_NEST_BIT_VARSTORE);
|
||||||
|
checkbox varid = MyIfrNVData.MyBitData.NestBitCheckbox,
|
||||||
|
prompt = STRING_TOKEN(STR_BIT_NEST_CHECK_BOX_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_BIT_NEST_CHECK_BOX_HELP),
|
||||||
|
flags = CHECKBOX_DEFAULT,
|
||||||
|
endcheckbox;
|
||||||
|
|
||||||
|
oneof varid = MyIfrNVData.MyBitData.NestBitOneof,
|
||||||
|
prompt = STRING_TOKEN(STR_ONE_OF_BIT_NEST_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_ONE_OF_BIT_NEST_HELP),
|
||||||
|
option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0, flags = MANUFACTURING;
|
||||||
|
option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 1, flags = DEFAULT;
|
||||||
|
endoneof;
|
||||||
|
|
||||||
|
numeric varid = MyIfrNVData.MyBitData.NestBitNumeric,
|
||||||
|
prompt = STRING_TOKEN(STR_BIT_NEST_NUMERIC_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_BIT_NEST_NUMERIC_HELP),
|
||||||
|
minimum = 0,
|
||||||
|
maximum = 7,
|
||||||
|
step = 0,
|
||||||
|
default = 6, defaultstore = MyStandardDefault,
|
||||||
|
default = 7, defaultstore = MyManufactureDefault,
|
||||||
|
endnumeric;
|
||||||
|
|
||||||
|
oneof varid = MyIfrNVData.MyBitData.NestByteField,
|
||||||
|
prompt = STRING_TOKEN(BYTE_QUESTION_NEST_BIT_PROMPT),
|
||||||
|
help = STRING_TOKEN(BYTE_QUESTION_NEST_BIT_HELP),
|
||||||
|
option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0, flags = MANUFACTURING;
|
||||||
|
option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 1, flags = DEFAULT;
|
||||||
|
endoneof;
|
||||||
|
|
||||||
|
subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2);
|
||||||
|
subtitle text = STRING_TOKEN(STR_BIT_VARSTORE);
|
||||||
|
|
||||||
|
oneof varid = MyIfrNVData.BitOneof,
|
||||||
|
prompt = STRING_TOKEN(STR_ONE_OF_BIT_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_ONE_OF_BIT_HELP),
|
||||||
|
option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0, flags = MANUFACTURING;
|
||||||
|
option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 1, flags = DEFAULT;
|
||||||
|
endoneof;
|
||||||
|
|
||||||
|
checkbox varid = MyIfrNVData.BitCheckbox,
|
||||||
|
prompt = STRING_TOKEN(STR_BIT_CHECK_BOX_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_BIT_CHECK_BOX_HELP),
|
||||||
|
flags = CHECKBOX_DEFAULT,
|
||||||
|
endcheckbox;
|
||||||
|
|
||||||
|
numeric varid = MyIfrNVData.BitNumeric,
|
||||||
|
prompt = STRING_TOKEN(STR_BIT_NUMERIC_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_BUFFER_BIT_NUMERIC_HELP),
|
||||||
|
minimum = 0,
|
||||||
|
maximum = 20,
|
||||||
|
step = 0,
|
||||||
|
default = 16, defaultstore = MyStandardDefault,
|
||||||
|
default = 17, defaultstore = MyManufactureDefault,
|
||||||
|
endnumeric;
|
||||||
|
|
||||||
|
subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2);
|
||||||
|
subtitle text = STRING_TOKEN(STR_UNION_EFI_VARSTORE);
|
||||||
|
|
||||||
|
numeric varid = MyEfiUnionVar.ByteField,
|
||||||
|
prompt = STRING_TOKEN(STR_UNION_BYTE_NUMERIC_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_UNION_BYTE_NUMERIC_HELP),
|
||||||
|
minimum = 0,
|
||||||
|
maximum = 20,
|
||||||
|
step = 0,
|
||||||
|
default = 7, defaultstore = MyStandardDefault,
|
||||||
|
default = 8, defaultstore = MyManufactureDefault,
|
||||||
|
endnumeric;
|
||||||
|
|
||||||
|
numeric varid = MyEfiUnionVar.BitField,
|
||||||
|
prompt = STRING_TOKEN(STR_UNION_BIT_NUMERIC_PROMPT),
|
||||||
|
help = STRING_TOKEN(STR_UNION_BIT_NUMERIC_HELP),
|
||||||
|
minimum = 0,
|
||||||
|
maximum = 20,
|
||||||
|
step = 0,
|
||||||
|
default = 7, defaultstore = MyStandardDefault,
|
||||||
|
default = 8, defaultstore = MyManufactureDefault,
|
||||||
|
endnumeric;
|
||||||
|
|
||||||
|
guidop
|
||||||
|
guid = DRIVER_SAMPLE_FORMSET_GUID,
|
||||||
|
datatype = MY_EFI_BITS_VARSTORE_DATA,
|
||||||
|
data.EfiBitNumeric = 1,
|
||||||
|
data.EfiBitOneof = 1,
|
||||||
|
data.EfiBitCheckbox = 1,
|
||||||
|
endguidop;
|
||||||
|
|
||||||
|
endform;
|
||||||
|
|
||||||
endformset;
|
endformset;
|
||||||
|
|
|
@ -273,6 +273,69 @@
|
||||||
#language fr-FR "Select this question will pop up a message box, then user can decide whether exit curret form or not"
|
#language fr-FR "Select this question will pop up a message box, then user can decide whether exit curret form or not"
|
||||||
#string STR_POPUP_STRING #language en-US "Are you sure to exit current form?"
|
#string STR_POPUP_STRING #language en-US "Are you sure to exit current form?"
|
||||||
#language fr-FR "Are you sure to exit current form?"
|
#language fr-FR "Are you sure to exit current form?"
|
||||||
|
//
|
||||||
|
// Form 7 to show Questions which refer to Union Bit varstore
|
||||||
|
//
|
||||||
|
#string STR_FORM7_TITLE #language en-US "Form to Show Questions with union and bit VarStore"
|
||||||
|
#language fr-FR "Form to Show Questions with union and bit VarStore"
|
||||||
|
#string STR_GOTO_FORM7 #language en-US "Enter Page 7"
|
||||||
|
#language fr-FR "Enter Page 7"
|
||||||
|
#string STR_GOTO_FORM7_HELP #language en-US "This Form is to Show Questions with union and bit VarStore"
|
||||||
|
#language fr-FR "This Form is to Show Questions with union and bit VarStore"
|
||||||
|
#string STR_NEST_BIT_EFI_VARSTORE #language en-US "Nested BIT fields in efivarstore"
|
||||||
|
#language fr-FR "Nested BIT fields in efivarstore"
|
||||||
|
#string STR_BIT_EFI_VARSTORE #language en-US "BIT fields in efivarstore"
|
||||||
|
#language fr-FR "BIT fields in efivarstore"
|
||||||
|
#string STR_NEST_BIT_VARSTORE #language en-US "Nested BIT fields in bufferstore"
|
||||||
|
#language fr-FR "Nested BIT fields in bufferstore"
|
||||||
|
#string STR_BIT_VARSTORE #language en-US "BIT fields in bufferstore"
|
||||||
|
#language fr-FR "BIT fields in bufferstore"
|
||||||
|
#string STR_UNION_EFI_VARSTORE #language en-US "Union efivarstore"
|
||||||
|
#language fr-FR "Union efivarstore"
|
||||||
|
#string STR_BIT_NEST_CHECK_BOX_PROMPT #language en-US "NEST_BIT check box"
|
||||||
|
#language fr-FR "NEST_BIT check box"
|
||||||
|
#string STR_BIT_NEST_CHECK_BOX_HELP #language en-US "The check box refer to nested bit field, the default is checked"
|
||||||
|
#language fr-FR "The check box refer to nested bit field, the default is checked"
|
||||||
|
#string STR_ONE_OF_BIT_NEST_PROMPT #language en-US "NEST_BIT one-of"
|
||||||
|
#language fr-FR "NEST_BIT one-of"
|
||||||
|
#string STR_ONE_OF_BIT_NEST_HELP #language en-US "The oneof refer to nested bit field"
|
||||||
|
#language fr-FR "The oneof refer to nested bit field"
|
||||||
|
#string STR_BIT_NEST_NUMERIC_PROMPT #language en-US "NEST_BIT numeric"
|
||||||
|
#language fr-FR "NEST_BIT numeric"
|
||||||
|
#string STR_BIT_NEST_NUMERIC_HELP #language en-US "The numeric refer to nested bit field, the Standard default is 6 Manufacture default is 7"
|
||||||
|
#language fr-FR "The numeric refer to nested bit field, the Standard default is 6 Manufacture default is 7"
|
||||||
|
#string BYTE_QUESTION_NEST_BIT_PROMPT #language en-US "Use byte field in NEST_BIT structure"
|
||||||
|
#language fr-FR "Use byte field in NEST_BIT structure"
|
||||||
|
#string BYTE_QUESTION_NEST_BIT_HELP #language en-US "The Question refer to byte field in NEST_BIT structure"
|
||||||
|
#language fr-FR "The Question refer to byte field in NEST_BIT structure"
|
||||||
|
#string STR_BIT_NEST_NUMERIC_DEFAULT_HELP #language en-US "NEST_BIT numeric, default value form callback function, the Standard default is C Manufacture default is D"
|
||||||
|
#language fr-FR "NEST_BIT numeric, default value form callback function, the Standard default is C Manufacture default is D"
|
||||||
|
#string STR_BIT_CHECK_BOX_PROMPT #language en-US "BIT check box"
|
||||||
|
#language fr-FR "BIT check box"
|
||||||
|
#string STR_BIT_CHECK_BOX_HELP #language en-US "The check box refer to bit field, the default is checked"
|
||||||
|
#language fr-FR "The check box refer to bit field, the default is checked"
|
||||||
|
#string STR_ONE_OF_BIT_PROMPT #language en-US "BIT one-of"
|
||||||
|
#language fr-FR "BIT one-of"
|
||||||
|
#string STR_ONE_OF_BIT_HELP #language en-US "The one-of refer to bit field"
|
||||||
|
#language fr-FR "The one-of refer to bit field"
|
||||||
|
#string STR_BIT_NUMERIC_PROMPT #language en-US "BIT numeric"
|
||||||
|
#language fr-FR "BIT numeric"
|
||||||
|
#string STR_BIT_NUMERIC_HELP #language en-US "The numeric refer to bit field, the Standard default is 4 Manufacture default is 5"
|
||||||
|
#language fr-FR "The numeric refer to bit field the Standard default is 4 Manufacture default is 5"
|
||||||
|
#string STR_BUFFER_BIT_NUMERIC_HELP #language en-US "The numeric refer to bit field, the Standard default is 16 Manufacture default is 17"
|
||||||
|
#language fr-FR "The numeric refer to bit field, the Standard default is 16 Manufacture default is 17"
|
||||||
|
#string BYTE_QUESTION_BIT_PROMPT #language en-US "Use byte field in BIT structure"
|
||||||
|
#language fr-FR "Use byte field in BIT structure"
|
||||||
|
#string BYTE_QUESTION_BIT_HELP #language en-US "The question refer to byte field in BIT structure"
|
||||||
|
#language fr-FR "The question refer to byte field in BIT structure"
|
||||||
|
#string STR_UNION_BYTE_NUMERIC_PROMPT #language en-US "UNION EfiVarStore byte numeric"
|
||||||
|
#language fr-FR "UNION EfiVarStore byte numeric"
|
||||||
|
#string STR_UNION_BYTE_NUMERIC_HELP #language en-US "Question refer to byte field in UNION type efivastore, the Standard default is 7 Manufacture default is 8"
|
||||||
|
#language fr-FR "Question refer to byte field in UNION type efivastore, the Standard default is 7 Manufacture default is 8"
|
||||||
|
#string STR_UNION_BIT_NUMERIC_PROMPT #language en-US "UNION EfiVarStore bit numeric"
|
||||||
|
#language fr-FR "UNION EfiVarStore bit numeric"
|
||||||
|
#string STR_UNION_BIT_NUMERIC_HELP #language en-US "Question refer to bit field in UNION type efivastore, the Standard default is 7 Manufacture default is 8"
|
||||||
|
#language fr-FR "Question refer to bit field in UNION type efivastore, the Standard default is 7 Manufacture default is 8"
|
||||||
// Boot Order
|
// Boot Order
|
||||||
#string STR_BOOT_TITLE #language en-US "Boot"
|
#string STR_BOOT_TITLE #language en-US "Boot"
|
||||||
#string STR_BOOT_OPTIONS #language en-US "Boot Order"
|
#string STR_BOOT_OPTIONS #language en-US "Boot Order"
|
||||||
|
|
Loading…
Reference in New Issue