From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Permerror (SPF Permanent Error: More than 10 MX records returned) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 036B8221E0680 for ; Wed, 13 Dec 2017 18:39:26 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2017 18:44:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,399,1508828400"; d="scan'208";a="184012479" Received: from ray-dev.ccr.corp.intel.com (HELO [10.239.9.14]) ([10.239.9.14]) by orsmga005.jf.intel.com with ESMTP; 13 Dec 2017 18:44:05 -0800 To: Leif Lindholm , edk2-devel@lists.01.org Cc: Michael D Kinney , Eric Dong , Star Zeng , Liming Gao , Ard Biesheuvel References: <20171213122630.17023-1-leif.lindholm@linaro.org> <20171213122630.17023-2-leif.lindholm@linaro.org> From: "Ni, Ruiyu" Message-ID: <59f1f807-a54c-9f4f-ce9f-aa83409dea8c@Intel.com> Date: Thu, 14 Dec 2017 10:44:04 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171213122630.17023-2-leif.lindholm@linaro.org> Subject: Re: [PATCH 1/3] MdePkg: break #defines out of Uefi/UefiMultiPhase.h X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 02:39:27 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 12/13/2017 8:26 PM, Leif Lindholm wrote: > Turns out all .vfr files in the tree interacting with DynamicPcds > manually copy the same set of EFI_VARIABLE_* definitions, since the rest > of UefiMultiPhase.h is incompatible with VfrCompile. > > Split these out into a separate header file UefiMultiPhaseDefinitions.h > in order to make it possible to include just that portion into .vfr > files. Then include that from UefiMultiPhase.h. > > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Ard Biesheuvel > Cc: Star Zeng > Cc: Eric Dong > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Leif Lindholm > --- > MdePkg/Include/Uefi/UefiMultiPhase.h | 23 +----------- > MdePkg/Include/Uefi/UefiMultiPhaseDefinitions.h | 39 ++++++++++++++++++++ > 2 files changed, 41 insertions(+), 21 deletions(-) > > diff --git a/MdePkg/Include/Uefi/UefiMultiPhase.h b/MdePkg/Include/Uefi/UefiMultiPhase.h > index 0dcbb1b9ee..b360c9513b 100644 > --- a/MdePkg/Include/Uefi/UefiMultiPhase.h > +++ b/MdePkg/Include/Uefi/UefiMultiPhase.h > @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > #ifndef __UEFI_MULTIPHASE_H__ > #define __UEFI_MULTIPHASE_H__ > > +#include "UefiMultiPhaseDefinitions.h" > + > #include > /// > /// Enumeration of memory types introduced in UEFI. > @@ -156,27 +158,6 @@ typedef struct { > } EFI_TABLE_HEADER; > > /// > -/// Attributes of variable. > -/// > -#define EFI_VARIABLE_NON_VOLATILE 0x00000001 > -#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 > -#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 > -/// > -/// This attribute is identified by the mnemonic 'HR' > -/// elsewhere in this specification. > -/// > -#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008 > -/// > -/// Attributes of Authenticated Variable > -/// > -#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020 > -#define EFI_VARIABLE_APPEND_WRITE 0x00000040 > -/// > -/// NOTE: EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should be considered reserved. > -/// > -#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010 > - > -/// > /// AuthInfo is a WIN_CERTIFICATE using the wCertificateType > /// WIN_CERTIFICATE_UEFI_GUID and the CertType > /// EFI_CERT_TYPE_RSA2048_SHA256_GUID. If the attribute specifies > diff --git a/MdePkg/Include/Uefi/UefiMultiPhaseDefinitions.h b/MdePkg/Include/Uefi/UefiMultiPhaseDefinitions.h > new file mode 100644 > index 0000000000..df55a92dfa > --- /dev/null > +++ b/MdePkg/Include/Uefi/UefiMultiPhaseDefinitions.h > @@ -0,0 +1,39 @@ > +/** @file > + This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases. > + > +Copyright (c) 2006 - 2017, 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 that accompanies this distribution. > +The full text of the license may be found at > +http://opensource.org/licenses/bsd-license.php. > + > +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > + > +**/ > + > +#ifndef __UEFI_MULTIPHASE_DEFS_H__ > +#define __UEFI_MULTIPHASE_DEFS_H__ > + > +/// > +/// Attributes of variable. > +/// > +#define EFI_VARIABLE_NON_VOLATILE 0x00000001 > +#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 > +#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 > +/// > +/// This attribute is identified by the mnemonic 'HR' > +/// elsewhere in this specification. > +/// > +#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008 > +/// > +/// Attributes of Authenticated Variable > +/// > +#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020 > +#define EFI_VARIABLE_APPEND_WRITE 0x00000040 > +/// > +/// NOTE: EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should be considered reserved. > +/// > +#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010 > + > +#endif > Can we just move the definitions to UefiBaseTypes.h? Even vfrcompiler still complains, the syntax enhancement to vfrcompiler should be simple. I personally do not like creating more and more files. -- Thanks, Ray