From nobody Mon Feb 9 10:48:20 2026 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+53125+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+53125+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1578634515; cv=none; d=zohomail.com; s=zohoarc; b=miykIVQC9aP5wTnQeq2o7RleGiYOrDIt4UDTeGdeUXGNysqluzZZYu0SjGNVLgf34iWYEZHB5Ti7NGvy2DpXi3FjAOtib/chg66QZZ9EW1LAwTxjWVCWsEIp8TFlOB80rsONJv4ju9zHKpKjjVl1Tf41iSrXBMS9646ChhfVOoU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578634515; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=5bo1jiWbWVJD2eHE9SmQrz/CXV+gbvad5/IFwJ3Wjbo=; b=UnpG0MKBvlrPB/wS6zlt7QE3jmBNCcyg4znhA8RSyKsaCFUcome0cH9ENNWWAkr+F6DALtRZeZ5bO0NMHQHd9xOCzGllueqOx6nbUsoELsX84YX9eXItkG5cGNVEop/EyJvM5zkWkSaeOAgovZb9ccjIn/qSv6VgsI92v7XuitU= 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+53125+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1578634515080989.2615308468236; Thu, 9 Jan 2020 21:35:15 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id cF8CYY1788612x1uBxa4xRL2; Thu, 09 Jan 2020 21:35:14 -0800 X-Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web11.6216.1578634514007423001 for ; Thu, 09 Jan 2020 21:35:14 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2020 21:35:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,415,1571727600"; d="scan'208";a="371507841" X-Received: from shwdeopenpsi174.ccr.corp.intel.com ([10.239.157.39]) by orsmga004.jf.intel.com with ESMTP; 09 Jan 2020 21:35:12 -0800 From: "Xu, Wei6" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao Subject: [edk2-devel][PATCH 1/3] MdePkg: Add definition for Fmp Capsule Dependency. Date: Fri, 10 Jan 2020 13:34:52 +0800 Message-Id: <20200110053454.15376-2-wei6.xu@intel.com> In-Reply-To: <20200110053454.15376-1-wei6.xu@intel.com> References: <20200110053454.15376-1-wei6.xu@intel.com> MIME-Version: 1.0 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,wei6.xu@intel.com X-Gm-Message-State: 2SuSfBr26MEb2aDQcPg5E4p4x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1578634514; bh=POMdEDLY1+ecRhPPOGk1dee/FEZX8Ai3g5teJ02u7G4=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=n9BkCP3wDBOVMZ4n0P1nWk682J1Nz7a/ibWwnNomrpyR9kwjAEkxBPY69qyIl9pklIb NJeAiLidUuZ/A3Vad/I9t1fzmrufb+aCCEY0iXNwvtUTDVzYeP3ncLR6liY42iF/6ZEDu kQIHt60bqOBBOj1UqWFm7ypNx/uYuHi3cos= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2421 Add new definitions for Fmp Capsule dependency in UEFI Spec 2.8. 1. Extend the Last Attempt Status with a value to indicate the firmware update fails with unsatisfied dependencies. 2. Add the definition of dependency expression op-codes. 3. Add the definition of EFI_FIRMWARE_IMAGE_DEP which is an array of FMP dependency expression op-codes. 4. Extend the EFI_FIRMWARE_IMAGE_DESCRIPTOR with a pointer to the array of FMP dependency expression op-codes. 5. Extend the Image Attribute Definitions with IMAGE_ATTRIBUTE_DEPENDENCY to indicate that there is and EFI_FIRMWARE_IMAGE_DEP section associated with the image. 6. Update EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION to 4. Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: Wei6 Xu --- MdePkg/Include/Guid/SystemResourceTable.h | 19 ++++++++------- MdePkg/Include/Protocol/FirmwareManagement.h | 35 ++++++++++++++++++++++++= ++-- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/MdePkg/Include/Guid/SystemResourceTable.h b/MdePkg/Include/Gui= d/SystemResourceTable.h index 57c42bf9f3..418b8c8d05 100644 --- a/MdePkg/Include/Guid/SystemResourceTable.h +++ b/MdePkg/Include/Guid/SystemResourceTable.h @@ -1,9 +1,9 @@ /** @file Guid & data structure used for EFI System Resource Table (ESRT) =20 - Copyright (c) 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 @par Revision Reference: GUIDs defined in UEFI 2.5 spec. =20 @@ -32,18 +32,19 @@ #define ESRT_FW_TYPE_UEFIDRIVER 0x00000003 =20 /// /// Last Attempt Status Values /// -#define LAST_ATTEMPT_STATUS_SUCCESS 0x00000000 -#define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL 0x00000001 -#define LAST_ATTEMPT_STATUS_ERROR_INSUFFICIENT_RESOURCES 0x00000002 -#define LAST_ATTEMPT_STATUS_ERROR_INCORRECT_VERSION 0x00000003 -#define LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT 0x00000004 -#define LAST_ATTEMPT_STATUS_ERROR_AUTH_ERROR 0x00000005 -#define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_AC 0x00000006 -#define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_BATT 0x00000007 +#define LAST_ATTEMPT_STATUS_SUCCESS 0x00000000 +#define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL 0x00000001 +#define LAST_ATTEMPT_STATUS_ERROR_INSUFFICIENT_RESOURCES 0x00000002 +#define LAST_ATTEMPT_STATUS_ERROR_INCORRECT_VERSION 0x00000003 +#define LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT 0x00000004 +#define LAST_ATTEMPT_STATUS_ERROR_AUTH_ERROR 0x00000005 +#define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_AC 0x00000006 +#define LAST_ATTEMPT_STATUS_ERROR_PWR_EVT_BATT 0x00000007 +#define LAST_ATTEMPT_STATUS_ERROR_UNSATISFIED_DEPENDENCIES 0x00000008 =20 typedef struct { /// /// The firmware class field contains a GUID that identifies a firmware = component /// that can be updated via UpdateCapsule(). This GUID must be unique wi= thin all diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h b/MdePkg/Include/= Protocol/FirmwareManagement.h index 0a0bf4c84a..297bb5ff03 100644 --- a/MdePkg/Include/Protocol/FirmwareManagement.h +++ b/MdePkg/Include/Protocol/FirmwareManagement.h @@ -6,11 +6,11 @@ =20 GetImageInfo() is the only required function. GetImage(), SetImage(), CheckImage(), GetPackageInfo(), and SetPackageInfo() shall return EFI_UNSUPPORTED if not supported by the driver. =20 - Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
Copyright (c) 2013 - 2014, Hewlett-Packard Development Company, L.P.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 @par Revision Reference: This Protocol is introduced in UEFI Specification 2.3 @@ -26,10 +26,35 @@ 0x86c77a67, 0xb97, 0x4633, {0xa1, 0x87, 0x49, 0x10, 0x4d, 0x6, 0x85, 0= xc7 } \ } =20 typedef struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL EFI_FIRMWARE_MANAGEMENT_P= ROTOCOL; =20 +/// +/// Dependency Expression Opcode +/// +#define EFI_FMP_DEP_PUSH_GUID 0x00 +#define EFI_FMP_DEP_PUSH_VERSION 0x01 +#define EFI_FMP_DEP_VERSION_STR 0x02 +#define EFI_FMP_DEP_AND 0x03 +#define EFI_FMP_DEP_OR 0x04 +#define EFI_FMP_DEP_NOT 0x05 +#define EFI_FMP_DEP_TRUE 0x06 +#define EFI_FMP_DEP_FALSE 0x07 +#define EFI_FMP_DEP_EQ 0x08 +#define EFI_FMP_DEP_GT 0x09 +#define EFI_FMP_DEP_GTE 0x0A +#define EFI_FMP_DEP_LT 0x0B +#define EFI_FMP_DEP_LTE 0x0C +#define EFI_FMP_DEP_END 0x0D + +/// +/// Image Attribute - Dependency +/// +typedef struct { + UINT8 Dependencies[1]; +} EFI_FIRMWARE_IMAGE_DEP; + /// /// EFI_FIRMWARE_IMAGE_DESCRIPTOR /// typedef struct { /// @@ -109,10 +134,11 @@ typedef struct { /// instance a zero can be used. A zero means the FMP provider is not ab= le to determine a /// unique hardware instance number or a hardware instance number is not= needed. Only /// present in version 3 or higher. /// UINT64 HardwareInstance; + EFI_FIRMWARE_IMAGE_DEP *Dependencies; } EFI_FIRMWARE_IMAGE_DESCRIPTOR; =20 =20 // // Image Attribute Definitions @@ -141,10 +167,15 @@ typedef struct { #define IMAGE_ATTRIBUTE_IN_USE 0x0000000000000008 /// /// The attribute IMAGE_ATTRIBUTE_UEFI_IMAGE indicates that this image is = an EFI compatible image. /// #define IMAGE_ATTRIBUTE_UEFI_IMAGE 0x0000000000000010 +/// +/// The attribute IMAGE_ATTRIBUTE_DEPENDENCY indicates that there is an EF= I_FIRMWARE_IMAGE_DEP +/// section associated with the image. +/// +#define IMAGE_ATTRIBUTE_DEPENDENCY 0x0000000000000020 =20 =20 // // Image Compatibility Definitions // @@ -156,11 +187,11 @@ typedef struct { #define IMAGE_COMPATIBILITY_CHECK_SUPPORTED 0x0000000000000001 =20 /// /// Descriptor Version exposed by GetImageInfo() function /// -#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION 3 +#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION 4 =20 =20 /// /// Image Attribute - Authentication Required /// --=20 2.16.2.windows.1 -=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 (#53125): https://edk2.groups.io/g/devel/message/53125 Mute This Topic: https://groups.io/mt/69595649/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-