From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Xu, Wei6" <wei6.xu@intel.com>
Cc: "Wang, Jian J" <jian.j.wang@intel.com>,
"Zhang, Chao B" <chao.b.zhang@intel.com>
Subject: Re: [edk2-devel][Patch v2 5/7] MdeModulePkg/CapsuleRuntimeDxe: Introduce PCD to control this feature.
Date: Wed, 12 Jun 2019 07:49:20 +0000 [thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A093C8EDBC8@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20190605154203.11012-6-wei6.xu@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Xu,
> Wei6
> Sent: Wednesday, June 05, 2019 11:42 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J; Wu, Hao A; Zhang, Chao B; Xu, Wei6
> Subject: [edk2-devel][Patch v2 5/7] MdeModulePkg/CapsuleRuntimeDxe:
> Introduce PCD to control this feature.
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1852
>
> Introduce PcdCapsuleInRamSupport to turn on/off Capsule In Ram feature.
> Platform could choose to drop CapsulePei/CapsuleX64 and not to support
> Capsule In Ram.
For this patch, it only affects UpdateCapsule(). Do we need to update the
behavior for QueryCapsuleCapabilities() as well?
Best Regards,
Hao Wu
>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Chao B Zhang <chao.b.zhang@intel.com>
> Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
> ---
> 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
>
> [Pcd]
> gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule ##
> SOMETIMES_CONSUMES
> gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizePopulateCapsule ##
> SOMETIMES_CONSUMES # Populate Image requires reset support.
> + gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleInRamSupport ##
> CONSUMES
>
> [Pcd.X64]
> gEfiMdeModulePkgTokenSpaceGuid.PcdCapsulePeiLongModeStackSize
> ## SOMETIMES_CONSUMES
> gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable ##
> SOMETIMES_CONSUMES
>
> diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
> b/MdeModulePkg/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 signify
> the capsule runtime services are ready.
>
> -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
> SPDX-License-Identifier: BSD-2-Clause-Patent
>
> **/
>
> #include "CapsuleService.h"
> @@ -69,10 +69,18 @@ UpdateCapsule (
> BOOLEAN NeedReset;
> BOOLEAN InitiateReset;
> CHAR16 CapsuleVarName[30];
> CHAR16 *TempVarName;
>
> + //
> + // Check if platform support Capsule In RAM or not.
> + // Platform could choose to drop CapsulePei/CapsuleX64 and do not
> support Capsule In RAM.
> + //
> + if (!PcdGetBool(PcdCapsuleInRamSupport)) {
> + return EFI_UNSUPPORTED;
> + }
> +
> //
> // Capsule Count can't be less than one.
> //
> if (CapsuleCount < 1) {
> return EFI_INVALID_PARAMETER;
> --
> 2.16.2.windows.1
>
>
>
next prev parent reply other threads:[~2019-06-12 7:49 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 15:41 [edk2-devel][Patch v2 0/7] Implement Capsule On Disk Xu, Wei6
2019-06-05 15:41 ` [edk2-devel][Patch v2 1/7] MdePkg: Add Pei Boot In CapsuleOnDisk Mode Ppi definition Xu, Wei6
2019-06-05 21:42 ` Felix Polyudov
2019-06-12 7:48 ` Wu, Hao A
2019-06-12 8:28 ` Liming Gao
2019-06-05 15:41 ` [edk2-devel][Patch v2 2/7] MdeModulePkg: Add Capsule On Disk related definition Xu, Wei6
2019-06-12 7:48 ` Wu, Hao A
2019-06-12 8:43 ` Xu, Wei6
2019-06-05 15:41 ` [edk2-devel][Patch v2 3/7] MdeModulePkg: Add CapsuleOnDiskLoadPei PEIM Xu, Wei6
2019-06-12 7:49 ` Wu, Hao A
2019-06-19 8:40 ` Xu, Wei6
2019-06-19 8:59 ` Ni, Ray
2019-06-20 0:59 ` Wu, Hao A
2019-06-05 15:42 ` [edk2-devel][Patch v2 4/7] MdeModulePkg/BdsDxe: Support Capsule On Disk Xu, Wei6
2019-06-05 15:42 ` [edk2-devel][Patch v2 5/7] MdeModulePkg/CapsuleRuntimeDxe: Introduce PCD to control this feature Xu, Wei6
2019-06-12 7:49 ` Wu, Hao A [this message]
2019-06-19 0:41 ` Zhang, Chao B
2019-06-19 0:59 ` Wu, Hao A
2019-06-19 1:13 ` Zhang, Chao B
2019-06-19 2:22 ` Wu, Hao A
2019-06-05 15:42 ` [edk2-devel][Patch v2 6/7] MdeModulePkg/DxeIpl: Support Capsule On Disk Xu, Wei6
2019-06-12 7:49 ` Wu, Hao A
2019-06-05 15:42 ` [edk2-devel][Patch v2 7/7] MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib Xu, Wei6
2019-06-12 7:49 ` Wu, Hao A
2019-06-19 7:55 ` Xu, Wei6
2019-06-19 8:16 ` Wu, Hao A
2019-06-19 8:19 ` Wu, Hao A
2019-06-19 8:23 ` Xu, Wei6
2019-06-05 21:53 ` [edk2-devel][Patch v2 0/7] Implement Capsule On Disk Felix Polyudov
2019-06-05 22:36 ` Michael D Kinney
2019-06-06 1:23 ` Zhang, Chao B
2019-06-12 7:47 ` Wu, Hao A
2019-06-12 8:13 ` Zhang, Chao B
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B80AF82E9BFB8E4FBD8C89DA810C6A093C8EDBC8@SHSMSX104.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox