diff mbox series

[edk2,v2,1/3] MdePkg: restrict UefiMultiPhase.h contents if VFRCOMPILE defined

Message ID 20171215165925.12306-2-leif.lindholm@linaro.org
State Accepted
Commit 8bbb56b485ba933cf76dc7480c8fff450989a573
Headers show
Series Use central definitions for EFI_VARIABLE_* | expand

Commit Message

Leif Lindholm Dec. 15, 2017, 4:59 p.m. UTC
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(-)

-- 
2.11.0

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

Comments

Zeng, Star Dec. 17, 2017, 11:23 a.m. UTC | #1
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
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Leif Lindholm Feb. 22, 2018, 8:09 p.m. UTC | #2
Hi Star,

I lost track of this one during my sabbatical until Ard's patch
earlier today jogged my memory.

On Sun, Dec 17, 2017 at 11:23:10AM +0000, Zeng, Star wrote:
> 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?


I have raised https://bugzilla.tianocore.org/show_bug.cgi?id=878
for the enhancement.

Are you OK with the patch as below (it rebases cleanly to current
master) if I add the paragraph:
---
https://bugzilla.tianocore.org/show_bug.cgi?id=878 has been raised to
request VfrCompile is extended to support the original format.
---
to the end of the commit message?

Regards,

Leif
> 

> 

> 

> 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

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Zeng, Star Feb. 23, 2018, 2:33 a.m. UTC | #3
Leif,

On 2018/2/23 4:09, Leif Lindholm wrote:
> Hi Star,

> 

> I lost track of this one during my sabbatical until Ard's patch

> earlier today jogged my memory.

> 

> On Sun, Dec 17, 2017 at 11:23:10AM +0000, Zeng, Star wrote:

>> 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?

> 

> I have raised https://bugzilla.tianocore.org/show_bug.cgi?id=878

> for the enhancement.

> 

> Are you OK with the patch as below (it rebases cleanly to current

> master) if I add the paragraph:

> ---

> https://bugzilla.tianocore.org/show_bug.cgi?id=878 has been raised to

> request VfrCompile is extended to support the original format.

> ---

> to the end of the commit message?


I am ok. With this update, Reviewed-by: Star Zeng <star.zeng@intel.com>.
I have given RB to MdeModulePkg change before. :)

You may also get opinion from Mike and Liming.

Thanks,
Star

> 

> Regards,

> 

> Leif

>>

>>

>>

>> 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


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Gao, Liming Feb. 23, 2018, 10:25 a.m. UTC | #4
I agree the change in MdePkg. Reviewed-by: Liming Gao <liming.gao@intel.com>

Thanks
Liming
>-----Original Message-----

>From: Zeng, Star

>Sent: Friday, February 23, 2018 10:34 AM

>To: Leif Lindholm <leif.lindholm@linaro.org>

>Cc: Kinney, Michael D <michael.d.kinney@intel.com>; edk2-

>devel@lists.01.org; Gao, Liming <liming.gao@intel.com>; Zeng, Star

><star.zeng@intel.com>

>Subject: Re: [edk2] [PATCH v2 1/3] MdePkg: restrict UefiMultiPhase.h

>contents if VFRCOMPILE defined

>

>Leif,

>

>On 2018/2/23 4:09, Leif Lindholm wrote:

>> Hi Star,

>>

>> I lost track of this one during my sabbatical until Ard's patch

>> earlier today jogged my memory.

>>

>> On Sun, Dec 17, 2017 at 11:23:10AM +0000, Zeng, Star wrote:

>>> 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?

>>

>> I have raised https://bugzilla.tianocore.org/show_bug.cgi?id=878

>> for the enhancement.

>>

>> Are you OK with the patch as below (it rebases cleanly to current

>> master) if I add the paragraph:

>> ---

>> https://bugzilla.tianocore.org/show_bug.cgi?id=878 has been raised to

>> request VfrCompile is extended to support the original format.

>> ---

>> to the end of the commit message?

>

>I am ok. With this update, Reviewed-by: Star Zeng <star.zeng@intel.com>.

>I have given RB to MdeModulePkg change before. :)

>

>You may also get opinion from Mike and Liming.

>

>Thanks,

>Star

>

>>

>> Regards,

>>

>> Leif

>>>

>>>

>>>

>>> 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


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Leif Lindholm Feb. 23, 2018, 11:40 a.m. UTC | #5
On Fri, Feb 23, 2018 at 10:33:46AM +0800, Zeng, Star wrote:
> Leif,

> 

> On 2018/2/23 4:09, Leif Lindholm wrote:

> > Hi Star,

> > 

> > I lost track of this one during my sabbatical until Ard's patch

> > earlier today jogged my memory.

> > 

> > On Sun, Dec 17, 2017 at 11:23:10AM +0000, Zeng, Star wrote:

> > > 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?

> > 

> > I have raised https://bugzilla.tianocore.org/show_bug.cgi?id=878

> > for the enhancement.

> > 

> > Are you OK with the patch as below (it rebases cleanly to current

> > master) if I add the paragraph:

> > ---

> > https://bugzilla.tianocore.org/show_bug.cgi?id=878 has been raised to

> > request VfrCompile is extended to support the original format.

> > ---

> > to the end of the commit message?

> 

> I am ok. With this update, Reviewed-by: Star Zeng <star.zeng@intel.com>.


Thanks!

> I have given RB to MdeModulePkg change before. :)


Yup.

> You may also get opinion from Mike and Liming.


Of course.

/
    Leif
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Leif Lindholm Feb. 23, 2018, 2:24 p.m. UTC | #6
On Fri, Feb 23, 2018 at 10:25:32AM +0000, Gao, Liming wrote:
> I agree the change in MdePkg. Reviewed-by: Liming Gao <liming.gao@intel.com>


Thanks all!
Series pushed as d624deb7ab..aae5def8bb.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

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