MdeModulePkg/AcpiTableDxe: PCD switch to avoid using ACPI reclaim memory

UEFI spec defined ACPI Tables at boot time can be contained in memory of
type EfiACPIReclaimMemory or EfiAcpiMemoryNVS, although InstallAcpiTable
with AcpiTableProtocol will only allocate memory with type
EfiACPIReclaimMemory (Except FACS).

This patch provides an optional method controlled by PCD to avoid using
EfiACPIReclaimMemory, by setting the PCD PcdNoACPIReclaimMemory to TRUE,
all ACPI allocated memory will use EfiAcpiMemoryNVS instead.

Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Liu Yun <yun.y.liu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Aaron Li <aaron.li@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>
This commit is contained in:
Aaron Li
2024-03-26 15:57:33 +08:00
committed by mergify[bot]
parent b7f8779fe1
commit 932db9df0c
4 changed files with 45 additions and 8 deletions

View File

@@ -1533,6 +1533,13 @@
# @Prompt Exposed ACPI table versions.
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x3E|UINT32|0x0001004c
## Indicates whether ACPI Reclaim memory is not available
# Default is FALSE that means ACPI Reclaim memory is available
# If it is set to TRUE that means ACPI Reclaim memory is not available
# For example ACPI Table protocol will use ACPI NVS memory instead of ACPI Reclaim memory
# @Prompt ACPI Reclaim memory is not available.
gEfiMdeModulePkgTokenSpaceGuid.PcdNoACPIReclaimMemory|FALSE|BOOLEAN|0x0001008b
## This PCD defines the MAX repair count.
# The default value is 0 that means infinite.
# @Prompt MAX repair count