From nobody Sun Feb 8 21:47:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+42783+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42783+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561445656; cv=none; d=zoho.com; s=zohoarc; b=a7sr1as+MxRPLY1Lb3zETUdT+oMJqGieGGxtOLih+nVmgi44+gWqxZS6PCCLV7We5926IzPuxA2g159/6GnUfz1V4pZfm9aH1grA/TFx/brOWgYD05Oe71Fu+kh69NqGuzu1vy2cc1aXyOm6swyBPbV21oDVaxZPO/7LV9bXT80= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561445656; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=DmPFUXt0LAx0PkFRiFon/5P/AOrGpEQVQSykA2xHTSw=; b=OVyQAJ8RxuOZa8G4q6/bm6hBf2WiVfiL5C/YCSGG2bvtOzotRau2akzuTOw2GTzeG094hfab0NfU8JPk8UjjT7LCS6vQZL95Rf9A8i2wOVtJpEL+u8vdHiaBoH2Elyj1agAkhHvTjTLOUPRPykbXlv0FqGKdkUAGAHKHsVhKglw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42783+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 1561445656039576.8609022244256; Mon, 24 Jun 2019 23:54:16 -0700 (PDT) Return-Path: X-Received: from mga02.intel.com (mga02.intel.com []) by groups.io with SMTP; Mon, 24 Jun 2019 23:54:14 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jun 2019 23:54:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,415,1557212400"; d="scan'208";a="336749679" X-Received: from shwdeopenpsi174.ccr.corp.intel.com ([10.239.157.39]) by orsmga005.jf.intel.com with ESMTP; 24 Jun 2019 23:54:12 -0700 From: "Xu, Wei6" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Chao B Zhang Subject: [edk2-devel][Patch 3/6] MdeModulePkg/CapsuleRuntimeDxe: Introduce PCD to control this feature. Date: Tue, 25 Jun 2019 14:53:59 +0800 Message-Id: <20190625065402.19296-4-wei6.xu@intel.com> In-Reply-To: <20190625065402.19296-1-wei6.xu@intel.com> References: <20190625065402.19296-1-wei6.xu@intel.com> 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561445654; bh=WFcIcsdE24SFpwfG4x8t0WcVZ45PvLWbyH2CMNdgAeg=; h=Cc:Date:From:Reply-To:Subject:To; b=LPfs3t16UQrAmTWR/l7qpfV8lUk91733w/GoO9u0PWf737abUk6HrniRgwVIZKdyiDP kDsnNU0ulXFVIi7unGnIxQ3s7wG5BBybWkDQbdnsCenCt3Uavn1sXnLFby8JKeLE6zKJF NSvfHVqr/Dx+JKRnk8gIrQptTdFPdvZ3n54= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" REF: https://github.com/tianocore/tianocore.github.io/wiki/ UEFI-Capsule-on-Disk-Introducation Introduce PcdCapsuleInRamSupport to turn on/off Capsule In Ram feature. Platform could choose to drop CapsulePei/CapsuleX64 and not to support Capsule In Ram. Cc: Jian J Wang Cc: Hao A Wu Cc: Chao B Zhang Signed-off-by: Wei6 Xu --- .../Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf | 1 + MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c | 12 ++++++++= +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf= b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf index 338577e293..9da450722b 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf @@ -88,10 +88,11 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUMES =20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule ## SOMETIM= ES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizePopulateCapsule ## SOMETIM= ES_CONSUMES # Populate Image requires reset support. + gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleInRamSupport ## CONSUMES =20 [Pcd.X64] gEfiMdeModulePkgTokenSpaceGuid.PcdCapsulePeiLongModeStackSize ## SOMET= IMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable ## SOMET= IMES_CONSUMES =20 diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c b/Md= eModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c index aaf819c4c6..77b8f00062 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c @@ -2,11 +2,11 @@ Capsule Runtime Driver produces two UEFI capsule runtime services. (UpdateCapsule, QueryCapsuleCapabilities) It installs the Capsule Architectural Protocol defined in PI1.0a to sign= ify the capsule runtime services are ready. =20 -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 #include "CapsuleService.h" @@ -69,10 +69,18 @@ UpdateCapsule ( BOOLEAN NeedReset; BOOLEAN InitiateReset; CHAR16 CapsuleVarName[30]; CHAR16 *TempVarName; =20 + // + // Check if platform support Capsule In RAM or not. + // Platform could choose to drop CapsulePei/CapsuleX64 and do not suppor= t Capsule In RAM. + // + if (!PcdGetBool(PcdCapsuleInRamSupport)) { + return EFI_UNSUPPORTED; + } + // // Capsule Count can't be less than one. // if (CapsuleCount < 1) { return EFI_INVALID_PARAMETER; @@ -216,10 +224,12 @@ UpdateCapsule ( return Status; } =20 /** Returns if the capsule can be supported via UpdateCapsule(). + Notice: When PcdCapsuleInRamSupport is unsupported, even this routine re= turns a valid answer, + the capsule still is unsupported via UpdateCapsule(). =20 @param CapsuleHeaderArray Virtual pointer to an array of virtual poi= nters to the capsules being passed into update capsule. @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in CaspuleHeaderArray. --=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 (#42783): https://edk2.groups.io/g/devel/message/42783 Mute This Topic: https://groups.io/mt/32201008/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-