From nobody Mon May 6 06:40:15 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+59590+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+59590+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589489556; cv=none; d=zohomail.com; s=zohoarc; b=LIf3ljr5ufoYrb6e7f30oPliC5ltb20GAMAd09urk7Mckxpw0OvDygWlwVMALpseX+rNSVOdj1jD+qdDvkU30tUtBuEC76tvYynLHkTYpNOOjk6eJ/CWrJbAG5wToAaVFfcsg1MeZcxE6E7EH+dd67UsfS7ShbX0c+vHvuLwoJw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589489556; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=2pmQ678Rfrd63ayhrI3/ap+T3acPS9IJqlcC5PRwF4Q=; b=I2pwpXBxsdfzr1JZPbT5etOFk1Y3j1NYdFuM/OEg6auORu7frCIFsYvtZRKx81lRZlxJMYPCjyNyYiUar9YAtLR3/vhFKZoTEVDgvuNY6wJgu/1p9uSdd6GRy8caZkhVDKh+m/nRy1SSqidjGsAQKjZa8Wzn/lSiH4WQsuKZIZ0= 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+59590+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 158948955644686.86358762515692; Thu, 14 May 2020 13:52:36 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id LIXAYY1788612x7aDQOWKCD1; Thu, 14 May 2020 13:52:36 -0700 X-Received: from atlmailgw2.ami.com (atlmailgw2.ami.com [63.147.10.42]) by mx.groups.io with SMTP id smtpd.web12.774.1589489555062819015 for ; Thu, 14 May 2020 13:52:35 -0700 X-AuditID: ac10606f-049ff70000001b62-3f-5ebdaf907efe 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 13.76.07010.19FADBE5; Thu, 14 May 2020 16:52:33 -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; Thu, 14 May 2020 16:51:47 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , , , Subject: [edk2-devel] [PATCH V7 1/6] MdePkg: Add new CPER Notification types Date: Thu, 14 May 2020 16:51:40 -0400 Message-ID: <20200514205145.36956-2-oleksiyy@ami.com> In-Reply-To: <20200514205145.36956-1-oleksiyy@ami.com> References: <20200514205145.36956-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHIsWRmVeSWpSXmKPExsWyRiBhgu7E9XvjDK5vkrCY/7baon3CbDaL q7d+MVnM+zaD1WLdRw+LFfc2sFt0dPxjcmD32P79AqPH4j0vmQKYohoYbRLz8vJLEktSFVJS i5NtlQKKMssSkyuVFDJTbJUMlRQKchKTU3NT80pslRILClLzUpTsuBQwgA1QWWaeQmpecn5K Zl66rZJnsL+uhYWppa6hkl1IRqpCZl5aflFuYklmfp5Ccn5eCVB1agpQVCGhmzNj7oM5zAUT RSoOLFzI3MB4SaCLkZNDQsBE4sX9+cxdjFwcQgK7mCQ27L/KDJIQEtjCKHGlVxbEZhPQlDhw bAojiC0iICUx5cBMJhCbWeAwo0THJ7C4sIC9RNOhc0C9HBwsAqoSvf+FQUxeAVOJu022EKs0 JKatuQvWySlgJjH7/xEmkBIhoJKvE5RAwrwCghInZz5hgRguIXHwxQuoY2Ql2o4/Z5/AyD8L SdksJGULGJlWMQolluTkJmbmpJcb6SXmZuol5+duYoREXv4Oxo8fzQ8xMnEwHmKU4GBWEuH1 W787Tog3JbGyKrUoP76oNCe1+BCjE9D1E5mluEGhB4yOeGMDAylRGMfQxMzE3Mjc0NLE3NhY SZx30to1cUIC6cBozU5NLUgtghnCxMEp1cCoPef5swlLz6eFq9axr3Bf6nnisU6f7a3FL4ob xc2/B2pdVLv9/9bPG6oze30PJM0Tb3zq5vTv3M6fbm4ODrzPpnyoiDB+5TPjtgP/tFMClmf7 lW/1ufbLqc5V6+XRSl5x+0vh5ycsz8zfytzjCg0SXLfszD/TIjn/KS6L7RfpzJ5/1Vf52M4Q JZbijERDLeai4kQAoTTNddECAAA= 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: IwJngEepjeHzT03aI5sddDrOx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589489556; bh=JHHKYAMh+C6VF0+GwqQF4oIJtZVhCl9/9+5ydgOnJ5I=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=fTIqmfvCfbaRRLmK/68KG/RayK19QucFTMIbR59cWIx3qIpNFIo0n06lq3XVt5peZJL TmvsKUyM4mudwTDScx81AIjOAXeiOR8KGPeF7wLdLLbsp4bNqrtS6SSmmI2G+ZptG8K7Z tzQVfx3mDPVGpj/+2G4lhjk63Rzth44x6EU= 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 (#59590): https://edk2.groups.io/g/devel/message/59590 Mute This Topic: https://groups.io/mt/74214494/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 Mon May 6 06:40:15 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+59591+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+59591+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589489556; cv=none; d=zohomail.com; s=zohoarc; b=jf34VMX5AfFf5Sf3icR8g/C5qO+DvzVma9hI3eLbWCAEBrk7vNK2R1VJlj4N7K9GQRJ9fnw11Yqq1oEBYOqAlOHYEEfalsA2lJ+g5vccgqVNDVVX/7s0BGHNCrijT3/HsnCg7rHnRuVMtzZtKsiK+i8q4o8o77SlS4rRok+nSBc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589489556; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=+uY0rDOAlSlt8H+Y7AaiOZZ6XahiI/vqs04/moopqyc=; b=QsvHqirSAfYnPZ+eCGcTeOFV4J8y0YyLnTIQy5PzI4b813lzNDQ5jD9OwYeHCPrOusoYcEfwyqyw2Mm2w0/f6U1XfvoRSJ+yHPPLoxul/9qLznRhRAy2zE3Z9CKfVMpEtPd1dd9bbhE1J7GwCq48mqvEyse4gr4zw5da2lxFqR0= 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+59591+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589489556027392.8005045705323; Thu, 14 May 2020 13:52:36 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id oBOsYY1788612xVmQFabhIwv; Thu, 14 May 2020 13:52:35 -0700 X-Received: from atlmailgw1.ami.com (atlmailgw1.ami.com []) by mx.groups.io with SMTP id smtpd.web11.809.1589489553710474823 for ; Thu, 14 May 2020 13:52:35 -0700 X-AuditID: ac1060b2-0e1ff700000018d4-ce-5ebdaf9262ab 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 40.77.06356.29FADBE5; Thu, 14 May 2020 16:52: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; Thu, 14 May 2020 16:51:48 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , , , Subject: [edk2-devel] [PATCH V7 2/6] MdePkg: Fix OUT parameters marked as IN OUT Date: Thu, 14 May 2020 16:51:41 -0400 Message-ID: <20200514205145.36956-3-oleksiyy@ami.com> In-Reply-To: <20200514205145.36956-1-oleksiyy@ami.com> References: <20200514205145.36956-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrPIsWRmVeSWpSXmKPExsWyRiBhgu6k9XvjDDb26VnMf1tt0T5hNpvF 1Vu/mCzmfZvBarHuo4fFinsb2C06Ov4xObB7bP9+gdFj8Z6XTAFMUQ2MNol5efkliSWpCimp xcm2SgFFmWWJyZVKCpkptkqGSgoFOYnJqbmpeSW2SokFBal5KUp2XAoYwAaoLDNPITUvOT8l My/dVskz2F/XwsLUUtdQyS4kI1UhMy8tvyg3sSQzP08hOT+vBKg6NQUoqpDQzZlx9+IpxoJ9 ERUdO+saGNttuxg5OCQETCSWb9PoYuTiEBLYxSTRffwyG4SzhVGiafkS9i5GTg42AU2JA8em MILYIgJSElMOzGQCsZkFDjNKdHwCiwsLOEucOXKGDcRmEVCVuPGmlRnE5hUwlbh68TRYvYSA hsS0NXfBbE4BM4nZ/48wgRwhBFTzdYISRLmgxMmZT1ggxktIHHzxAmyMkICsRNvx5+wTGPln ISmbhaRsASPTKkahxJKc3MTMnPRyQ73E3Ey95PzcTYyQ2Nu0g7HlovkhRiYOxkOMEhzMSiK8 fut3xwnxpiRWVqUW5ccXleakFh9idAK6fyKzFDco+IDxEW9sYCAlCuMYmpiZmBuZG1qamBsb K4nzTl67Jk5IIB0Yr9mpqQWpRTBDmDg4pRoYb25XOvHkdeP516wnizI+X/phGnix8DSr4b6w 75MPub4+pNdkY3z51SznVb9Y2xwZ7TXen5z7arOkttDTKy6F1rEMm3Y+TLtzrJH5WV570YZb z39rZAbdrDj6+5ne1cqfp8R0/IOyX7NqXH2tZGSazb1UT/hB6fNlUzlerAkvfsPGe2xiiWy9 nRJLcUaioRZzUXEiAEvm04HSAgAA 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: f0GSPDALVEyhcbkSVOtSqAfUx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589489555; bh=gCbEVkTlbfdCZhYnzYAlz5QZUqwNXusDwO00mEsJ/Ho=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=J8y1AfhsayeqxJvCS04SXE8tBcIxqJEotHUMucBtogxPEognz5P/CH4OGmEQRu3u6if 4Eo6ScQNF/EweIAcY8IxLc30plFbYCyvR6YGbqUBQrIsQmeIFOqVVJOiNHXqMktX3btpT NSlNhrbDwCXD2ECluvCd9btB7PBT1mONQzk= 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 (#59591): https://edk2.groups.io/g/devel/message/59591 Mute This Topic: https://groups.io/mt/74214495/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 Mon May 6 06:40:15 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+59592+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+59592+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589489557; cv=none; d=zohomail.com; s=zohoarc; b=dCR39M4kx9zirn5vtuOHI1yrg4jaMCTg89qutHqRfDXYO3Oiszz29q91FRjxI4NDTi8rEehMD/pr4XhiXzWHB4VRyuMNVdQIPnZt2GxzZuN20/+Mx4izC+3lK9yf6xWY4M68UnY6PMFKnNadCrRC3NFPO44tladaBDOjVvpz5JA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589489557; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=7XVgw8W6+2d8wkt11JzWE7lPUWOeoHuWQq4D41M4Fs4=; b=ankvYQw3jXccKL4SFg/hfXSD+dNYz3IK80evHKAqbwn2kp/T5sUcM33tKrmExry+jTNCV1gPsETdmZkxodqAurUEwpQRelzLWOLprKxT+R3bSX6zrQRapesiQN86bhZvnPo1T2/sGdkQuA35zBKp5b3i/FWy0X1fM5AQ+gd95OA= 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+59592+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589489557373810.617622680438; Thu, 14 May 2020 13:52:37 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id lP9fYY1788612xLEJ0PxdnKD; Thu, 14 May 2020 13:52:37 -0700 X-Received: from atlmailgw2.ami.com (atlmailgw2.ami.com []) by mx.groups.io with SMTP id smtpd.web12.774.1589489555062819015 for ; Thu, 14 May 2020 13:52:36 -0700 X-AuditID: ac10606f-05fff70000001b62-42-5ebdaf925bbc 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 93.76.07010.39FADBE5; Thu, 14 May 2020 16:52:35 -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; Thu, 14 May 2020 16:51:49 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , , , Subject: [edk2-devel] [PATCH V7 3/6] MdePkg: Add EFI_RT_PROPERTIES_TABLE Date: Thu, 14 May 2020 16:51:42 -0400 Message-ID: <20200514205145.36956-4-oleksiyy@ami.com> In-Reply-To: <20200514205145.36956-1-oleksiyy@ami.com> References: <20200514205145.36956-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrPIsWRmVeSWpSXmKPExsWyRiBhgu7k9XvjDG6281rMf1tt0T5hNpvF 1Vu/mCzmfZvBarHuo4fFinsb2C06Ov4xObB7bP9+gdFj8Z6XTAFMUQ2MNol5efkliSWpCimp xcm2SgFFmWWJyZVKCpkptkqGSgoFOYnJqbmpeSW2SokFBal5KUp2XAoYwAaoLDNPITUvOT8l My/dVskz2F/XwsLUUtdQyS4kI1UhMy8tvyg3sSQzP08hOT+vBKg6NQUoqpDQzZnRNO8WS8Ee uYonj3exNDA2SXQxcnJICJhInJ/dzg5iCwnsYpKYPCGpi5ELyN7CKHFjYR8rSIJNQFPiwLEp jCC2iICUxJQDM5lAbGaBw4wSHZ/A4sIC1hLvfpwGqufgYBFQlXi0OxokzCtgKvHhfS8zxC4N iWlr7oK1cgqYScz+f4QJpFwIqObrBCWIckGJkzOfsEBMl5A4+OIFM8RpshJtx5+zT2Dkn4Wk bBaSsgWMTKsYhRJLcnITM3PSy430EnMz9ZLzczcxQmIvfwfjx4/mhxiZOBgPMUpwMCuJ8Pqt 3x0nxJuSWFmVWpQfX1Sak1p8iNEJ6PyJzFLcoOADxke8sYGBlCiMY2hiZmJuZG5oaWJubKwk zjtp7Zo4IYF0YLxmp6YWpBbBDGHi4JRqYIy1nNX7l+VEIleZqpVFblhEflHVks3NG70vXYso 28fvzbHqxtW4y0HVaYbz6vhWmzlVc/wpOpR1d2LXhfkdeixTC+Tnfni8g6nO4L7nukWG191c H2e1+KWdczZ8027jGeO08J74vbDzT1f2pST/+KuyZZPOlg2vTFsY5peuLPpncP/yZBOvcCWW 4oxEQy3mouJEABs8awfSAgAA 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: MdigG1elGER3LQDTQQzP17Qpx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589489557; bh=atq4DsZSHTdHvLEXNjV/Y+D5abWmOjx3C6gCYRaxYPc=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=YohcbmGtGCql7YpxU6hM3E32TMROAlniKtpuBKGjNFKtaFybeasm+ZZLhNWtJFGm3nR Fqfw47hPb09Su66VLLVdHaYOtIgbl9ytBbk7AxgJjTkZqwpyd8Igo0PZoRO3dhRwirJwO hYeFo6MbuA2COHQDqHRHrT7gWHHDIbpa3yo= 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 (#59592): https://edk2.groups.io/g/devel/message/59592 Mute This Topic: https://groups.io/mt/74214496/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 Mon May 6 06:40:15 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+59593+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+59593+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589489557; cv=none; d=zohomail.com; s=zohoarc; b=l8TFE7NixKZ1X/TsoJsrQ+seSUAXGdjD0VKXYQiFJQh7+glvVFXF6NDPVPsZKq48l9bP4NoU2Y7AsfXza5NPChIAFe7d7Hf/HF/x2h9EKiHVFRCbQhIarMGjHyzFzJC+H/ZAJar1rIHJLMVBv5/nSBYFFTac4dQqPOTvn9bW9Zg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589489557; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=mDqYxNkvgpV7UXbqY+X9vN+NbCBPLI6nqHbdOJ2eyic=; b=PqqkPbtc07qc8+L01jgrqEYzHgsUb+jE06K9WSYwxREaliZAZT0FU/4kqmtG8FNCNibW7VeaKPCg1SG7RCb/Gfi/rC5aPpX/rHM4CcwH/5z5k5HvrHybPRYCDktDyKqH2Cg/b3xmZ0vKVE9uWVxAnmBjFDmoejRdKvjcWgA7rSc= 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+59593+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589489557824561.3836345650436; Thu, 14 May 2020 13:52:37 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id GgoDYY1788612xvsD8YM1Vfp; Thu, 14 May 2020 13:52:37 -0700 X-Received: from atlmailgw1.ami.com (atlmailgw1.ami.com []) by mx.groups.io with SMTP id smtpd.web11.809.1589489553710474823 for ; Thu, 14 May 2020 13:52:37 -0700 X-AuditID: ac1060b2-0f7ff700000018d4-cf-5ebdaf94b708 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 C0.77.06356.49FADBE5; Thu, 14 May 2020 16:52: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; Thu, 14 May 2020 16:51:50 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , , , Subject: [edk2-devel] [PATCH V7 4/6] MdePkg: Add FMP Capsule Image Header extension Date: Thu, 14 May 2020 16:51:43 -0400 Message-ID: <20200514205145.36956-5-oleksiyy@ami.com> In-Reply-To: <20200514205145.36956-1-oleksiyy@ami.com> References: <20200514205145.36956-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrPIsWRmVeSWpSXmKPExsWyRiBhgu6U9XvjDJoeqVnMf1tt0T5hNpvF 1Vu/mCzmfZvBarHuo4fFinsb2C06Ov4xObB7bP9+gdFj8Z6XTAFMUQ2MNol5efkliSWpCimp xcm2SgFFmWWJyZVKCpkptkqGSgoFOYnJqbmpeSW2SokFBal5KUp2XAoYwAaoLDNPITUvOT8l My/dVskz2F/XwsLUUtdQyS4kI1UhMy8tvyg3sSQzP08hOT+vBKg6NQUoqpDQzZlxectWxoLH 3BXzW56yNTD+5uxi5OSQEDCR6Fx7ir2LkYtDSGAXk8Shz/ehnC2MEs2tt5lAqtgENCUOHJvC CGKLCEhJTDkwEyzOLHCYUaLjE1Ccg0NYwE3izWtnEJNFQFVi3aQ4kApeAVOJeYv2MkHs0pCY tuYumM0pYCYx+/8RJpByIaCarxOUIMoFJU7OfMICMVxC4uCLF8wgtpCArETb8efsExj5ZyEp m4WkbAEj0ypGocSSnNzEzJz0ckO9xNxMveT83E2MkNjbtIOx5aL5IUYmDsZDjBIczEoivH7r d8cJ8aYkVlalFuXHF5XmpBYfYnQCOn8isxQ3KPiA8RFvbGAgJQrjGJqYmZgbmRtampgbGyuJ 805euyZOSCAdGK/ZqakFqUUwQ5g4OKUaGHffydPW57rp/vnKJ86138uPVbod61L68M3uQfm1 EudP15bWS6o6L3G5u1DctmPCHm4hs/ad3rUHfG8yLyy++/9d0EHD4KUM0nYn7C6efOfOnKVn lpT/Tuxry64G61wll/dB9dLNE+7wqy4Q+yiw8Zz76lPV1oyzDMNtDGbO2VW/ZO4Mf4M5PUos xRmJhlrMRcWJACfrfLjSAgAA 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: CGBqEu2iojSPhxO4BARmsL9Yx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589489557; bh=hLEa65hWshTtUVZL0TAm7aJGjmbCZCK34O6MiGOeZAU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=aVDNShtE0qBQt0ZtcJ9ZXKBhl1xLH7+yKotcM1fPAINvzmuJtg4NnSV1YYOgKo+D4yA Ijhlv3EmMd1nLgl2kcXtOJ4QVp04DjVfWdAQGHXbRElKQux++58aizQkaieMgkAwkml6F OKrXEnsaYF7g18iBHOXNzDR3CF7+ZuceDiE= 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 (#59593): https://edk2.groups.io/g/devel/message/59593 Mute This Topic: https://groups.io/mt/74214497/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 Mon May 6 06:40:15 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+59594+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+59594+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589489559; cv=none; d=zohomail.com; s=zohoarc; b=O8/r+cTzokwN5RzSGst2+SfjJm/I5PRcoD/6Se8Q8nAxCyinrb52UoVKOeyMkaDD7Wk7MvimhHKQ7cfCLTAq/pAkbdfYOiiUqIxsRV27LGKyVzJnlUM5S4OtIY92jCisF93mQfPe9b4VJlxzsOqjjCJvOoSSDz71Gm6UOeBSzKg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589489559; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=wkGMvyNeY2wqbce8tGPrqvyZZBJ+k5cmaybrMDa9YlE=; b=fsadLZe5SUKCDNXevuT2cmuW9q9boDEksg91vQn+fRZ/Yc/2Y2UMSX1ZbzWao7HKdp3LBx0lMZVOc1FiWd5CWM7h5I1kzLBEFygzpV2r9WmDNsu7fU4TdltcWdBhEAZmjke+QxWiwUkiVInO4dFcIrdvsRqYyYY3D7q8isILnwg= 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+59594+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589489559086539.5294594540231; Thu, 14 May 2020 13:52:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id z0QKYY1788612xrf5Z9IGd90; Thu, 14 May 2020 13:52:38 -0700 X-Received: from atlmailgw2.ami.com (atlmailgw2.ami.com []) by mx.groups.io with SMTP id smtpd.web12.774.1589489555062819015 for ; Thu, 14 May 2020 13:52:38 -0700 X-AuditID: ac10606f-049ff70000001b62-43-5ebdaf943bcd 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 34.76.07010.49FADBE5; Thu, 14 May 2020 16:52:37 -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; Thu, 14 May 2020 16:51:51 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , , , Subject: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension Date: Thu, 14 May 2020 16:51:44 -0400 Message-ID: <20200514205145.36956-6-oleksiyy@ami.com> In-Reply-To: <20200514205145.36956-1-oleksiyy@ami.com> References: <20200514205145.36956-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAIsWRmVeSWpSXmKPExsWyRiBhgu7U9XvjDO41clnMf1tt0T5hNpvF 1Vu/mCzmfZvBarHuo4fFinsb2C06Ov4xObB7bP9+gdFj8Z6XTAFMUQ2MNol5efkliSWpCimp xcm2SgFFmWWJyZVKCpkptkqGSgoFOYnJqbmpeSW2SokFBal5KUp2XAoYwAaoLDNPITUvOT8l My/dVskz2F/XwsLUUtdQyS4kI1UhMy8tvyg3sSQzP08hOT+vBKg6NQUoqpDQzZnx/dBqxoIl mhUL9kxibmDcpdTFyMkhIWAisWHuKdYuRi4OIYFdTBLt+/YwQzhbGCX2zTjGAlLFJqApceDY FEYQW0RASmLKgZlMIDazwGFGiY5PYHFhAR+JvTuvsnUxcnCwCKhK7LhiCBLmFTCVuPnsPiPE Mg2JaWvugrVyCphJzP5/hAmkXAio5usEJYhyQYmTM5+wQEyXkDj44gUziC0kICvRdvw5+wRG /llIymYhKVvAyLSKUSixJCc3MTMnvdxILzE3Uy85P3cTIyT68ncwfvxofoiRiYPxEKMEB7OS CK/f+t1xQrwpiZVVqUX58UWlOanFhxidgM6fyCzFDQo/YITEGxsYSInCOIYmZibmRuaGlibm xsZK4ryT1q6JExJIB0ZsdmpqQWoRzBAmDk6pBkblRyneZpwTrNgWmnJ63raRU7p1dXrebodG Gc053XtVDqwrTPc9bzDDpS6u+sa2xEyts7rfH/Mwfrp66G5Y0amHVzds8YsxNEgO97MMj18j 9sZ2eY3oIwfdNWpuliVzL3ZeF3fP35149PL1T7sYxC7NdgmImRF/bmfCC7WJ9S6XzFU5N6h/ /6XEUpyRaKjFXFScCACS13Wh0wIAAA== 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: iUfF7FjxbTItpnoiEv3WAlC1x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589489558; bh=sNE6pjknXH1qg/btl/Q+dK6t7CrNJnFOxL3qPap8JMI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=aT+aNLxdnNZ+5tlklAH66a8LbBohdqqh9zj8ApMY7/iNoQDr3RM+ZDl75IxGw/Xq3U0 bJhSXLS/frD4RCyAR4nnFGDQ7eFtPjZiOY/xu+thU06d7YZo0HTKo26qmXnnzpH/ikcqy 8y78fgzV7421Gkht4wgxmCa3Wwu5m8WibY0= 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 (#59594): https://edk2.groups.io/g/devel/message/59594 Mute This Topic: https://groups.io/mt/74214498/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 Mon May 6 06:40:15 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+59595+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+59595+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589489559; cv=none; d=zohomail.com; s=zohoarc; b=LSrh5xmPJaXwCTwjKSQkTIFz2skiXEqbuZL3kyLK6eWwF6GkW03ILWcgYnPJv7opBtzS/cix7iz83exBPzVnx9dHi6Y2djTaLE0ZwKR6fJoweKGv1p7qQPcEWNcdBrcid99e8mFRPy/EeUEuPjCeTfWVMVSdFjqKUmfT/zRlCOw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589489559; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=KkW9hTzgZg16OAmTFjeC5ESiOIxptMQ6Ey6eWKrFZjw=; b=TgBCoe5+ndZiMSfbZ+cjTLtImZS6sZbRHzVN1iOpPvIB5aLd8YvvNG42exzo5LTKT9QKwGvX7JliaLm9f1mEdNzs0GBUQEkejwh68pwgENdmEAkrof6n8MYw8J0h+uBysCDW5AKGdBxnXHoKV/U6cFEoJHV4Jix7nMwFhYw6M00= 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+59595+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1589489559772963.650211037739; Thu, 14 May 2020 13:52:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id XhjTYY1788612x6j6RWARI1Q; Thu, 14 May 2020 13:52:39 -0700 X-Received: from atlmailgw1.ami.com (atlmailgw1.ami.com []) by mx.groups.io with SMTP id smtpd.web11.809.1589489553710474823 for ; Thu, 14 May 2020 13:52:39 -0700 X-AuditID: ac1060b2-0f7ff700000018d4-d1-5ebdaf966bae 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 51.77.06356.69FADBE5; Thu, 14 May 2020 16:52:38 -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; Thu, 14 May 2020 16:51:52 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , , , , Subject: [edk2-devel] [PATCH V7 6/6] SignedCapsulePkg: Add FMP Capsule Image Header extension Date: Thu, 14 May 2020 16:51:45 -0400 Message-ID: <20200514205145.36956-7-oleksiyy@ami.com> In-Reply-To: <20200514205145.36956-1-oleksiyy@ami.com> References: <20200514205145.36956-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsWyRiBhgu609XvjDP7+VbGY/7baon3CbDaL q7d+MVnM+zaD1WLdRw+LFfc2sFt0dPxjcmD32P79AqPH4j0vmQKYohoYbRLz8vJLEktSFVJS i5NtlQKKMssSkyuVFDJTbJUMlRQKchKTU3NT80pslRILClLzUpTsuBQwgA1QWWaeQmpecn5K Zl66rZJnsL+uhYWppa6hkl1IRqpCZl5aflFuYklmfp5Ccn5eCVB1agpQVCGhmzPj3Z+FjAWz xSquvp/H3MB4XKiLkZNDQsBE4sbbN8xdjFwcQgK7mCSmPdzMCuFsYZR4c/E6G0gVm4CmxIFj UxhBbBEBKYkpB2YygdjMAocZJTo+gcWFBYIljk++ARZnEVCV+HRkGwuIzStgKrH5zRlWiG0a EtPW3AWr4RQwk5j9/wiQzQG0zFTi6wQliHJBiZMzn7BAjJeQOPjiBTOILSQgK9F2/Dn7BEb+ WUjKZiEpW8DItIpRKLEkJzcxMye93FAvMTdTLzk/dxMjJP427WBsuWh+iJGJg/EQowQHs5II r9/63XFCvCmJlVWpRfnxRaU5qcWHGJ2A7p/ILMUNCkBgjMQbGxhIicI4hiZmJuZG5oaWJubG xkrivJPXrokTEkgHxmx2ampBahHMECYOTqkGRtm2lBdmyp+nrFgbP+ueuZJGktWSLy6eScq5 P+tmLF2oUJYdE2k90X7fVXX9R9afYs8dX/Lzh8fT/o07Z6/Vt+fYzKxmaPOTJ2fxiwOdiU12 zqm6ouUPb5mG5U5mDRe9bTxT/NbZ9+9P73fT10qYklusYGFW6GH1sM2rcfWZPZ+EBNaVbIvI UGIpzkg01GIuKk4EAEiD4CvUAgAA 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: kncI9xxcOKZf5RWSAAWLLFrSx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589489559; bh=Szx/8e+j3JzLO1t6qJ0LrZ/rHY97nG2sL9a86/BEpSU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=G45QC2On9MbEA0v/lZojMn8G51hUpyxNwQXN8+4NZeoRXZUUEwPFabm4yEnUOAgBiiv kXHF9jg/l7/GFlAcIBCnw5c9uLmPkR1Q+16k4UA/ZmygJAMqcLCCk7oTzDHZnuPmv/5KM 0ZFRok9YwQx7MQX5ffXeLuWLV+kUh5HRgFQ= 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 Reviewed-by: Chao Zhang --- .../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 18 ++++++++++++++= ---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModul= eLoadPei.c b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModul= eLoadPei.c index 53b821c..12cc235 100644 --- a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPe= i.c +++ b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPe= i.c @@ -328,10 +328,15 @@ 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) { + /// + /// Current Init ImageHeader version is 3. UpdateHardwareInstance fiel= d was added in version 2 + /// and ImageCapsuleSupport field was added in version 3 + /// + 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 +644,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 (#59595): https://edk2.groups.io/g/devel/message/59595 Mute This Topic: https://groups.io/mt/74214499/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-