Save MTRR by lockbox in CpuS3DataDxe. In S3 boot, The MTRR setting will be restored in S3Resume.c in following patches. Then S3Resume.c will wakeup all APs to load the MTRR setting. This can avoid waking up APs in CpuS3.c. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
67 lines
2.1 KiB
INI
67 lines
2.1 KiB
INI
## @file
|
|
# ACPI CPU Data initialization module
|
|
#
|
|
# This module initializes the ACPI_CPU_DATA structure and registers the address
|
|
# of this structure in the PcdCpuS3DataAddress PCD. This is a generic/simple
|
|
# version of this module. It does not provide a machine check handler or CPU
|
|
# register initialization tables for ACPI S3 resume. It also only supports the
|
|
# number of CPUs reported by the MP Services Protocol, so this module does not
|
|
# support hot plug CPUs. This module can be copied into a CPU specific package
|
|
# and customized if these additional features are required.
|
|
#
|
|
# Copyright (c) 2013-2024, Intel Corporation. All rights reserved.<BR>
|
|
# Copyright (c) 2015-2020, Red Hat, Inc.
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 1.29
|
|
BASE_NAME = CpuS3DataDxe
|
|
FILE_GUID = 229B7EFD-DA02-46B9-93F4-E20C009F94E9
|
|
MODULE_TYPE = DXE_DRIVER
|
|
VERSION_STRING = 1.0
|
|
ENTRY_POINT = CpuS3DataInitialize
|
|
|
|
# The following information is for reference only and not required by the build
|
|
# tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64
|
|
|
|
[Sources]
|
|
CpuS3Data.c
|
|
|
|
[Packages]
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
MdePkg/MdePkg.dec
|
|
OvmfPkg/OvmfPkg.dec
|
|
UefiCpuPkg/UefiCpuPkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseLib
|
|
BaseMemoryLib
|
|
DebugLib
|
|
MemoryAllocationLib
|
|
MtrrLib
|
|
UefiBootServicesTableLib
|
|
UefiDriverEntryPoint
|
|
LockBoxLib
|
|
|
|
[Guids]
|
|
gEfiEndOfDxeEventGroupGuid ## CONSUMES ## Event
|
|
gEdkiiS3MtrrSettingGuid
|
|
|
|
[Protocols]
|
|
gEfiMpServiceProtocolGuid ## CONSUMES
|
|
|
|
[Pcd]
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable ## CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuApStackSize ## CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber ## CONSUMES
|
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuS3DataAddress ## PRODUCES
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase ## CONSUMES
|
|
|
|
[Depex]
|
|
gEfiMpServiceProtocolGuid
|