[edk2-devel] [PATCH 0/3] UefiCpuPkg, OvmfPkg: do not allocate useless register tables for S3 resume

Laszlo Ersek posted 3 patches 5 days, 19 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/edk2 tags/patchew/20210112191934.12459-1-lersek@redhat.com
OvmfPkg/CpuS3DataDxe/CpuS3Data.c      | 70 +-------------------
OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf |  1 -
UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c   | 32 ---------
UefiCpuPkg/Include/AcpiCpuData.h      |  4 ++
4 files changed, 5 insertions(+), 102 deletions(-)

[edk2-devel] [PATCH 0/3] UefiCpuPkg, OvmfPkg: do not allocate useless register tables for S3 resume

Posted by Laszlo Ersek 5 days, 19 hours ago
Ref:    https://bugzilla.tianocore.org/show_bug.cgi?id=3159
Repo:   https://pagure.io/lersek/edk2.git
Branch: remove-cpu-reg-table-alloc-3159

OvmfPkg/CpuS3DataDxe and UefiCpuPkg/CpuS3DataDxe allocate 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, at S3 resume. This has never been useful.

Given recent commit e992cc3f4859 ("UefiCpuPkg PiSmmCpuDxeSmm: Reduce
SMRAM consumption in CpuS3.c", 2021-01-11), i.e., the NULL-check in the
IsRegisterTableEmpty() function, we should now set both RegisterTable
and PreSmmInitRegisterTable in ACPI_CPU_DATA to NULL, in the
CpuS3DataDxe drivers. That will simplify the drivers, save some normal
RAM in them, and accordingly, save some SMRAM in PiSmmCpuDxeSmm too.

The first patch in the series also updates the documentation of
ACPI_CPU_DATA (which, arguably, should have been done in commit
e992cc3f4859).

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>

Thanks
Laszlo

Laszlo Ersek (3):
  UefiCpuPkg/AcpiCpuData: update comments on register table fields
  UefiCpuPkg/CpuS3DataDxe: do not allocate useless register tables
  OvmfPkg/CpuS3DataDxe: do not allocate useless register tables

 OvmfPkg/CpuS3DataDxe/CpuS3Data.c      | 70 +-------------------
 OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf |  1 -
 UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c   | 32 ---------
 UefiCpuPkg/Include/AcpiCpuData.h      |  4 ++
 4 files changed, 5 insertions(+), 102 deletions(-)


base-commit: ebfe2d3eb5ac7fd92d74011edb31303a181920c7
-- 
2.19.1.3.g30247aa5d201



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#70167): https://edk2.groups.io/g/devel/message/70167
Mute This Topic: https://groups.io/mt/79632017/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-