From nobody Mon Feb 9 11:29:47 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+41526+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+41526+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1559063174; cv=none; d=zoho.com; s=zohoarc; b=UuXepAxMm+FGWK6+89HiTS30c/zsDyLGOyyRD3aViIIX16ra8i1Mg3jd7X4hlnCeVcjZS5xr/JwB1DycFHMRTtsADzFFafsboyEh6M6xFaq4Zbtt10+ff/64cOSxyBsovCXs/krXUMmxRHPjCTYls7WVo51oxZwnpoT6UztORZM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559063174; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=t7KNTqWILF8fEjjQRAcp47N8Jq7djUXxLoWWUdCK28I=; b=MCcG37mIRz9YwQBP7ENrKCIl7wruAZ0SSIY5J/5bs+hlcicnuxwkfAFl7IL/lZCgCH2lsI55V9R+K5YQePqwvKvJbc+qSYfKULxEjWhc2OxBDSelMDKJ7kK02Axp0vYQLe/wbCRYOPx1AS1msBXiEM4jVM7DmjfNj2cEkAI4O4A= 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+41526+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 1559063174645631.2722815969382; Tue, 28 May 2019 10:06:14 -0700 (PDT) Return-Path: X-Received: from mga11.intel.com (mga11.intel.com []) by groups.io with SMTP; Tue, 28 May 2019 10:06:14 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2019 10:06:13 -0700 X-ExtLoop1: 1 X-Received: from shwdeopenpsi174.ccr.corp.intel.com ([10.239.157.33]) by FMSMGA003.fm.intel.com with ESMTP; 28 May 2019 10:06:12 -0700 From: "Xu, Wei6" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Chao B Zhang , Wei6 Xu Subject: [edk2-devel][Patch 5/7] MdeModulePkg/CapsuleRuntimeDxe: Introduce PCD to control this feature. Date: Wed, 29 May 2019 01:05:44 +0800 Message-Id: <20190528170546.15876-6-wei6.xu@intel.com> In-Reply-To: <20190528170546.15876-1-wei6.xu@intel.com> References: <20190528170546.15876-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=1559063174; bh=IRjK/sJmW03GasydNzq4PPJxEcYS34jstgGmkwiqpr8=; h=Cc:Date:From:Reply-To:Subject:To; b=shr3W2qmFGaYXXyXtdos3xKbZdDARkFkVx8lhpvpzmYOy1t1m0+1Tiasr+dsT69rduk vDmn+ZI4YP0e00Iu5zCruYH47YiNDKFfuE7V9u5GFZvkT4XZ46Yo2RmX/94YZk9d0Tgno stvWwoXETeALKl7eNDOEQGgveJJ5ICL2+74= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1852 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 --- MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf | 1 + MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c | 10 ++++++= +++- 2 files changed, 10 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..53a1af44e2 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; --=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 (#41526): https://edk2.groups.io/g/devel/message/41526 Mute This Topic: https://groups.io/mt/31824155/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-