summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/DriverSampleDxe
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2018-03-07 10:34:00 +0800
committerLiming Gao <liming.gao@intel.com>2018-03-08 08:58:47 +0800
commitf7d05bddd7e7a1f094a549b5da8d0141d4060c25 (patch)
treebc9ec5277392a4dd0beb1cc56afc5a6d816ee1b0 /MdeModulePkg/Universal/DriverSampleDxe
parent777f4aa083e9f8b1853e454a0390d71dde2616da (diff)
downloadedk2-f7d05bddd7e7a1f094a549b5da8d0141d4060c25.tar.gz
edk2-f7d05bddd7e7a1f094a549b5da8d0141d4060c25.tar.bz2
edk2-f7d05bddd7e7a1f094a549b5da8d0141d4060c25.zip
MdeModulePkg/DriverSampleDxe: Refine the sample case for UNION type
The example of UNION storage is not good, now update it. 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: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/DriverSampleDxe')
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h6
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr14
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni6
3 files changed, 6 insertions, 20 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
index 6f092de8b6..208a4c6d91 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
+++ b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2018, 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
which accompanies this distribution. The full text of the license may be found at
@@ -53,8 +53,8 @@ typedef struct {
} MY_BITS_DATA;
typedef union {
- UINT16 BitField : 10;
- UINT8 ByteField;
+ UINT8 UnionNumeric;
+ UINT8 UnionNumericAlias;
} MY_EFI_UNION_DATA;
typedef struct {
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
index b1017d9fd0..9d99dcf205 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
+++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
@@ -2,7 +2,7 @@
//
// Sample Setup formset.
//
-// Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2004 - 2018, 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
// which accompanies this distribution. The full text of the license may be found at
@@ -915,7 +915,7 @@ formset
subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2);
subtitle text = STRING_TOKEN(STR_UNION_EFI_VARSTORE);
- numeric varid = MyEfiUnionVar.ByteField,
+ numeric varid = MyEfiUnionVar.UnionNumeric,
prompt = STRING_TOKEN(STR_UNION_BYTE_NUMERIC_PROMPT),
help = STRING_TOKEN(STR_UNION_BYTE_NUMERIC_HELP),
minimum = 0,
@@ -925,16 +925,6 @@ formset
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,
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
index 7cc6a19e93..2215c08c5a 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
+++ b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
@@ -1,6 +1,6 @@
// *++
//
-// Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2007 - 2018, 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
// which accompanies this distribution. The full text of the license may be found at
@@ -332,10 +332,6 @@
#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
#string STR_BOOT_TITLE #language en-US "Boot"
#string STR_BOOT_OPTIONS #language en-US "Boot Order"