From nobody Tue Apr 30 02:38:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1520392002593554.8403216332846; Tue, 6 Mar 2018 19:06:42 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 67D89224C0F58; Tue, 6 Mar 2018 19:00:26 -0800 (PST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 35E7E22283508 for ; Tue, 6 Mar 2018 19:00:24 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2018 19:06:39 -0800 Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga003.jf.intel.com with ESMTP; 06 Mar 2018 19:06:38 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,434,1515484800"; d="scan'208";a="32978292" From: Dandan Bi To: edk2-devel@lists.01.org Date: Wed, 7 Mar 2018 11:06:25 +0800 Message-Id: <1520391985-22332-1-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [edk2] [patch] MdeModulePkg/DriverSampleDxe: Refine the sample case for UNION type X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Dong , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The example of UNION storage is not good, now update it. Cc: Eric Dong Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi Reviewed-by: Liming Gao --- MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h | 6 +++--- MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr | 14 ++------------ MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni | 6 +----- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h b/MdeModu= lePkg/Universal/DriverSampleDxe/NVDataStruc.h index 6f092de..208a4c6 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h +++ b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h @@ -1,8 +1,8 @@ /** @file =20 -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
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 http://opensource.org/licenses/bsd-license.php =20 @@ -51,12 +51,12 @@ typedef struct { UINT8 : 0; // Special width 0 can be used to force a= lignment at the next word boundary UINT8 NestBitNumeric : 4; } MY_BITS_DATA; =20 typedef union { - UINT16 BitField : 10; - UINT8 ByteField; + UINT8 UnionNumeric; + UINT8 UnionNumericAlias; } MY_EFI_UNION_DATA; =20 typedef struct { UINT16 MyStringData[40]; UINT16 SomethingHiddenForHtml; diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/= Universal/DriverSampleDxe/Vfr.vfr index b1017d9..9d99dcf 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -1,10 +1,10 @@ ///** @file // // Sample Setup formset. // -// Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
// 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 // http://opensource.org/licenses/bsd-license.php // @@ -913,30 +913,20 @@ formset endnumeric; =20 subtitle text =3D STRING_TOKEN(STR_SUBTITLE_TEXT2); subtitle text =3D STRING_TOKEN(STR_UNION_EFI_VARSTORE); =20 - numeric varid =3D MyEfiUnionVar.ByteField, + numeric varid =3D MyEfiUnionVar.UnionNumeric, prompt =3D STRING_TOKEN(STR_UNION_BYTE_NUMERIC_PROMPT), help =3D STRING_TOKEN(STR_UNION_BYTE_NUMERIC_HELP), minimum =3D 0, maximum =3D 20, step =3D 0, default =3D 7, defaultstore =3D MyStandardDefault, default =3D 8, defaultstore =3D MyManufactureDefault, endnumeric; =20 - numeric varid =3D MyEfiUnionVar.BitField, - prompt =3D STRING_TOKEN(STR_UNION_BIT_NUMERIC_PROMPT), - help =3D STRING_TOKEN(STR_UNION_BIT_NUMERIC_HELP), - minimum =3D 0, - maximum =3D 20, - step =3D 0, - default =3D 7, defaultstore =3D MyStandardDefault, - default =3D 8, defaultstore =3D MyManufactureDefault, - endnumeric; - guidop guid =3D DRIVER_SAMPLE_FORMSET_GUID, datatype =3D MY_EFI_BITS_VARSTORE_DATA, data.EfiBitNumeric =3D 1, data.EfiBitOneof =3D 1, diff --git a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni b/MdeMod= ulePkg/Universal/DriverSampleDxe/VfrStrings.uni index 7cc6a19..2215c08 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni +++ b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni @@ -1,8 +1,8 @@ // *++ // -// Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials =20 // are licensed and made available under the terms and conditions of the B= SD License =20 // which accompanies this distribution. The full text of the license may = be found at =20 // http://opensource.org/licenses/bsd-license.php = =20 // = =20 @@ -330,14 +330,10 @@ #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 d= efault is 8" - #language fr-FR "Question refer to = bit field in UNION type efivastore, the Standard default is 7 Manufacture d= efault is 8" // Boot Order #string STR_BOOT_TITLE #language en-US "Boot" #string STR_BOOT_OPTIONS #language en-US "Boot Order" #string STR_BOOT_OPTION1 #language en-US "IDE HDD" #string STR_BOOT_OPTION2 #language en-US "ATAPI CD" --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel