* [PATCH V6 0/6] Add definitions introduced in UEFI 2.8a
@ 2020-05-13 22:39 Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 1/6] MdePkg: Add new CPER Notification types Oleksiy Yakovlev
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Oleksiy Yakovlev @ 2020-05-13 22:39 UTC (permalink / raw)
To: devel
Cc: liming.gao, michael.d.kinney, jian.j.wang, hao.a.wu, jiewen.yao,
chao.b.zhang, Felixp, oleksiyy
Following patches add/update structures/definitions, that were
introduced/modified by UEFI Spec v.2.8 errata a from Feb 14.
Oleksiy Yakovlev (6):
MdePkg: Add new CPER Notification types
MdePkg: Fix OUT parameters marked as IN OUT
MdePkg: Add EFI_RT_PROPERTIES_TABLE
MdePkg: Add FMP Capsule Image Header extension
MdeModulePkg: Add FMP Capsule Image Header extension
SignedCapsulePkg: Add FMP Capsule Image Header extension
MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 7 ++-
.../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 26 ++++++--
MdePkg/Include/Guid/Cper.h | 15 +++++
MdePkg/Include/Guid/FmpCapsule.h | 11 +++-
MdePkg/Include/Guid/RtPropertiesTable.h | 69 ++++++++++++++++++++++
MdePkg/Include/Protocol/AbsolutePointer.h | 2 +-
MdePkg/Include/Protocol/AtaPassThru.h | 4 +-
MdePkg/Include/Protocol/EdidOverride.h | 4 +-
MdePkg/Include/Protocol/FirmwareManagement.h | 4 +-
MdePkg/Include/Protocol/NvmExpressPassthru.h | 4 +-
MdePkg/Include/Protocol/ScsiPassThruExt.h | 2 +-
MdePkg/Include/Protocol/SdMmcPassThru.h | 4 +-
MdePkg/Include/Protocol/SimplePointer.h | 2 +-
MdePkg/Include/Uefi/UefiSpec.h | 8 +--
MdePkg/MdePkg.dec | 14 +++++
.../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 14 +++--
16 files changed, 160 insertions(+), 30 deletions(-)
create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h
--
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH V6 1/6] MdePkg: Add new CPER Notification types
2020-05-13 22:39 [PATCH V6 0/6] Add definitions introduced in UEFI 2.8a Oleksiy Yakovlev
@ 2020-05-13 22:39 ` Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 2/6] MdePkg: Fix OUT parameters marked as IN OUT Oleksiy Yakovlev
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Oleksiy Yakovlev @ 2020-05-13 22:39 UTC (permalink / raw)
To: devel
Cc: liming.gao, michael.d.kinney, jian.j.wang, hao.a.wu, jiewen.yao,
chao.b.zhang, Felixp, oleksiyy
Add SEA, SEI, and PEI CPER Notification types defined in UEFI 2.8 errata a.
(UEFI 2.8 errata a, mantis 2026)
Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
---
MdePkg/Include/Guid/Cper.h | 15 +++++++++++++++
MdePkg/MdePkg.dec | 9 +++++++++
2 files changed, 24 insertions(+)
diff --git a/MdePkg/Include/Guid/Cper.h b/MdePkg/Include/Guid/Cper.h
index 0cacd30..948f586 100644
--- a/MdePkg/Include/Guid/Cper.h
+++ b/MdePkg/Include/Guid/Cper.h
@@ -95,6 +95,18 @@ typedef struct {
{ \
0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 } \
}
+#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEA \
+ { \
+ 0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 } \
+ }
+#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEI \
+ { \
+ 0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 } \
+ }
+#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_PEI \
+ { \
+ 0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD } \
+ }
///@}
///
@@ -1207,6 +1219,9 @@ extern EFI_GUID gEfiEventNotificationTypeInitGuid;
extern EFI_GUID gEfiEventNotificationTypeNmiGuid;
extern EFI_GUID gEfiEventNotificationTypeBootGuid;
extern EFI_GUID gEfiEventNotificationTypeDmarGuid;
+extern EFI_GUID gEfiEventNotificationTypeSeaGuid;
+extern EFI_GUID gEfiEventNotificationTypeSeiGuid;
+extern EFI_GUID gEfiEventNotificationTypePeiGuid;
extern EFI_GUID gEfiProcessorGenericErrorSectionGuid;
extern EFI_GUID gEfiProcessorSpecificErrorSectionGuid;
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 86545ac..5ac1189 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -437,6 +437,15 @@
gEfiEventNotificationTypeDmarGuid = { 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 }}
## Include/Guid/Cper.h
+ gEfiEventNotificationTypeSeaGuid = { 0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 }}
+
+ ## Include/Guid/Cper.h
+ gEfiEventNotificationTypeSeiGuid = { 0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 }}
+
+ ## Include/Guid/Cper.h
+ gEfiEventNotificationTypePeiGuid = { 0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD }}
+
+ ## Include/Guid/Cper.h
gEfiProcessorGenericErrorSectionGuid = { 0x9876ccad, 0x47b4, 0x4bdb, { 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb }}
## Include/Guid/Cper.h
--
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.
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH V6 2/6] MdePkg: Fix OUT parameters marked as IN OUT
2020-05-13 22:39 [PATCH V6 0/6] Add definitions introduced in UEFI 2.8a Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 1/6] MdePkg: Add new CPER Notification types Oleksiy Yakovlev
@ 2020-05-13 22:39 ` Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 3/6] MdePkg: Add EFI_RT_PROPERTIES_TABLE Oleksiy Yakovlev
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Oleksiy Yakovlev @ 2020-05-13 22:39 UTC (permalink / raw)
To: devel
Cc: liming.gao, michael.d.kinney, jian.j.wang, hao.a.wu, jiewen.yao,
chao.b.zhang, Felixp, oleksiyy
Some OUT parameters in the specification were mistakenly marked as IN OUT.
"IN OUT" replaced with "OUT" in the following interfaces
EFI_BOOT_SERVICES.GetMemoryMap():MemoryMap
EFI_BOOT_SERVICES.LocateHandleBuffer():NoHandles
EFI_SIMPLE_POINTER_PROTOCOL.GetState():State
EFI_ABSOLUTE_POINTER_PROTOCOL.GetState():State
EFI_EDID_OVERRIDE_PROTOCOL.GetEdid():EdidSize and Edid
EFI_ATA_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath
EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath
EFI_SD_MMC_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath
EFI_EXT_SCSI_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath
EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage():Image
(UEFI 2.8 errata a, mantis 2035)
Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
---
MdePkg/Include/Protocol/AbsolutePointer.h | 2 +-
MdePkg/Include/Protocol/AtaPassThru.h | 4 ++--
MdePkg/Include/Protocol/EdidOverride.h | 4 ++--
MdePkg/Include/Protocol/FirmwareManagement.h | 4 ++--
MdePkg/Include/Protocol/NvmExpressPassthru.h | 4 ++--
MdePkg/Include/Protocol/ScsiPassThruExt.h | 2 +-
MdePkg/Include/Protocol/SdMmcPassThru.h | 4 ++--
MdePkg/Include/Protocol/SimplePointer.h | 2 +-
MdePkg/Include/Uefi/UefiSpec.h | 8 ++++----
9 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/MdePkg/Include/Protocol/AbsolutePointer.h b/MdePkg/Include/Protocol/AbsolutePointer.h
index 77d34ae..d59ac97 100644
--- a/MdePkg/Include/Protocol/AbsolutePointer.h
+++ b/MdePkg/Include/Protocol/AbsolutePointer.h
@@ -169,7 +169,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)(
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
- IN OUT EFI_ABSOLUTE_POINTER_STATE *State
+ OUT EFI_ABSOLUTE_POINTER_STATE *State
);
diff --git a/MdePkg/Include/Protocol/AtaPassThru.h b/MdePkg/Include/Protocol/AtaPassThru.h
index ce6f57f..888dff2 100644
--- a/MdePkg/Include/Protocol/AtaPassThru.h
+++ b/MdePkg/Include/Protocol/AtaPassThru.h
@@ -315,7 +315,7 @@ EFI_STATUS
@param[in] PortMultiplierPort The port multiplier port number of the ATA device for which a
device path node is to be allocated and built. If there is no
port multiplier, then specify 0xFFFF.
- @param[in,out] DevicePath A pointer to a single device path node that describes the ATA
+ @param[out] DevicePath A pointer to a single device path node that describes the ATA
device specified by Port and PortMultiplierPort. This function
is responsible for allocating the buffer DevicePath with the
boot service AllocatePool(). It is the caller's responsibility
@@ -334,7 +334,7 @@ EFI_STATUS
IN EFI_ATA_PASS_THRU_PROTOCOL *This,
IN UINT16 Port,
IN UINT16 PortMultiplierPort,
- IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
+ OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
);
/**
diff --git a/MdePkg/Include/Protocol/EdidOverride.h b/MdePkg/Include/Protocol/EdidOverride.h
index 9036f8b..709ee48 100644
--- a/MdePkg/Include/Protocol/EdidOverride.h
+++ b/MdePkg/Include/Protocol/EdidOverride.h
@@ -44,8 +44,8 @@ EFI_STATUS
IN EFI_EDID_OVERRIDE_PROTOCOL *This,
IN EFI_HANDLE *ChildHandle,
OUT UINT32 *Attributes,
- IN OUT UINTN *EdidSize,
- IN OUT UINT8 **Edid
+ OUT UINTN *EdidSize,
+ OUT UINT8 **Edid
);
///
diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h b/MdePkg/Include/Protocol/FirmwareManagement.h
index 297bb5f..b501261 100644
--- a/MdePkg/Include/Protocol/FirmwareManagement.h
+++ b/MdePkg/Include/Protocol/FirmwareManagement.h
@@ -345,7 +345,7 @@ EFI_STATUS
@param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
@param[in] ImageIndex A unique number identifying the firmware image(s) within the device.
The number is between 1 and DescriptorCount.
- @param[in, out] Image Points to the buffer where the current image is copied to.
+ @param[out] Image Points to the buffer where the current image is copied to.
@param[in, out] ImageSize On entry, points to the size of the buffer pointed to by Image, in bytes.
On return, points to the length of the image, in bytes.
@@ -364,7 +364,7 @@ EFI_STATUS
(EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE)(
IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This,
IN UINT8 ImageIndex,
- IN OUT VOID *Image,
+ OUT VOID *Image,
IN OUT UINTN *ImageSize
);
diff --git a/MdePkg/Include/Protocol/NvmExpressPassthru.h b/MdePkg/Include/Protocol/NvmExpressPassthru.h
index 7420924..870b9b5 100644
--- a/MdePkg/Include/Protocol/NvmExpressPassthru.h
+++ b/MdePkg/Include/Protocol/NvmExpressPassthru.h
@@ -214,7 +214,7 @@ EFI_STATUS
@param[in] NamespaceId The NVM Express namespace ID for which a device path node is to be
allocated and built. Caller must set the NamespaceId to zero if the
device path node will contain a valid UUID.
- @param[in,out] DevicePath A pointer to a single device path node that describes the NVM Express
+ @param[out] DevicePath A pointer to a single device path node that describes the NVM Express
namespace specified by NamespaceId. This function is responsible for
allocating the buffer DevicePath with the boot service AllocatePool().
It is the caller's responsibility to free DevicePath when the caller
@@ -231,7 +231,7 @@ EFI_STATUS
(EFIAPI *EFI_NVM_EXPRESS_PASS_THRU_BUILD_DEVICE_PATH)(
IN EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL *This,
IN UINT32 NamespaceId,
- IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
+ OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
);
/**
diff --git a/MdePkg/Include/Protocol/ScsiPassThruExt.h b/MdePkg/Include/Protocol/ScsiPassThruExt.h
index c83da26..994fbba 100644
--- a/MdePkg/Include/Protocol/ScsiPassThruExt.h
+++ b/MdePkg/Include/Protocol/ScsiPassThruExt.h
@@ -259,7 +259,7 @@ EFI_STATUS
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
- IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
+ OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
);
/**
diff --git a/MdePkg/Include/Protocol/SdMmcPassThru.h b/MdePkg/Include/Protocol/SdMmcPassThru.h
index 3db6a3e..ac5470b 100644
--- a/MdePkg/Include/Protocol/SdMmcPassThru.h
+++ b/MdePkg/Include/Protocol/SdMmcPassThru.h
@@ -164,7 +164,7 @@ EFI_STATUS
@param[in] This A pointer to the EFI_SD_MMMC_PASS_THRU_PROTOCOL instance.
@param[in] Slot Specifies the slot number of the SD card for which a device
path node is to be allocated and built.
- @param[in,out] DevicePath A pointer to a single device path node that describes the SD
+ @param[out] DevicePath A pointer to a single device path node that describes the SD
card specified by Slot. This function is responsible for
allocating the buffer DevicePath with the boot service
AllocatePool(). It is the caller's responsibility to free
@@ -182,7 +182,7 @@ EFI_STATUS
(EFIAPI *EFI_SD_MMC_PASS_THRU_BUILD_DEVICE_PATH) (
IN EFI_SD_MMC_PASS_THRU_PROTOCOL *This,
IN UINT8 Slot,
- IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
+ OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
);
/**
diff --git a/MdePkg/Include/Protocol/SimplePointer.h b/MdePkg/Include/Protocol/SimplePointer.h
index 2f5a940..c631414 100644
--- a/MdePkg/Include/Protocol/SimplePointer.h
+++ b/MdePkg/Include/Protocol/SimplePointer.h
@@ -109,7 +109,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_POINTER_GET_STATE)(
IN EFI_SIMPLE_POINTER_PROTOCOL *This,
- IN OUT EFI_SIMPLE_POINTER_STATE *State
+ OUT EFI_SIMPLE_POINTER_STATE *State
);
///
diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h
index 8ffaf97..455123f 100644
--- a/MdePkg/Include/Uefi/UefiSpec.h
+++ b/MdePkg/Include/Uefi/UefiSpec.h
@@ -211,7 +211,7 @@ EFI_STATUS
On output, it is the size of the buffer returned by the firmware if
the buffer was large enough, or the size of the buffer needed to contain
the map if the buffer was too small.
- @param[in, out] MemoryMap A pointer to the buffer in which firmware places the current memory
+ @param[out] MemoryMap A pointer to the buffer in which firmware places the current memory
map.
@param[out] MapKey A pointer to the location in which firmware returns the key for the
current memory map.
@@ -232,7 +232,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_GET_MEMORY_MAP)(
IN OUT UINTN *MemoryMapSize,
- IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,
+ OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,
OUT UINTN *MapKey,
OUT UINTN *DescriptorSize,
OUT UINT32 *DescriptorVersion
@@ -1556,7 +1556,7 @@ EFI_STATUS
@param[in] Protocol Provides the protocol to search by.
This parameter is only valid for a SearchType of ByProtocol.
@param[in] SearchKey Supplies the search key depending on the SearchType.
- @param[in, out] NoHandles The number of handles returned in Buffer.
+ @param[out] NoHandles The number of handles returned in Buffer.
@param[out] Buffer A pointer to the buffer to return the requested array of handles that
support Protocol.
@@ -1574,7 +1574,7 @@ EFI_STATUS
IN EFI_LOCATE_SEARCH_TYPE SearchType,
IN EFI_GUID *Protocol, OPTIONAL
IN VOID *SearchKey, OPTIONAL
- IN OUT UINTN *NoHandles,
+ OUT UINTN *NoHandles,
OUT EFI_HANDLE **Buffer
);
--
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.
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH V6 3/6] MdePkg: Add EFI_RT_PROPERTIES_TABLE
2020-05-13 22:39 [PATCH V6 0/6] Add definitions introduced in UEFI 2.8a Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 1/6] MdePkg: Add new CPER Notification types Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 2/6] MdePkg: Fix OUT parameters marked as IN OUT Oleksiy Yakovlev
@ 2020-05-13 22:39 ` Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 4/6] MdePkg: Add FMP Capsule Image Header extension Oleksiy Yakovlev
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Oleksiy Yakovlev @ 2020-05-13 22:39 UTC (permalink / raw)
To: devel
Cc: liming.gao, michael.d.kinney, jian.j.wang, hao.a.wu, jiewen.yao,
chao.b.zhang, Felixp, oleksiyy
Define Guid & data structure for EFI_RT_PROPERTIES_TABLE, designed
to be published by a platform if it no longer supports all EFI
runtime services once ExitBootServices() has been called by the OS.
(UEFI 2.8 errata a, mantis 2049)
Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
---
MdePkg/Include/Guid/RtPropertiesTable.h | 69 +++++++++++++++++++++++++++++++++
MdePkg/MdePkg.dec | 5 +++
2 files changed, 74 insertions(+)
create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h
diff --git a/MdePkg/Include/Guid/RtPropertiesTable.h b/MdePkg/Include/Guid/RtPropertiesTable.h
new file mode 100644
index 0000000..6b6a1a1
--- /dev/null
+++ b/MdePkg/Include/Guid/RtPropertiesTable.h
@@ -0,0 +1,69 @@
+/** @file
+Guid & data structure for EFI_RT _PROPERTIES_TABLE, designed to be published by a
+platform if it no longer supports all EFI runtime services once ExitBootServices()
+has been called by the OS. Introduced in UEFI 2.8a.
+
+
+Copyright (c) 2020, American Megatrends International LLC. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __RT_PROPERTIES_TABLE_GUID_H__
+#define __RT_PROPERTIES_TABLE_GUID_H__
+
+//
+// Table, defined here, should be published by a platform if it no longer supports all EFI runtime
+// services once ExitBootServices() has been called by the OS. Note that this is merely a hint
+// to the OS, which it is free to ignore, and so the platform is still required to provide callable
+// implementations of unsupported runtime services that simply return EFI_UNSUPPORTED.
+//
+#define EFI_RT_PROPERTIES_TABLE_GUID \
+ { 0xeb66918a, 0x7eef, 0x402a, \
+ { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }}
+
+
+
+
+#pragma pack(1)
+
+typedef struct {
+ ///
+ /// Version of the structure, must be 0x1.
+ ///
+ UINT16 Version;
+
+ ///
+ /// Size in bytes of the entire EFI_RT_PROPERTIES_TABLE, must be 8.
+ ///
+ UINT16 Length;
+
+ ///
+ /// Bitmask of which calls are or are not supported, where a bit set to 1 indicates
+ /// that the call is supported, and 0 indicates that it is not.
+ ///
+ UINT32 RuntimeServicesSupported;
+} EFI_RT_PROPERTIES_TABLE;
+
+#pragma pack()
+
+#define EFI_RT_PROPERTIES_TABLE_VERSION 0x1
+
+#define EFI_RT_SUPPORTED_GET_TIME 0x0001
+#define EFI_RT_SUPPORTED_SET_TIME 0x0002
+#define EFI_RT_SUPPORTED_GET_WAKEUP_TIME 0x0004
+#define EFI_RT_SUPPORTED_SET_WAKEUP_TIME 0x0008
+#define EFI_RT_SUPPORTED_GET_VARIABLE 0x0010
+#define EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME 0x0020
+#define EFI_RT_SUPPORTED_SET_VARIABLE 0x0040
+#define EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP 0x0080
+#define EFI_RT_SUPPORTED_CONVERT_POINTER 0x0100
+#define EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT 0x0200
+#define EFI_RT_SUPPORTED_RESET_SYSTEM 0x0400
+#define EFI_RT_SUPPORTED_UPDATE_CAPSULE 0x0800
+#define EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES 0x1000
+#define EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO 0x2000
+
+extern EFI_GUID gEfiRtPropertiesTableGuid;
+
+#endif
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 5ac1189..2bbf387 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -654,6 +654,11 @@
## Include/Guid/Btt.h
gEfiBttAbstractionGuid = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9, 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }}
+ # GUIDs defined in UEFI2.8a
+ #
+ ## Include/Guid/RtPropertiesTable.h
+ gEfiRtPropertiesTableGuid = { 0xeb66918a, 0x7eef, 0x402a, { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }}
+
#
# GUID defined in PI1.0
#
--
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.
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH V6 4/6] MdePkg: Add FMP Capsule Image Header extension
2020-05-13 22:39 [PATCH V6 0/6] Add definitions introduced in UEFI 2.8a Oleksiy Yakovlev
` (2 preceding siblings ...)
2020-05-13 22:39 ` [PATCH V6 3/6] MdePkg: Add EFI_RT_PROPERTIES_TABLE Oleksiy Yakovlev
@ 2020-05-13 22:39 ` Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 5/6] MdeModulePkg: " Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 6/6] SignedCapsulePkg: " Oleksiy Yakovlev
5 siblings, 0 replies; 10+ messages in thread
From: Oleksiy Yakovlev @ 2020-05-13 22:39 UTC (permalink / raw)
To: devel
Cc: liming.gao, michael.d.kinney, jian.j.wang, hao.a.wu, jiewen.yao,
chao.b.zhang, Felixp, oleksiyy
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>
Reviewed-by: Liming Gao <liming.gao@intel.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..bd5cb77 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.
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH V6 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
2020-05-13 22:39 [PATCH V6 0/6] Add definitions introduced in UEFI 2.8a Oleksiy Yakovlev
` (3 preceding siblings ...)
2020-05-13 22:39 ` [PATCH V6 4/6] MdePkg: Add FMP Capsule Image Header extension Oleksiy Yakovlev
@ 2020-05-13 22:39 ` Oleksiy Yakovlev
2020-05-14 2:02 ` Liming Gao
2020-05-13 22:39 ` [PATCH V6 6/6] SignedCapsulePkg: " Oleksiy Yakovlev
5 siblings, 1 reply; 10+ messages in thread
From: Oleksiy Yakovlev @ 2020-05-13 22:39 UTC (permalink / raw)
To: devel
Cc: liming.gao, michael.d.kinney, jian.j.wang, hao.a.wu, jiewen.yao,
chao.b.zhang, Felixp, oleksiyy
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>
Reviewed-by: Wei6 Xu <wei6.xu@intel.com>
---
MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 7 ++++--
.../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 26 +++++++++++++++++-----
2 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
index 7e3e072..057bfa8 100644
--- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
+++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
@@ -96,8 +96,11 @@ DumpFmpCapsule (
Print(L" UpdateImageIndex - 0x%x\n", FmpImageHeader->UpdateImageIndex);
Print(L" UpdateImageSize - 0x%x\n", FmpImageHeader->UpdateImageSize);
Print(L" UpdateVendorCodeSize - 0x%x\n", FmpImageHeader->UpdateVendorCodeSize);
- if (FmpImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
- Print(L" UpdateHardwareInstance - 0x%lx\n", FmpImageHeader->UpdateHardwareInstance);
+ if (ImageHeader->Version >= 1) {
+ DEBUG((DEBUG_VERBOSE, " UpdateHardwareInstance - 0x%lx\n", ImageHeader->UpdateHardwareInstance));
+ if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
+ DEBUG((DEBUG_VERBOSE, " ImageCapsuleSupport - 0x%lx\n", ImageHeader->ImageCapsuleSupport));
+ }
}
}
}
diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
index 5dda561..68cece6 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
@@ -285,8 +285,10 @@ ValidateFmpCapsule (
DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version));
return EFI_INVALID_PARAMETER;
}
- if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
+ if (ImageHeader->Version == 1) {
FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance);
+ } else {
+ FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport);
}
if (FmpImageSize < FmpImageHeaderSize) {
DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < FmpImageHeaderSize(0x%x)\n", FmpImageSize, FmpImageHeaderSize));
@@ -519,8 +521,11 @@ DumpFmpCapsule (
DEBUG((DEBUG_VERBOSE, " UpdateImageIndex - 0x%x\n", ImageHeader->UpdateImageIndex));
DEBUG((DEBUG_VERBOSE, " UpdateImageSize - 0x%x\n", ImageHeader->UpdateImageSize));
DEBUG((DEBUG_VERBOSE, " UpdateVendorCodeSize - 0x%x\n", ImageHeader->UpdateVendorCodeSize));
- if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
- DEBUG((DEBUG_VERBOSE, " UpdateHardwareInstance - 0x%lx\n", ImageHeader->UpdateHardwareInstance));
+ if (ImageHeader->Version >= 1) {
+ DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance));
+ if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
+ DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageCapsuleSupport));
+ }
}
}
}
@@ -928,9 +933,14 @@ SetFmpImageData (
} else {
//
// If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1,
- // Header should exclude UpdateHardwareInstance field
+ // Header should exclude UpdateHardwareInstance field, and
+ // ImageCapsuleSupport field if version is 2.
//
- Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance);
+ if (ImageHeader->Version == 1) {
+ Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance);
+ } else {
+ Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport);
+ }
}
if (ImageHeader->UpdateVendorCodeSize == 0) {
@@ -945,6 +955,7 @@ SetFmpImageData (
DEBUG((DEBUG_INFO, "ImageIndex - 0x%x ", ImageHeader->UpdateImageIndex));
if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance));
+ DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageCapsuleSupport));
}
DEBUG((DEBUG_INFO, "\n"));
@@ -1239,7 +1250,10 @@ ProcessFmpCapsuleImage (
ImageHeader = (EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *)((UINT8 *)FmpCapsuleHeader + ItemOffsetList[Index]);
UpdateHardwareInstance = 0;
- if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
+ ///
+ /// UpdateHardwareInstance field was added in Version 2
+ ///
+ if (ImageHeader->Version >= 2) {
UpdateHardwareInstance = ImageHeader->UpdateHardwareInstance;
}
--
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.
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH V6 6/6] SignedCapsulePkg: Add FMP Capsule Image Header extension
2020-05-13 22:39 [PATCH V6 0/6] Add definitions introduced in UEFI 2.8a Oleksiy Yakovlev
` (4 preceding siblings ...)
2020-05-13 22:39 ` [PATCH V6 5/6] MdeModulePkg: " Oleksiy Yakovlev
@ 2020-05-13 22:39 ` Oleksiy Yakovlev
2020-05-14 3:46 ` Zhang, Chao B
2020-05-14 8:02 ` Liming Gao
5 siblings, 2 replies; 10+ messages in thread
From: Oleksiy Yakovlev @ 2020-05-13 22:39 UTC (permalink / raw)
To: devel
Cc: liming.gao, michael.d.kinney, jian.j.wang, hao.a.wu, jiewen.yao,
chao.b.zhang, Felixp, oleksiyy
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>
Reviewed-by: Wei6 Xu <wei6.xu@intel.com>
---
.../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c
index 53b821c..307060b 100644
--- a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c
+++ b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c
@@ -328,10 +328,11 @@ ValidateFmpCapsule (
DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version));
return EFI_INVALID_PARAMETER;
}
- if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
+ if (ImageHeader->Version == 1) {
FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance);
+ } else {
+ FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport);
}
-
// No overflow
if (FmpImageSize != (UINT64)FmpImageHeaderSize + (UINT64)ImageHeader->UpdateImageSize + (UINT64)ImageHeader->UpdateVendorCodeSize) {
DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) mismatch, UpdateImageSize(0x%x) UpdateVendorCodeSize(0x%x)\n", FmpImageSize, ImageHeader->UpdateImageSize, ImageHeader->UpdateVendorCodeSize));
@@ -639,9 +640,14 @@ ProcessFmpCapsuleImage (
} else {
//
// If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1, only match ImageTypeId.
- // Header should exclude UpdateHardwareInstance field
+ // Header should exclude UpdateHardwareInstance field.
+ // If version is 2 Header should exclude ImageCapsuleSupport field.
//
- Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance);
+ if (ImageHeader->Version == 1) {
+ Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance);
+ } else {
+ Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport);
+ }
}
Status = ProcessRecoveryImage (Image, ImageHeader->UpdateImageSize);
--
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.
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH V6 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
2020-05-13 22:39 ` [PATCH V6 5/6] MdeModulePkg: " Oleksiy Yakovlev
@ 2020-05-14 2:02 ` Liming Gao
0 siblings, 0 replies; 10+ messages in thread
From: Liming Gao @ 2020-05-14 2:02 UTC (permalink / raw)
To: Oleksiy Yakovlev, devel@edk2.groups.io
Cc: Kinney, Michael D, Wang, Jian J, Wu, Hao A, Yao, Jiewen,
Zhang, Chao B, Felixp@ami.com
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: Oleksiy Yakovlev <oleksiyy@ami.com>
> Sent: Thursday, May 14, 2020 6:40 AM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu,
> Hao A <hao.a.wu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Felixp@ami.com;
> oleksiyy@ami.com
> Subject: [PATCH V6 5/6] MdeModulePkg: 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>
>
> Reviewed-by: Wei6 Xu <wei6.xu@intel.com>
> ---
> MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 7 ++++--
> .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 26 +++++++++++++++++-----
> 2 files changed, 25 insertions(+), 8 deletions(-)
>
> diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
> index 7e3e072..057bfa8 100644
> --- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
> +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
> @@ -96,8 +96,11 @@ DumpFmpCapsule (
> Print(L" UpdateImageIndex - 0x%x\n", FmpImageHeader->UpdateImageIndex);
> Print(L" UpdateImageSize - 0x%x\n", FmpImageHeader->UpdateImageSize);
> Print(L" UpdateVendorCodeSize - 0x%x\n", FmpImageHeader->UpdateVendorCodeSize);
> - if (FmpImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> - Print(L" UpdateHardwareInstance - 0x%lx\n", FmpImageHeader->UpdateHardwareInstance);
> + if (ImageHeader->Version >= 1) {
> + DEBUG((DEBUG_VERBOSE, " UpdateHardwareInstance - 0x%lx\n", ImageHeader->UpdateHardwareInstance));
> + if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> + DEBUG((DEBUG_VERBOSE, " ImageCapsuleSupport - 0x%lx\n", ImageHeader->ImageCapsuleSupport));
> + }
> }
> }
> }
> diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> index 5dda561..68cece6 100644
> --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> @@ -285,8 +285,10 @@ ValidateFmpCapsule (
> DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version));
> return EFI_INVALID_PARAMETER;
> }
> - if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> + if (ImageHeader->Version == 1) {
> FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance);
> + } else {
> + FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport);
> }
> if (FmpImageSize < FmpImageHeaderSize) {
> DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < FmpImageHeaderSize(0x%x)\n", FmpImageSize, FmpImageHeaderSize));
> @@ -519,8 +521,11 @@ DumpFmpCapsule (
> DEBUG((DEBUG_VERBOSE, " UpdateImageIndex - 0x%x\n", ImageHeader->UpdateImageIndex));
> DEBUG((DEBUG_VERBOSE, " UpdateImageSize - 0x%x\n", ImageHeader->UpdateImageSize));
> DEBUG((DEBUG_VERBOSE, " UpdateVendorCodeSize - 0x%x\n", ImageHeader->UpdateVendorCodeSize));
> - if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> - DEBUG((DEBUG_VERBOSE, " UpdateHardwareInstance - 0x%lx\n", ImageHeader->UpdateHardwareInstance));
> + if (ImageHeader->Version >= 1) {
> + DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance));
> + if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> + DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageCapsuleSupport));
> + }
> }
> }
> }
> @@ -928,9 +933,14 @@ SetFmpImageData (
> } else {
> //
> // If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1,
> - // Header should exclude UpdateHardwareInstance field
> + // Header should exclude UpdateHardwareInstance field, and
> + // ImageCapsuleSupport field if version is 2.
> //
> - Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER,
> UpdateHardwareInstance);
> + if (ImageHeader->Version == 1) {
> + Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER,
> UpdateHardwareInstance);
> + } else {
> + Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport);
> + }
> }
>
> if (ImageHeader->UpdateVendorCodeSize == 0) {
> @@ -945,6 +955,7 @@ SetFmpImageData (
> DEBUG((DEBUG_INFO, "ImageIndex - 0x%x ", ImageHeader->UpdateImageIndex));
> if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance));
> + DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageCapsuleSupport));
> }
> DEBUG((DEBUG_INFO, "\n"));
>
> @@ -1239,7 +1250,10 @@ ProcessFmpCapsuleImage (
> ImageHeader = (EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *)((UINT8 *)FmpCapsuleHeader +
> ItemOffsetList[Index]);
>
> UpdateHardwareInstance = 0;
> - if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> + ///
> + /// UpdateHardwareInstance field was added in Version 2
> + ///
> + if (ImageHeader->Version >= 2) {
> UpdateHardwareInstance = ImageHeader->UpdateHardwareInstance;
> }
>
> --
> 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH V6 6/6] SignedCapsulePkg: Add FMP Capsule Image Header extension
2020-05-13 22:39 ` [PATCH V6 6/6] SignedCapsulePkg: " Oleksiy Yakovlev
@ 2020-05-14 3:46 ` Zhang, Chao B
2020-05-14 8:02 ` Liming Gao
1 sibling, 0 replies; 10+ messages in thread
From: Zhang, Chao B @ 2020-05-14 3:46 UTC (permalink / raw)
To: Oleksiy Yakovlev, devel@edk2.groups.io
Cc: Gao, Liming, Kinney, Michael D, Wang, Jian J, Wu, Hao A,
Yao, Jiewen, Felixp@ami.com
Hi Yakov:
Please add comment for V1 and V2 check. With that change reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
-----Original Message-----
From: Oleksiy Yakovlev <oleksiyy@ami.com>
Sent: Thursday, May 14, 2020 6:40 AM
To: devel@edk2.groups.io
Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Felixp@ami.com; oleksiyy@ami.com
Subject: [PATCH V6 6/6] SignedCapsulePkg: 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>
Reviewed-by: Wei6 Xu <wei6.xu@intel.com>
---
.../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c
index 53b821c..307060b 100644
--- a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c
+++ b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoa
+++ dPei.c
@@ -328,10 +328,11 @@ ValidateFmpCapsule (
DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version));
return EFI_INVALID_PARAMETER;
}
- if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
+ if (ImageHeader->Version == 1) {
FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance);
+ } else {
+ FmpImageHeaderSize =
+ OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER,
+ ImageCapsuleSupport);
}
-
// No overflow
if (FmpImageSize != (UINT64)FmpImageHeaderSize + (UINT64)ImageHeader->UpdateImageSize + (UINT64)ImageHeader->UpdateVendorCodeSize) {
DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) mismatch, UpdateImageSize(0x%x) UpdateVendorCodeSize(0x%x)\n", FmpImageSize, ImageHeader->UpdateImageSize, ImageHeader->UpdateVendorCodeSize));
@@ -639,9 +640,14 @@ ProcessFmpCapsuleImage (
} else {
//
// If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1, only match ImageTypeId.
- // Header should exclude UpdateHardwareInstance field
+ // Header should exclude UpdateHardwareInstance field.
+ // If version is 2 Header should exclude ImageCapsuleSupport field.
//
- Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance);
+ if (ImageHeader->Version == 1) {
+ Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance);
+ } else {
+ Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport);
+ }
}
Status = ProcessRecoveryImage (Image, ImageHeader->UpdateImageSize);
--
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH V6 6/6] SignedCapsulePkg: Add FMP Capsule Image Header extension
2020-05-13 22:39 ` [PATCH V6 6/6] SignedCapsulePkg: " Oleksiy Yakovlev
2020-05-14 3:46 ` Zhang, Chao B
@ 2020-05-14 8:02 ` Liming Gao
1 sibling, 0 replies; 10+ messages in thread
From: Liming Gao @ 2020-05-14 8:02 UTC (permalink / raw)
To: Oleksiy Yakovlev, devel@edk2.groups.io
Cc: Kinney, Michael D, Wang, Jian J, Wu, Hao A, Yao, Jiewen,
Zhang, Chao B, Felixp@ami.com
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: Oleksiy Yakovlev <oleksiyy@ami.com>
> Sent: Thursday, May 14, 2020 6:40 AM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu,
> Hao A <hao.a.wu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Felixp@ami.com;
> oleksiyy@ami.com
> Subject: [PATCH V6 6/6] SignedCapsulePkg: 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>
>
> Reviewed-by: Wei6 Xu <wei6.xu@intel.com>
> ---
> .../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c
> b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c
> index 53b821c..307060b 100644
> --- a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c
> +++ b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c
> @@ -328,10 +328,11 @@ ValidateFmpCapsule (
> DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version));
> return EFI_INVALID_PARAMETER;
> }
> - if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> + if (ImageHeader->Version == 1) {
> FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance);
> + } else {
> + FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport);
> }
> -
> // No overflow
> if (FmpImageSize != (UINT64)FmpImageHeaderSize + (UINT64)ImageHeader->UpdateImageSize + (UINT64)ImageHeader-
> >UpdateVendorCodeSize) {
> DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) mismatch, UpdateImageSize(0x%x) UpdateVendorCodeSize(0x%x)\n",
> FmpImageSize, ImageHeader->UpdateImageSize, ImageHeader->UpdateVendorCodeSize));
> @@ -639,9 +640,14 @@ ProcessFmpCapsuleImage (
> } else {
> //
> // If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1, only match ImageTypeId.
> - // Header should exclude UpdateHardwareInstance field
> + // Header should exclude UpdateHardwareInstance field.
> + // If version is 2 Header should exclude ImageCapsuleSupport field.
> //
> - Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER,
> UpdateHardwareInstance);
> + if (ImageHeader->Version == 1) {
> + Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER,
> UpdateHardwareInstance);
> + } else {
> + Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport);
> + }
> }
>
> Status = ProcessRecoveryImage (Image, ImageHeader->UpdateImageSize);
> --
> 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-05-14 8:02 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-13 22:39 [PATCH V6 0/6] Add definitions introduced in UEFI 2.8a Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 1/6] MdePkg: Add new CPER Notification types Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 2/6] MdePkg: Fix OUT parameters marked as IN OUT Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 3/6] MdePkg: Add EFI_RT_PROPERTIES_TABLE Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 4/6] MdePkg: Add FMP Capsule Image Header extension Oleksiy Yakovlev
2020-05-13 22:39 ` [PATCH V6 5/6] MdeModulePkg: " Oleksiy Yakovlev
2020-05-14 2:02 ` Liming Gao
2020-05-13 22:39 ` [PATCH V6 6/6] SignedCapsulePkg: " Oleksiy Yakovlev
2020-05-14 3:46 ` Zhang, Chao B
2020-05-14 8:02 ` Liming Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox