CpuS3DataDxe allocates the "RegisterTable" and "PreSmmInitRegisterTable" arrays in ACPI_CPU_DATA just so every processor in the system can have its own empty register table, matched by APIC ID. This has never been useful in practice. Given commite992cc3f48("UefiCpuPkg PiSmmCpuDxeSmm: Reduce SMRAM consumption in CpuS3.c", 2021-01-11), simply leave both "AcpiCpuData->RegisterTable" and "AcpiCpuData->PreSmmInitRegisterTable" initialized to the zero address. This simplifies the driver, and saves both normal RAM (boot services data type memory) and -- in PiSmmCpuDxeSmm -- SMRAM. (This simplification backs out a good chunk of commit1158fc8e2c("OvmfPkg/CpuS3DataDxe: enable S3 resume after CPU hotplug", 2020-03-04). But CpuS3DataDxe still differs between UefiCpuPkg and OvmfPkg, due to the latter supporting CPU hotplug; thus, we can't remove OvmfPkg/CpuS3DataDxe altogether.) Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3159 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Message-Id: <20210119155440.2262-5-lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
		
			
				
	
	
		
			65 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			INI
		
	
	
	
	
	
			
		
		
	
	
			65 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-2016, 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
 | 
						|
 | 
						|
[Guids]
 | 
						|
  gEfiEndOfDxeEventGroupGuid         ## CONSUMES   ## Event
 | 
						|
 | 
						|
[Protocols]
 | 
						|
  gEfiMpServiceProtocolGuid          ## CONSUMES
 | 
						|
 | 
						|
[Pcd]
 | 
						|
  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable                    ## CONSUMES
 | 
						|
  gUefiCpuPkgTokenSpaceGuid.PcdCpuApStackSize                       ## CONSUMES
 | 
						|
  gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber         ## CONSUMES
 | 
						|
  gUefiCpuPkgTokenSpaceGuid.PcdCpuS3DataAddress                     ## PRODUCES
 | 
						|
  gUefiOvmfPkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase             ## CONSUMES
 | 
						|
 | 
						|
[Depex]
 | 
						|
  gEfiMpServiceProtocolGuid
 |