public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zeng, Star" <star.zeng@intel.com>
To: Leif Lindholm <leif.lindholm@linaro.org>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>,
	"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH v2 1/3] MdePkg: restrict UefiMultiPhase.h contents if VFRCOMPILE defined
Date: Sun, 17 Dec 2017 11:23:10 +0000	[thread overview]
Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B9C46A4@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20171215165925.12306-2-leif.lindholm@linaro.org>

Leif,

You may submit a bugzilla for the long term approach as Liming suggested in V1 patch series, and then add the bug link in this commit log?



Thanks,
Star
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Leif Lindholm
Sent: Saturday, December 16, 2017 12:59 AM
To: edk2-devel@lists.01.org
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [edk2] [PATCH v2 1/3] MdePkg: restrict UefiMultiPhase.h contents if VFRCOMPILE defined

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.

Instead, reshuffle these definitions to the start of the file, and put the rest of the file behind #ifndef VFRCOMPILE to permit direct inclusion in .vfr source files.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---
 MdePkg/Include/Uefi/UefiMultiPhase.h | 44 ++++++++++----------
 1 file changed, 23 insertions(+), 21 deletions(-)

diff --git a/MdePkg/Include/Uefi/UefiMultiPhase.h b/MdePkg/Include/Uefi/UefiMultiPhase.h
index 0dcbb1b9ee..67ecc4c27c 100644
--- a/MdePkg/Include/Uefi/UefiMultiPhase.h
+++ b/MdePkg/Include/Uefi/UefiMultiPhase.h
@@ -15,6 +15,28 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __UEFI_MULTIPHASE_H__
 #define __UEFI_MULTIPHASE_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
+
+#ifndef VFRCOMPILE
 #include <Guid/WinCertificate.h>
 ///
 /// Enumeration of memory types introduced in UEFI.
@@ -156,27 +178,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 @@ -229,5 +230,6 @@ typedef struct {
   ///
   WIN_CERTIFICATE_UEFI_GUID   AuthInfo;
  } EFI_VARIABLE_AUTHENTICATION_2;
+#endif // VFRCOMPILE
 
 #endif
--
2.11.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


  reply	other threads:[~2017-12-17 11:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15 16:59 [PATCH v2 0/3] Use central definitions for EFI_VARIABLE_* Leif Lindholm
2017-12-15 16:59 ` [PATCH v2 1/3] MdePkg: restrict UefiMultiPhase.h contents if VFRCOMPILE defined Leif Lindholm
2017-12-17 11:23   ` Zeng, Star [this message]
2018-02-22 20:09     ` Leif Lindholm
2018-02-23  2:33       ` Zeng, Star
2018-02-23 10:25         ` Gao, Liming
2018-02-23 14:24           ` Leif Lindholm
2018-02-23 11:40         ` Leif Lindholm
2017-12-15 16:59 ` [PATCH v2 2/3] MdeModulePkg: use central variable definitions in DriverSampleDxe Leif Lindholm
2017-12-17 11:20   ` Zeng, Star
2017-12-15 16:59 ` [PATCH v2 3/3] EmbeddedPkg: use central variable definitions in .vfr files Leif Lindholm
2018-02-22 16:33   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0C09AFA07DD0434D9E2A0C6AEB0483103B9C46A4@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox