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 <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>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
[Pcd]\r
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule ## SOMETIMES_CONSUMES\r
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizePopulateCapsule ## SOMETIMES_CONSUMES # Populate Image requires reset support.\r
[Pcd]\r
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule ## SOMETIMES_CONSUMES\r
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizePopulateCapsule ## SOMETIMES_CONSUMES # Populate Image requires reset support.\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleInRamSupport ## CONSUMES\r
\r
[Pcd.X64]\r
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsulePeiLongModeStackSize ## SOMETIMES_CONSUMES\r
\r
[Pcd.X64]\r
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsulePeiLongModeStackSize ## SOMETIMES_CONSUMES\r
It installs the Capsule Architectural Protocol defined in PI1.0a to signify\r
the capsule runtime services are ready.\r
\r
It installs the Capsule Architectural Protocol defined in PI1.0a to signify\r
the capsule runtime services are ready.\r
\r
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
CHAR16 CapsuleVarName[30];\r
CHAR16 *TempVarName;\r
\r
CHAR16 CapsuleVarName[30];\r
CHAR16 *TempVarName;\r
\r
+ //\r
+ // Check if platform support Capsule In RAM or not.\r
+ // Platform could choose to drop CapsulePei/CapsuleX64 and do not support Capsule In RAM.\r
+ //\r
+ if (!PcdGetBool(PcdCapsuleInRamSupport)) {\r
+ return EFI_UNSUPPORTED;\r
+ }\r
+\r
//\r
// Capsule Count can't be less than one.\r
//\r
//\r
// Capsule Count can't be less than one.\r
//\r
\r
/**\r
Returns if the capsule can be supported via UpdateCapsule().\r
\r
/**\r
Returns if the capsule can be supported via UpdateCapsule().\r
+ Notice: When PcdCapsuleInRamSupport is unsupported, even this routine returns a valid answer,\r
+ the capsule still is unsupported via UpdateCapsule().\r
\r
@param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules\r
being passed into update capsule.\r
\r
@param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules\r
being passed into update capsule.\r