From nobody Tue May 7 21:18:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+59471+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59471+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589409634; cv=none; d=zohomail.com; s=zohoarc; b=Eoj/DOHdyN7OJxalP8wcb4Cpn2NX4Tre3APIp81y2T0cfFpwh+hMKiOZgoPVMnnTXwr23eHn2kqb5kDesH4iTd88HBc+SaddGS5lyJeVsvKeVYePwh9likhyT2dIiHIAmefHTLqsr2bO+7EAFBklRHMnoDpP/5T4sUxkX3IATxQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589409634; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=2jPYXtRVyFLxuc7h6+yRTede1LCHbnyZusEGXWedQeQ=; b=mHKHJtjs/3+7u5yjv/TykKzPn9k/PUN8pvb7Hl7UUbSS6RGAo7I4Z8Spwb3HHy77E+6a9hvEO51cr79XYh2aEDpZZ5jil0Fbu6ioHglvp48R4FU/VL5e2nIAWmTBhMpAdQdS7JPc05Hm6aGkheDaEltM1JZYYWVly2Lro9/cXeA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59471+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589409634474313.8208386548366; Wed, 13 May 2020 15:40:34 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 7BJTYY1788612xUcuiiJVdQg; Wed, 13 May 2020 15:40:34 -0700 X-Received: from atlmailgw1.ami.com (atlmailgw1.ami.com [63.147.10.40]) by mx.groups.io with SMTP id smtpd.web10.1805.1589409633621215795 for ; Wed, 13 May 2020 15:40:33 -0700 X-AuditID: ac1060b2-0e1ff700000018d4-93-5ebc775fb8f3 X-Received: from atlms1.us.megatrends.com (atlms1.us.megatrends.com [172.16.96.144]) (using TLS with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by atlmailgw1.ami.com (Symantec Messaging Gateway) with SMTP id EF.35.06356.0677CBE5; Wed, 13 May 2020 18:40:32 -0400 (EDT) X-Received: from Oleksiy77.us.megatrends.com (172.16.97.158) by atlms1.us.megatrends.com (172.16.96.144) with Microsoft SMTP Server id 14.3.468.0; Wed, 13 May 2020 18:39:49 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , , , Subject: [edk2-devel] [PATCH V6 1/6] MdePkg: Add new CPER Notification types Date: Wed, 13 May 2020 18:39:42 -0400 Message-ID: <20200513223947.56560-2-oleksiyy@ami.com> In-Reply-To: <20200513223947.56560-1-oleksiyy@ami.com> References: <20200513223947.56560-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrEIsWRmVeSWpSXmKPExsWyRiBhgm5C+Z44g5VvpS3mv622aJ8wm83i 6q1fTBbzvs1gtVj30cNixb0N7BYdHf+YHNg9tn+/wOixeM9LpgCmqAZGm8S8vPySxJJUhZTU 4mRbpYCizLLE5EolhcwUWyVDJYWCnMTk1NzUvBJbpcSCgtS8FCU7LgUMYANUlpmnkJqXnJ+S mZduq+QZ7K9rYWFqqWuoZBeSkaqQmZeWX5SbWJKZn6eQnJ9XAlSdmgIUVUjo5syY+2AOc8FE kYoDCxcyNzBeEuhi5OSQEDCReLLqKnsXIxeHkMAuJonP21pZIZwtjBILX1xnB6liE9CUOHBs CiOILSIgJTHlwEwmEJtZ4DCjRMcnsLiwgL3E26UT2UBsFgFVicZlO8F6eQVMJf6cXsgIsU1D Ytqau2C9nAJmEpsW9LKA2EJANVtfHIWqF5Q4OfMJC8R8CYmDL14wQ9TISrQdf84+gZF/FpKy WUjKFjAyrWIUSizJyU3MzEkvN9RLzM3US87P3cQIicBNOxhbLpofYmTiYDzEKMHBrCTC67d+ d5wQb0piZVVqUX58UWlOavEhRiegByYyS3GDQhAYJfHGBgZSojCOoYmZibmRuaGlibmxsZI4 7+S1a+KEBNKBUZudmlqQWgQzhImDU6qBMe6x1atfe8penTL9kZXK6hv0LTamZuE8np49GZKK 8fOC+qN2KfIJyboLpnU6epQ/SLmdXBOhz7PX+PhLLR3Bm3JX/nxNvfrbLv2Meq2y7PcXdX6/ pnj4HdrvqW8fsKz8iajGaYWZMj0bFKTOM1yQYZhW0bKl0fd1W+wFLkfWXdGaPzTK45OUWIoz Eg21mIuKEwHhqE9u1QIAAA== Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,oleksiyy@ami.com X-Gm-Message-State: FmxP3AfjhjvGaH2kH1NcbJApx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589409634; bh=4Z9lufDzyO/FLwhsRsejRetSLXhA6BzT3nTNOlm1i1Y=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=IchWsKrdSuq5FCMNoZdXtvtp4MGjsOkScw3GOCw5IcaUcPKMwV2TN5SzF8Q/I6l1HRH gUPg4k+2QYTBwgLFarn4WBRohbf0fBTnuSmXYTZyulypWrDFvRy9JryPeFb8DP9SVRJG9 Jx8Cwmvc3jNw9AKJHTnBT2HN1MMow0fz5ek= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Liming Gao --- 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 } \ + } ///@} =20 /// @@ -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; =20 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 =3D { 0x667DD791, 0xC6B3, 0x4c27, { 0= x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 }} =20 ## Include/Guid/Cper.h + gEfiEventNotificationTypeSeaGuid =3D { 0x9A78788A, 0xBBE8, 0x11E4, { 0= x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 }} + + ## Include/Guid/Cper.h + gEfiEventNotificationTypeSeiGuid =3D { 0x5C284C81, 0xB0AE, 0x4E87, { 0= xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 }} + + ## Include/Guid/Cper.h + gEfiEventNotificationTypePeiGuid =3D { 0x09A9D5AC, 0x5204, 0x4214, { 0= x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD }} + + ## Include/Guid/Cper.h gEfiProcessorGenericErrorSectionGuid =3D { 0x9876ccad, 0x47b4, 0x4bdb, = { 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb }} =20 ## Include/Guid/Cper.h --=20 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprieta= ry 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 desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephon= e at 770-246-8600, and then delete or destroy all copies of the transmissio= n. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59471): https://edk2.groups.io/g/devel/message/59471 Mute This Topic: https://groups.io/mt/74193804/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 7 21:18:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+59472+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59472+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589409634; cv=none; d=zohomail.com; s=zohoarc; b=GfIqUd0yMyzM6u77GdNrL1lLTHpwq5WYh6f0Hbr6M+6xln305a+jdqPd/exE/t66ntK6JXOoMadR3Hnmjhr9OxrRNDwzZVbrx5XF0Vke6Pd+Qt7t5Pa9+kpq+/h6D+R/cZNN0uf1BLrxQ/kT96Nm3JTSTZgAxUqgfKBQuqQYkMw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589409634; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=il/5D8H2I7jC4jAz+4wnRNCDb6pMByACTrb/HOheu8Q=; b=BN+MYKTVXL1MUZm5ZnyfJ0FzqefzMgmVWaSLJHzwyZlS14YfuI6x6sc2WURcNpMA1zCut+0MrDRURNU0xziI2WDX0BdFTW2yzISf2WHILZeElRkBzFiYSuoIyiMYCOkqg1S4jX9PTz94cWh6I1h8eNYQxJwhK4KVSHG21toIGzM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59472+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589409634925448.72054071314585; Wed, 13 May 2020 15:40:34 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Pl0PYY1788612xrXiCpuRtpK; Wed, 13 May 2020 15:40:34 -0700 X-Received: from atlmailgw2.ami.com (atlmailgw2.ami.com []) by mx.groups.io with SMTP id smtpd.web10.1804.1589409632386466326 for ; Wed, 13 May 2020 15:40:33 -0700 X-AuditID: ac10606f-05fff70000001b62-9f-5ebc77603991 X-Received: from atlms1.us.megatrends.com (atlms1.us.megatrends.com [172.16.96.144]) (using TLS with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by atlmailgw2.ami.com (Symantec Messaging Gateway) with SMTP id 1B.44.07010.0677CBE5; Wed, 13 May 2020 18:40:32 -0400 (EDT) X-Received: from Oleksiy77.us.megatrends.com (172.16.97.158) by atlms1.us.megatrends.com (172.16.96.144) with Microsoft SMTP Server id 14.3.468.0; Wed, 13 May 2020 18:39:50 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , , , Subject: [edk2-devel] [PATCH V6 2/6] MdePkg: Fix OUT parameters marked as IN OUT Date: Wed, 13 May 2020 18:39:43 -0400 Message-ID: <20200513223947.56560-3-oleksiyy@ami.com> In-Reply-To: <20200513223947.56560-1-oleksiyy@ami.com> References: <20200513223947.56560-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAIsWRmVeSWpSXmKPExsWyRiBhgm5C+Z44g2tP9C3mv622aJ8wm83i 6q1fTBbzvs1gtVj30cNixb0N7BYdHf+YHNg9tn+/wOixeM9LpgCmqAZGm8S8vPySxJJUhZTU 4mRbpYCizLLE5EolhcwUWyVDJYWCnMTk1NzUvBJbpcSCgtS8FCU7LgUMYANUlpmnkJqXnJ+S mZduq+QZ7K9rYWFqqWuoZBeSkaqQmZeWX5SbWJKZn6eQnJ9XAlSdmgIUVUjo5sy4e/EUY8G+ iIqOnXUNjO22XYycHBICJhI7vrWxdzFycQgJ7GKS2HBtCyOEs4VR4lHjfGaQKjYBTYkDx6Yw gtgiAlISUw7MZAKxmQUOM0p0fAKKc3AICzhL7G5xAAmzCKhKXJ75BKyEV8BUYuephcwQyzQk pq25CxbnFDCT2LSglwXEFgKq2friKDtEvaDEyZlPWCDGS0gcfPGCGaJGVqLt+HP2CYz8s5CU zUJStoCRaRWjUGJJTm5iZk56uZFeYm6mXnJ+7iZGSPTl72D8+NH8ECMTB+MhRgkOZiURXr/1 u+OEeFMSK6tSi/Lji0pzUosPMToBPTCRWYobFH7ACIk3NjCQEoVxDE3MTMyNzA0tTcyNjZXE eSetXRMnJJAOjNjs1NSC1CKYIUwcnFINjDGuUbX8msX2IvU5HAtufN/gcSho4ZQv7RzX7GqE Q1dxrlvEGxF+QqdPSLzh4BM//aOrHjt/rPkw99rzz7Vy6980/AysPbFFrl2jzOhf7zO7iS+O 3HP6wzlf4PU9TyXOMt0YXlfX0+8Fti7U8Di5Mn/q//OvvPJ17D7LLT6+LuHVSdk03oP2jkos xRmJhlrMRcWJAC3XbunTAgAA Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,oleksiyy@ami.com X-Gm-Message-State: lYRvmAWTngMqgSLhINZvAgsJx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589409634; bh=QHzRE1s/mUwIOir8IOX1HCdTxz2SzFZ3lNFKINZCpSQ=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=HOq2+RU+NKyiurqk2u9s1Jkd8jhcHSBKcHadDQuQzeYAFNtrFg6hun93v/biJXnhuBB 6j0UcU6xxyT0G8mTzwtoG4saZp/YT4l3JKxacG2zF3G+dSc4NFLA60aGERxAm3mYzRXcF 31Wf/L5NBTloz6/lsV/3xG7Ut8ItoUffIvE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Liming Gao --- 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/Pro= tocol/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 ); =20 =20 diff --git a/MdePkg/Include/Protocol/AtaPassThru.h b/MdePkg/Include/Protoco= l/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 th= e ATA device for which a device path node is to be allocated a= nd built. If there is no port multiplier, then specify 0xFFFF. - @param[in,out] DevicePath A pointer to a single device path nod= e that describes the ATA + @param[out] DevicePath A pointer to a single device path nod= e that describes the ATA device specified by Port and PortMult= iplierPort. This function is responsible for allocating the buf= fer DevicePath with the boot service AllocatePool(). It is th= e 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 ); =20 /** diff --git a/MdePkg/Include/Protocol/EdidOverride.h b/MdePkg/Include/Protoc= ol/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 ); =20 /// 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 DescriptorCou= nt. - @param[in, out] Image Points to the buffer where the current im= age is copied to. + @param[out] Image Points to the buffer where the current im= age is copied to. @param[in, out] ImageSize On entry, points to the size of the buffe= r pointed to by Image, in bytes. On return, points to the length of the im= age, in bytes. =20 @@ -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 ); =20 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 whi= ch 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 nod= e that describes the NVM Express + @param[out] DevicePath A pointer to a single device path nod= e that describes the NVM Express namespace specified by NamespaceId. T= his 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 ); =20 /** diff --git a/MdePkg/Include/Protocol/ScsiPassThruExt.h b/MdePkg/Include/Pro= tocol/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 ); =20 /** diff --git a/MdePkg/Include/Protocol/SdMmcPassThru.h b/MdePkg/Include/Proto= col/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_PRO= TOCOL instance. @param[in] Slot Specifies the slot number of the SD card f= or which a device path node is to be allocated and built. - @param[in,out] DevicePath A pointer to a single device path node tha= t describes the SD + @param[out] DevicePath A pointer to a single device path node tha= t describes the SD card specified by Slot. This function is r= esponsible for allocating the buffer DevicePath with the = boot service AllocatePool(). It is the caller's respons= ibility 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 ); =20 /** diff --git a/MdePkg/Include/Protocol/SimplePointer.h b/MdePkg/Include/Proto= col/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 ); =20 /// 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 t= he size of the buffer needed to contain the map if the buffer was too sma= ll. - @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 whic= h 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 SearchT= ype of ByProtocol. @param[in] SearchKey Supplies the search key depending on the S= earchType. - @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 requ= ested array of handles that support Protocol. =20 @@ -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 ); =20 --=20 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprieta= ry 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 desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephon= e at 770-246-8600, and then delete or destroy all copies of the transmissio= n. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59472): https://edk2.groups.io/g/devel/message/59472 Mute This Topic: https://groups.io/mt/74193805/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 7 21:18:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+59473+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59473+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589409635; cv=none; d=zohomail.com; s=zohoarc; b=Cs/YNZHp9cNR0pK49rhZ6mcVVBBZ1vjlHQuioTEcIuP1lH4ZEWHGBYwH8D58KYNUbEzvmCCsEMZNlD529lrd5bl2wwPL9n4k/w8dL4DY3FsbUV5WxcSv4t+Tx5vJkGYX+bvmuahfARAlQAEkZVJZnCmkz27PfaB6xq9DisziWWw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589409635; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=f5MNKJkGEG2Nsr5IKTooU3P180gc3nPfdYzAnnQ8vyg=; b=TOTYWTxg6sdSDnceiJCEiNqGRXS/Ymw17EHL4sXIZg399JPW9a6gTvO+RNvywidqIIrqDszDqjAhupo/J9Nxpb6V5IU9cjknTBrSvagrHW5yyb+yx2Ku+iYIwu9qtCyAQ1PvB2U5kGVk4ljgE2kZ0IcEVnXqtlnRndX0Bn51xR8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59473+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589409635462890.9157701569738; Wed, 13 May 2020 15:40:35 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 9n2jYY1788612xefaLzJSRMh; Wed, 13 May 2020 15:40:35 -0700 X-Received: from atlmailgw1.ami.com (atlmailgw1.ami.com []) by mx.groups.io with SMTP id smtpd.web10.1805.1589409633621215795 for ; Wed, 13 May 2020 15:40:34 -0700 X-AuditID: ac1060b2-0e1ff700000018d4-95-5ebc7762485c X-Received: from atlms1.us.megatrends.com (atlms1.us.megatrends.com [172.16.96.144]) (using TLS with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by atlmailgw1.ami.com (Symantec Messaging Gateway) with SMTP id 60.45.06356.2677CBE5; Wed, 13 May 2020 18:40:34 -0400 (EDT) X-Received: from Oleksiy77.us.megatrends.com (172.16.97.158) by atlms1.us.megatrends.com (172.16.96.144) with Microsoft SMTP Server id 14.3.468.0; Wed, 13 May 2020 18:39:51 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , , , Subject: [edk2-devel] [PATCH V6 3/6] MdePkg: Add EFI_RT_PROPERTIES_TABLE Date: Wed, 13 May 2020 18:39:44 -0400 Message-ID: <20200513223947.56560-4-oleksiyy@ami.com> In-Reply-To: <20200513223947.56560-1-oleksiyy@ami.com> References: <20200513223947.56560-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsWyRiBhgm5S+Z44gxOLhCzmv622aJ8wm83i 6q1fTBbzvs1gtVj30cNixb0N7BYdHf+YHNg9tn+/wOixeM9LpgCmqAZGm8S8vPySxJJUhZTU 4mRbpYCizLLE5EolhcwUWyVDJYWCnMTk1NzUvBJbpcSCgtS8FCU7LgUMYANUlpmnkJqXnJ+S mZduq+QZ7K9rYWFqqWuoZBeSkaqQmZeWX5SbWJKZn6eQnJ9XAlSdmgIUVUjo5sxomneLpWCP XMWTx7tYGhibJLoYOTkkBEwklj//z9zFyMUhJLCLSeLj3rNMEM4WRonzDcvZQKrYBDQlDhyb wghiiwhISUw5MJMJxGYWOMwo0fEJLC4sYC1x9N0uoDgHB4uAqsTGb4UgYV4BU4l7W/6yQSzT kJi25i5YK6eAmcSmBb0sILYQUM3WF0fZIeoFJU7OfMICMV5C4uCLF8wQNbISbcefs09g5J+F pGwWkrIFjEyrGIUSS3JyEzNz0ssN9RJzM/WS83M3MULib9MOxpaL5ocYmTgYDzFKcDArifD6 rd8dJ8SbklhZlVqUH19UmpNafIjRCej+icxS3KAABMZIvLGBgZQojGNoYmZibmRuaGlibmys JM47ee2aOCGBdGDMZqemFqQWwQxh4uCUamDk6v37XfhIktuHtp9SPrZ+756wfD7e/q3xaAsP p8/2tFtaiTvWsQkw9G6XjV1YNa/zkfitK6du7V3Jop2d+e0RZ9qjj/nqGTcZNk+/6H/l5vfW iXNS5lgzfUrStT/wtVp60q3XFYtOGDPkMq8SlRbWP3+Lrfau9RWWGQeXbjlxuaZEK0Zo9b4J SizFGYmGWsxFxYkAbYWrZdQCAAA= Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,oleksiyy@ami.com X-Gm-Message-State: nfWnI0Z6u1nLhribP2lK3lZ9x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589409635; bh=cVsB74Hos+avLdZY+wn286gglrBbcFj788Srzr8+Raw=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Ue5XYT8GVV01u4R+QdthTm2ezrsVripl7jplU/4B7fh79wuIkpt49j3iEySVko7kUcC DAPd5yTvFi9BPiPhhGwfcK+6g1LKSyZeulGef14syQ2Pqu2foQunKXH00tJygjp+x40Qd oUbKpkfWDAiW3iwGYrN5uqtcXWADG8xVp8U= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Liming Gao --- 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 publish= ed by a +platform if it no longer supports all EFI runtime services once ExitBootS= ervices() +has been called by the OS. Introduced in UEFI 2.8a. + + +Copyright (c) 2020, American Megatrends International LLC. All rights rese= rved.
+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 t= his is merely a hint +// to the OS, which it is free to ignore, and so the platform is still req= uired 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 =3D { 0x18633bfc, 0x1735, 0x4217, { 0x8a,= 0xc9, 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }} =20 + # GUIDs defined in UEFI2.8a + # + ## Include/Guid/RtPropertiesTable.h + gEfiRtPropertiesTableGuid =3D { 0xeb66918a, 0x7eef, 0x402a, { 0x84,= 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + # # GUID defined in PI1.0 # --=20 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprieta= ry 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 desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephon= e at 770-246-8600, and then delete or destroy all copies of the transmissio= n. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59473): https://edk2.groups.io/g/devel/message/59473 Mute This Topic: https://groups.io/mt/74193807/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 7 21:18:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+59474+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59474+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589409636; cv=none; d=zohomail.com; s=zohoarc; b=CJxzc0jaSuXp42WdctqjiEKSck/YjRVYjVCtCvTad2/l518YuAGWAMriaCAVvmmKoaVfbwAcE4BKfoQ6bogqvxAVfmHmjNwOVeq5YtYcKx+N/J4lQcVt8Atn4UjnuZJ2AaIyit+UAUB2mPkBZyHQ4dLeCT8O7V1EGTTlCyQ0PwQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589409636; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=0yjGJwDmrfPHCeizGT/8tKGTr6fK91SHsl+hHd9yhMg=; b=cdBKeYpcaBTX400iI6n77gv+cyfdTgYhN0rCyIT+fMqMmTDnDNGU3BgK1+wK+CZ0p32ajUNhFzcMjxbTNjexd1s9pkbzT2De/NOLhShxpE1EeELarc/Kw7gEbcYrHGDOvNJj2I/eMDygWoILgbBa0wIvGWepUSS4JPaYBqth59Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59474+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589409636974508.2026048974303; Wed, 13 May 2020 15:40:36 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aXGzYY1788612xcL1Ups8A5j; Wed, 13 May 2020 15:40:36 -0700 X-Received: from atlmailgw2.ami.com (atlmailgw2.ami.com []) by mx.groups.io with SMTP id smtpd.web10.1804.1589409632386466326 for ; Wed, 13 May 2020 15:40:35 -0700 X-AuditID: ac10606f-05fff70000001b62-a3-5ebc7762a369 X-Received: from atlms1.us.megatrends.com (atlms1.us.megatrends.com [172.16.96.144]) (using TLS with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by atlmailgw2.ami.com (Symantec Messaging Gateway) with SMTP id EB.44.07010.2677CBE5; Wed, 13 May 2020 18:40:34 -0400 (EDT) X-Received: from Oleksiy77.us.megatrends.com (172.16.97.158) by atlms1.us.megatrends.com (172.16.96.144) with Microsoft SMTP Server id 14.3.468.0; Wed, 13 May 2020 18:39:52 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , , , Subject: [edk2-devel] [PATCH V6 4/6] MdePkg: Add FMP Capsule Image Header extension Date: Wed, 13 May 2020 18:39:45 -0400 Message-ID: <20200513223947.56560-5-oleksiyy@ami.com> In-Reply-To: <20200513223947.56560-1-oleksiyy@ami.com> References: <20200513223947.56560-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrEIsWRmVeSWpSXmKPExsWyRiBhgm5S+Z44g+Of9S3mv622aJ8wm83i 6q1fTBbzvs1gtVj30cNixb0N7BYdHf+YHNg9tn+/wOixeM9LpgCmqAZGm8S8vPySxJJUhZTU 4mRbpYCizLLE5EolhcwUWyVDJYWCnMTk1NzUvBJbpcSCgtS8FCU7LgUMYANUlpmnkJqXnJ+S mZduq+QZ7K9rYWFqqWuoZBeSkaqQmZeWX5SbWJKZn6eQnJ9XAlSdmgIUVUjo5sy4vGUrY8Fj 7or5LU/ZGhh/c3YxcnJICJhIbO5rZeti5OIQEtjFJLHwZgcjhLOFUeLL3i4mkCo2AU2JA8em MILYIgJSElMOzASLMwscZpTo+AQWFxZwk7j0dw07iM0ioCpxbXMfK4jNK2Aq8WnxPjaIbRoS 09bcBevlFDCT2LSglwXEFgKq2friKDtEvaDEyZlPWCDmS0gcfPGCGaJGVqLt+HP2CYz8s5CU zUJStoCRaRWjUGJJTm5iZk56uZFeYm6mXnJ+7iZGSATm72D8+NH8ECMTB+MhRgkOZiURXr/1 u+OEeFMSK6tSi/Lji0pzUosPMToBPTCRWYobFILAKIk3NjCQEoVxDE3MTMyNzA0tTcyNjZXE eSetXRMnJJAOjNrs1NSC1CKYIUwcnFINjNuPtLd/7X/PP8PymOL0GZ4TRGreng1iYUk9myYW OPd7x5zZ35yVHsvu8Dny1X1Z2bfd7yTf1/6f+W+3zj3WW3c0K5ZdXdLLvOPh0Zb2fdotN469 6duRuvv6L172m8nlR2U5X8fJlhdtTThm8j0sJmJTlsIsn7e+AedKOYLMLN5tunv0hEvnzNtK LMUZiYZazEXFiQDp0QHW1QIAAA== Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,oleksiyy@ami.com X-Gm-Message-State: sF2QyyAEV7jKiHOFXTJhMXDpx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589409636; bh=3eW/OKCM6+oC4wHjl/4NEePDaDYjySjQ73oG32KuASI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Ol3vlY15nwpN0sK3N1rOkr8FDBNl6sykFGh+gZ2f5nd8FJ/ksEIGdOanhK8WILst91x Yc5pfR5Re/ufewj6URrLh19RhnIPWiXc/5+JFFOQzAWTsU8kPlVSYrElKOfrF0jgb0Fnd 3TTVJENo6Ic6ptc3ZVaNtEk3mqKoWFLJGqA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Liming Gao --- 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/FmpCaps= ule.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 payl= oad. + /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0000000000000001 + /// #define CAPSULE_SUPPORT_DEPENDENCY 0x0000000000000002 + /// + UINT64 ImageCapsuleSupport; } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER; =20 #pragma pack() =20 =20 #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION 0x000000= 01 -#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x000000= 02 +#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x000000= 03 +#define CAPSULE_SUPPORT_AUTHENTICATION 0x0000000000000001 +#define CAPSULE_SUPPORT_DEPENDENCY 0x0000000000000002 =20 extern EFI_GUID gEfiFmpCapsuleGuid; =20 --=20 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprieta= ry 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 desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephon= e at 770-246-8600, and then delete or destroy all copies of the transmissio= n. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59474): https://edk2.groups.io/g/devel/message/59474 Mute This Topic: https://groups.io/mt/74193808/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 7 21:18:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+59475+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59475+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589409637; cv=none; d=zohomail.com; s=zohoarc; b=oB/AeVdcGSBiXdGoIgAE13wSwjYk9C7u9OOD5cONI4WHl/ZDu9EJrTz8LLn5TLj/H2yH4fxnOxsibq8tH9j96tphw0tioT+G7l2AciPPqHn1Q/Rbo16BJjdeQGDJCFtqwluycDEB+1TSgXM/pekz7KK99RXzNiSncmAH7NObvFM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589409637; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=I/w4GlFZ2VkK0N2Yg691EpO+MqJUG75elzjffAyPvwg=; b=GYWFVgNKp1PeaIOy4CjRdfBx3bhY+pxdNxAy8mBtVt+803WHewyWDmpjvNnrWGML88MwS1BZbq0Skds1ZoxWyK4K2kBAzcIjZIwY1+wThNeIRsoHWLLLkwyWTmRlPUZCF3yCjJGeAxCT8BKTKCh1Ep7TO31009BoWbPNrYmAl+w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59475+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589409637402162.5791546933749; Wed, 13 May 2020 15:40:37 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aDerYY1788612xbPlAFf6beO; Wed, 13 May 2020 15:40:37 -0700 X-Received: from atlmailgw1.ami.com (atlmailgw1.ami.com []) by mx.groups.io with SMTP id smtpd.web10.1805.1589409633621215795 for ; Wed, 13 May 2020 15:40:36 -0700 X-AuditID: ac1060b2-0e1ff700000018d4-99-5ebc77639752 X-Received: from atlms1.us.megatrends.com (atlms1.us.megatrends.com [172.16.96.144]) (using TLS with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by atlmailgw1.ami.com (Symantec Messaging Gateway) with SMTP id 11.45.06356.3677CBE5; Wed, 13 May 2020 18:40:36 -0400 (EDT) X-Received: from Oleksiy77.us.megatrends.com (172.16.97.158) by atlms1.us.megatrends.com (172.16.96.144) with Microsoft SMTP Server id 14.3.468.0; Wed, 13 May 2020 18:39:53 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , , , Subject: [edk2-devel] [PATCH V6 5/6] MdeModulePkg: Add FMP Capsule Image Header extension Date: Wed, 13 May 2020 18:39:46 -0400 Message-ID: <20200513223947.56560-6-oleksiyy@ami.com> In-Reply-To: <20200513223947.56560-1-oleksiyy@ami.com> References: <20200513223947.56560-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsWyRiBhgm5K+Z44g45LrBbz31ZbtE+YzWZx 9dYvJot532awWqz76GGx4t4GdouOjn9MDuwe279fYPRYvOclUwBTVAOjTWJeXn5JYkmqQkpq cbKtUkBRZllicqWSQmaKrZKhkkJBTmJyam5qXomtUmJBQWpeipIdlwIGsAEqy8xTSM1Lzk/J zEu3VfIM9te1sDC11DVUsgvJSFXIzEvLL8pNLMnMz1NIzs8rAapOTQGKKiR0c2Z8P7SasWCJ ZsWCPZOYGxh3KXUxcnJICJhIdE45ytTFyMUhJLCLSWLr34fMIAkhgS2MEjev6IPYbAKaEgeO TWEEsUUEpCSmHJjJBGIzCxxmlOj4BBYXFvCReL3gMBuIzSKgKrHi7wawObwCphLt5y8xQyzT kJi25i5YL6eAmcSmBb0sELtMJba+OMoOUS8ocXLmExaI+RISB1+8gLpHVqLt+HP2CYz8s5CU zUJStoCRaRWjUGJJTm5iZk56uaFeYm6mXnJ+7iZGSPxt2sHYctH8ECMTB+MhRgkOZiURXr/1 u+OEeFMSK6tSi/Lji0pzUosPMToBPTCRWYobFIDAGIk3NjCQEoVxDE3MTMyNzA0tTcyNjZXE eSevXRMnJJAOjNns1NSC1CKYIUwcnFINjOY/Q9b/eXrJfiLf+YMMEzL3if6NcdS1mz9pTtxj 2V6LAueLn+dJfQ5UaLBu39tT0el5Qv/Xn4ubs65ean4cuv+63uRsw6aevLlvmj3XPLJjvfhm jXDGte/hLsKP+6trL/zcKar1V2CrZrGz4Jplsb/tQk5teiB0yUUnxP3mUsVJ5WpV/OLzC5VY ijMSDbWYi4oTAVT8OnjUAgAA Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,oleksiyy@ami.com X-Gm-Message-State: LjNEtmKCRd7bLrFMPiHnFmQ4x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589409637; bh=jOTJaTjFqeTtBY/42Mky78CKGIVJFi0AgtSD6n7VjpM=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=TQfZC+yLFlR7nPZ1Aj7f9PJSQaUmsbwlN8bNjZAW9YU93IcHcDghy7p/acM3owu3Vw9 AF67PM9sgzYhLskdLLGFR7jnvAzeNdbIO3Dc167w/Mt2Tp2iMV+nvdeT7ZwEXt9gZogwr /ydvqGZTa3WBbK++a9s84sRJoU1TXdhlZq8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Wei6 Xu --- 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/MdeModuleP= kg/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->UpdateImag= eIndex); Print(L" UpdateImageSize - 0x%x\n", FmpImageHeader->UpdateImag= eSize); Print(L" UpdateVendorCodeSize - 0x%x\n", FmpImageHeader->UpdateVend= orCodeSize); - if (FmpImageHeader->Version >=3D EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE= _HEADER_INIT_VERSION) { - Print(L" UpdateHardwareInstance - 0x%lx\n", FmpImageHeader->UpdateH= ardwareInstance); + if (ImageHeader->Version >=3D 1) { + DEBUG((DEBUG_VERBOSE, " UpdateHardwareInstance - 0x%lx\n", ImageHea= der->UpdateHardwareInstance)); + if (ImageHeader->Version >=3D EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_= HEADER_INIT_VERSION) { + DEBUG((DEBUG_VERBOSE, " ImageCapsuleSupport - 0x%lx\n", ImageH= eader->ImageCapsuleSupport)); + } } } } diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeMod= ulePkg/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", ImageHea= der->Version)); return EFI_INVALID_PARAMETER; } - if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADE= R_INIT_VERSION) { + if (ImageHeader->Version =3D=3D 1) { FmpImageHeaderSize =3D OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMA= GE_HEADER, UpdateHardwareInstance); + } else { + FmpImageHeaderSize =3D OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMA= GE_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", ImageHead= er->UpdateImageIndex)); DEBUG((DEBUG_VERBOSE, " UpdateImageSize - 0x%x\n", ImageHead= er->UpdateImageSize)); DEBUG((DEBUG_VERBOSE, " UpdateVendorCodeSize - 0x%x\n", ImageHead= er->UpdateVendorCodeSize)); - if (ImageHeader->Version >=3D EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HE= ADER_INIT_VERSION) { - DEBUG((DEBUG_VERBOSE, " UpdateHardwareInstance - 0x%lx\n", ImageH= eader->UpdateHardwareInstance)); + if (ImageHeader->Version >=3D 1) { + DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->U= pdateHardwareInstance)); + if (ImageHeader->Version >=3D EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_= HEADER_INIT_VERSION) { + DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->I= mageCapsuleSupport)); + } } } } @@ -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 =3D (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAP= SULE_IMAGE_HEADER, UpdateHardwareInstance); + if (ImageHeader->Version =3D=3D 1) { + Image =3D (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_C= APSULE_IMAGE_HEADER, UpdateHardwareInstance); + } else { + Image =3D (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_C= APSULE_IMAGE_HEADER, ImageCapsuleSupport); + } } =20 if (ImageHeader->UpdateVendorCodeSize =3D=3D 0) { @@ -945,6 +955,7 @@ SetFmpImageData ( DEBUG((DEBUG_INFO, "ImageIndex - 0x%x ", ImageHeader->UpdateImageIndex)); if (ImageHeader->Version >=3D EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEAD= ER_INIT_VERSION) { DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->Upd= ateHardwareInstance)); + DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageC= apsuleSupport)); } DEBUG((DEBUG_INFO, "\n")); =20 @@ -1239,7 +1250,10 @@ ProcessFmpCapsuleImage ( ImageHeader =3D (EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *)((UIN= T8 *)FmpCapsuleHeader + ItemOffsetList[Index]); =20 UpdateHardwareInstance =3D 0; - if (ImageHeader->Version >=3D EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HE= ADER_INIT_VERSION) { + /// + /// UpdateHardwareInstance field was added in Version 2 + /// + if (ImageHeader->Version >=3D 2) { UpdateHardwareInstance =3D ImageHeader->UpdateHardwareInstance; } =20 --=20 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprieta= ry 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 desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephon= e at 770-246-8600, and then delete or destroy all copies of the transmissio= n. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59475): https://edk2.groups.io/g/devel/message/59475 Mute This Topic: https://groups.io/mt/74193809/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 7 21:18:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+59476+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59476+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589409638; cv=none; d=zohomail.com; s=zohoarc; b=fhgWPQBBdRSHWy/Ie0c0a7y0ZqGxxktzvcrjwISeXTkFlbUm2Z7yF6FWxIE7qXMz17sQvIkwgrcoBXAwPWtqTH833DuymFJ/8Pwleu9cLOGBeNcKHn9pDfTJNCXfgfAP2ofsYSkghwuFWCN4cW0EjFoAXpfZ7FiK4Axv/NCo97A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589409638; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=RMWX0ivinMAVxizRCWgRTL0+pXfheusBiOhc8t8/9gY=; b=XRlWN6EOIlbg5b9RU1d//p+tM8AsMt4BAnkVyZfDJFfuIFnYMZ8Xn3H62gjDJsKZ1r5UjQfZM/XAcSIXHOPz609YcJAxTZd6y4UrqOwluuY53l2aUieqx8GrV19zBRycXi26ox/jf29TfB5WOQTsajhywlmkK3c9/1z4VChk8mw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59476+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589409638566645.5777883594473; Wed, 13 May 2020 15:40:38 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id dim6YY1788612xngHGBtdAlt; Wed, 13 May 2020 15:40:38 -0700 X-Received: from atlmailgw2.ami.com (atlmailgw2.ami.com []) by mx.groups.io with SMTP id smtpd.web10.1804.1589409632386466326 for ; Wed, 13 May 2020 15:40:37 -0700 X-AuditID: ac10606f-05fff70000001b62-a7-5ebc77649787 X-Received: from atlms1.us.megatrends.com (atlms1.us.megatrends.com [172.16.96.144]) (using TLS with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by atlmailgw2.ami.com (Symantec Messaging Gateway) with SMTP id AC.44.07010.4677CBE5; Wed, 13 May 2020 18:40:36 -0400 (EDT) X-Received: from Oleksiy77.us.megatrends.com (172.16.97.158) by atlms1.us.megatrends.com (172.16.96.144) with Microsoft SMTP Server id 14.3.468.0; Wed, 13 May 2020 18:39:53 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , , , Subject: [edk2-devel] [PATCH V6 6/6] SignedCapsulePkg: Add FMP Capsule Image Header extension Date: Wed, 13 May 2020 18:39:47 -0400 Message-ID: <20200513223947.56560-7-oleksiyy@ami.com> In-Reply-To: <20200513223947.56560-1-oleksiyy@ami.com> References: <20200513223947.56560-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsWyRiBhgm5K+Z44gwWPdC3mv622aJ8wm83i 6q1fTBbzvs1gtVj30cNixb0N7BYdHf+YHNg9tn+/wOixeM9LpgCmqAZGm8S8vPySxJJUhZTU 4mRbpYCizLLE5EolhcwUWyVDJYWCnMTk1NzUvBJbpcSCgtS8FCU7LgUMYANUlpmnkJqXnJ+S mZduq+QZ7K9rYWFqqWuoZBeSkaqQmZeWX5SbWJKZn6eQnJ9XAlSdmgIUVUjo5szY8+I8c8FG kYrdl08zNTB2C3YxcnJICJhI/F55jr2LkYtDSGAXk8TRrplMIAkhgS2MEjev6IPYbAKaEgeO TWEEsUUEpCSmHICoYRY4zCjR8QksLiwQLPFo3mtWEJtFQFVi6uazbCA2r4CpxM67S9ghlmlI TFtzF6yXU8BMYtOCXhaIXaYSW18cZYeoF5Q4OfMJC8R8CYmDL14wQ9TISrQdf84+gZF/FpKy WUjKFjAyrWIUSizJyU3MzEkvN9JLzM3US87P3cQIib/8HYwfP5ofYmTiYDzEKMHBrCTC67d+ d5wQb0piZVVqUX58UWlOavEhRiegByYyS3GDAhAYI/HGBgZSojCOoYmZibmRuaGlibmxsZI4 76S1a+KEBNKBMZudmlqQWgQzhImDU6qBkX/x35PeB/rvzmWtXB+8w5Tp33RtqT9LDm9lc7T/ mVg5cYktz7EJy7aKvZRj93yZcaRobf/H/09nHpAxfB5oruH1/dUGzsl7N00JyTl8vNHruMbv rldCF2xPzxQ+dot53u8jk9eK+PgkPRNcIa19ZMGWxnnxVx84MupLRczW7198arLjPTvjR8uU WIozEg21mIuKEwHVpO7r1AIAAA== Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,oleksiyy@ami.com X-Gm-Message-State: F6ApFXwKj8WZzdlVoBOd9lVLx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589409638; bh=qv4a4R8SOIYGHAYz/68ojyr1O/GbYAQf+GifdQgxIbM=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=QOyp1E4wENp9mYXDDGFWRjW2/5S4mUzgMXpjyo6sNDXNWgkO1kPX/r0mSDb6NuqxVar 2ZBtxafZ/nrxxOz49GjSTNWqxk1KN9y5JablV87+yckaZjScHL629VXQjSgyKspLNC+Ib 3sQ3zlVQnFP6YsdgIZPMnnNl39UQ9pDfev4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Wei6 Xu --- .../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 14 ++++++++++= ---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModul= eLoadPei.c b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModul= eLoadPei.c index 53b821c..307060b 100644 --- a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPe= i.c +++ b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPe= i.c @@ -328,10 +328,11 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHea= der->Version)); return EFI_INVALID_PARAMETER; } - if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADE= R_INIT_VERSION) { + if (ImageHeader->Version =3D=3D 1) { FmpImageHeaderSize =3D OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMA= GE_HEADER, UpdateHardwareInstance); + } else { + FmpImageHeaderSize =3D OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMA= GE_HEADER, ImageCapsuleSupport); } - // No overflow if (FmpImageSize !=3D (UINT64)FmpImageHeaderSize + (UINT64)ImageHeader= ->UpdateImageSize + (UINT64)ImageHeader->UpdateVendorCodeSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) mismatch, UpdateImageSize(0= x%x) UpdateVendorCodeSize(0x%x)\n", FmpImageSize, ImageHeader->UpdateImageS= ize, 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 =3D (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_C= APSULE_IMAGE_HEADER, UpdateHardwareInstance); + if (ImageHeader->Version =3D=3D 1) { + Image =3D (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT= _CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); + } else { + Image =3D (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT= _CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); + } } =20 Status =3D ProcessRecoveryImage (Image, ImageHeader->UpdateImageSize); --=20 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprieta= ry 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 desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephon= e at 770-246-8600, and then delete or destroy all copies of the transmissio= n. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59476): https://edk2.groups.io/g/devel/message/59476 Mute This Topic: https://groups.io/mt/74193810/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-