[edk2-devel] [PATCH 4/4] MdePkg: Add FMP Capsule Image Header extension

Oleksiy Yakovlev posted 4 patches 5 years, 10 months ago
There is a newer version of this series
[edk2-devel] [PATCH 4/4] MdePkg: Add FMP Capsule Image Header extension
Posted by Oleksiy Yakovlev 5 years, 10 months ago
Add bitmask to structure which gives a binary-inspectable mechanism to determine
if a capsule contains an authentication section or depex section.
(UEFI 2.8 errata a, mantis 2026)

Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com>
---
 MdePkg/Include/Guid/FmpCapsule.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/Guid/FmpCapsule.h b/MdePkg/Include/Guid/FmpCapsule.h
index fb8c346..6bbdf0e 100644
--- a/MdePkg/Include/Guid/FmpCapsule.h
+++ b/MdePkg/Include/Guid/FmpCapsule.h
@@ -79,13 +79,22 @@ typedef struct {
   /// therefore can be modified without changing the Auth data.
   ///
   UINT64   UpdateHardwareInstance;
+  
+  ///
+  /// A 64-bit bitmask that determines what sections are added to the payload.
+  /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0000000000000001
+  /// #define CAPSULE_SUPPORT_DEPENDENCY 0x0000000000000002
+  ///
+  UINT64   ImageCapsuleSupport; 
 } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER;
 
 #pragma pack()
 
 
 #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION       0x00000001
-#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x00000002
+#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x00000003
+#define CAPSULE_SUPPORT_AUTHENTICATION    0x0000000000000001
+#define CAPSULE_SUPPORT_DEPENDENCY        0x0000000000000002
 
 extern EFI_GUID gEfiFmpCapsuleGuid;
 
-- 
2.9.0.windows.1


Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary to American Megatrends (AMI).  This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited.  Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#57232): https://edk2.groups.io/g/devel/message/57232
Mute This Topic: https://groups.io/mt/72930098/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [EXTERNAL] [edk2-devel] [PATCH 4/4] MdePkg: Add FMP Capsule Image Header extension
Posted by Bret Barkelew via groups.io 5 years, 10 months ago
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>

- Bret

________________________________
From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Oleksiy Yakovlev via groups.io <oleksiyy=ami.com@groups.io>
Sent: Friday, April 10, 2020 12:58:03 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: liming.gao@intel.com <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Felixp@ami.com <Felixp@ami.com>; oleksiyy@ami.com <oleksiyy@ami.com>
Subject: [EXTERNAL] [edk2-devel] [PATCH 4/4] MdePkg: Add FMP Capsule Image Header extension

Add bitmask to structure which gives a binary-inspectable mechanism to determine
if a capsule contains an authentication section or depex section.
(UEFI 2.8 errata a, mantis 2026)

Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com>
---
 MdePkg/Include/Guid/FmpCapsule.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/Guid/FmpCapsule.h b/MdePkg/Include/Guid/FmpCapsule.h
index fb8c346..6bbdf0e 100644
--- a/MdePkg/Include/Guid/FmpCapsule.h
+++ b/MdePkg/Include/Guid/FmpCapsule.h
@@ -79,13 +79,22 @@ typedef struct {
   /// therefore can be modified without changing the Auth data.
   ///
   UINT64   UpdateHardwareInstance;
+
+  ///
+  /// A 64-bit bitmask that determines what sections are added to the payload.
+  /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0000000000000001
+  /// #define CAPSULE_SUPPORT_DEPENDENCY 0x0000000000000002
+  ///
+  UINT64   ImageCapsuleSupport;
 } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER;

 #pragma pack()


 #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION       0x00000001
-#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x00000002
+#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x00000003
+#define CAPSULE_SUPPORT_AUTHENTICATION    0x0000000000000001
+#define CAPSULE_SUPPORT_DEPENDENCY        0x0000000000000002

 extern EFI_GUID gEfiFmpCapsuleGuid;

--
2.9.0.windows.1


Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary to American Megatrends (AMI).  This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited.  Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#57252): https://edk2.groups.io/g/devel/message/57252
Mute This Topic: https://groups.io/mt/72934808/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 4/4] MdePkg: Add FMP Capsule Image Header extension
Posted by Zhiguang Liu 5 years, 9 months ago
Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Oleksiy
> Yakovlev
> Sent: Saturday, April 11, 2020 3:58 AM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Felixp@ami.com; oleksiyy@ami.com
> Subject: [edk2-devel] [PATCH 4/4] MdePkg: Add FMP Capsule Image Header
> extension
> 
> Add bitmask to structure which gives a binary-inspectable mechanism to
> determine if a capsule contains an authentication section or depex section.
> (UEFI 2.8 errata a, mantis 2026)
> 
> Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com>
> ---
>  MdePkg/Include/Guid/FmpCapsule.h | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Include/Guid/FmpCapsule.h
> b/MdePkg/Include/Guid/FmpCapsule.h
> index fb8c346..6bbdf0e 100644
> --- a/MdePkg/Include/Guid/FmpCapsule.h
> +++ b/MdePkg/Include/Guid/FmpCapsule.h
> @@ -79,13 +79,22 @@ typedef struct {
>    /// therefore can be modified without changing the Auth data.
>    ///
>    UINT64   UpdateHardwareInstance;
> +
> +  ///
> +  /// A 64-bit bitmask that determines what sections are added to the
> payload.
> +  /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0000000000000001
> ///
> + #define CAPSULE_SUPPORT_DEPENDENCY 0x0000000000000002  ///
> +  UINT64   ImageCapsuleSupport;
>  } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER;
> 
>  #pragma pack()
> 
> 
>  #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION
> 0x00000001
> -#define
> EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION
> 0x00000002
> +#define
> EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION
> 0x00000003
> +#define CAPSULE_SUPPORT_AUTHENTICATION    0x0000000000000001
> +#define CAPSULE_SUPPORT_DEPENDENCY        0x0000000000000002
> 
>  extern EFI_GUID gEfiFmpCapsuleGuid;
> 
> --
> 2.9.0.windows.1
> 
> 
> Please consider the environment before printing this email.
> 
> The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI).  This communication is intended
> to be read only by the individual or entity to whom it is addressed or by their
> designee. If the reader of this message is not the intended recipient, you are
> on notice that any distribution of this message, in any form, is strictly
> prohibited.  Please promptly notify the sender by reply e-mail or by
> telephone at 770-246-8600, and then delete or destroy all copies of the
> transmission.
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#59046): https://edk2.groups.io/g/devel/message/59046
Mute This Topic: https://groups.io/mt/72930098/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 4/4] MdePkg: Add FMP Capsule Image Header extension
Posted by Xu, Wei6 5 years, 9 months ago
Hi Oleksiy,

Please help to update the related header version check as well. Thanks.
For example, https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c#L288
Without updating the version check, it will cause header size miscalculation and lead to capsule update failure.

BR,
Wei

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Zhiguang Liu
Sent: Monday, May 11, 2020 2:14 PM
To: devel@edk2.groups.io; oleksiyy@ami.com
Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Felixp@ami.com
Subject: Re: [edk2-devel] [PATCH 4/4] MdePkg: Add FMP Capsule Image Header extension

Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Oleksiy 
> Yakovlev
> Sent: Saturday, April 11, 2020 3:58 AM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D 
> <michael.d.kinney@intel.com>; Felixp@ami.com; oleksiyy@ami.com
> Subject: [edk2-devel] [PATCH 4/4] MdePkg: Add FMP Capsule Image Header 
> extension
> 
> Add bitmask to structure which gives a binary-inspectable mechanism to 
> determine if a capsule contains an authentication section or depex section.
> (UEFI 2.8 errata a, mantis 2026)
> 
> Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com>
> ---
>  MdePkg/Include/Guid/FmpCapsule.h | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Include/Guid/FmpCapsule.h
> b/MdePkg/Include/Guid/FmpCapsule.h
> index fb8c346..6bbdf0e 100644
> --- a/MdePkg/Include/Guid/FmpCapsule.h
> +++ b/MdePkg/Include/Guid/FmpCapsule.h
> @@ -79,13 +79,22 @@ typedef struct {
>    /// therefore can be modified without changing the Auth data.
>    ///
>    UINT64   UpdateHardwareInstance;
> +
> +  ///
> +  /// A 64-bit bitmask that determines what sections are added to the
> payload.
> +  /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0000000000000001
> ///
> + #define CAPSULE_SUPPORT_DEPENDENCY 0x0000000000000002  ///
> +  UINT64   ImageCapsuleSupport;
>  } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER;
> 
>  #pragma pack()
> 
> 
>  #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION
> 0x00000001
> -#define
> EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION
> 0x00000002
> +#define
> EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION
> 0x00000003
> +#define CAPSULE_SUPPORT_AUTHENTICATION    0x0000000000000001
> +#define CAPSULE_SUPPORT_DEPENDENCY        0x0000000000000002
> 
>  extern EFI_GUID gEfiFmpCapsuleGuid;
> 
> --
> 2.9.0.windows.1
> 
> 
> Please consider the environment before printing this email.
> 
> The information contained in this message may be confidential and 
> proprietary to American Megatrends (AMI).  This communication is 
> intended to be read only by the individual or entity to whom it is 
> addressed or by their designee. If the reader of this message is not 
> the intended recipient, you are on notice that any distribution of 
> this message, in any form, is strictly prohibited.  Please promptly 
> notify the sender by reply e-mail or by telephone at 770-246-8600, and 
> then delete or destroy all copies of the transmission.
> 
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#59130): https://edk2.groups.io/g/devel/message/59130
Mute This Topic: https://groups.io/mt/72930098/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-