]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/AcpiCpuData.h: Remove AcpiNVS and Below 4G limitation.
authorEric Dong <eric.dong@intel.com>
Fri, 10 Aug 2018 02:28:50 +0000 (10:28 +0800)
committerEric Dong <eric.dong@intel.com>
Thu, 16 Aug 2018 00:42:00 +0000 (08:42 +0800)
ACPI_CPU_DATA structure first introduced to save data in
normal boot phase. Also this data will be used in S3 phase
by one PEI driver. So in first phase, this data is been
defined to use ACPI NVS memory type and must below 4G.

Later in order to fix potential security issue,
PiSmmCpuDxeSmm driver added logic to copy ACPI_CPU_DATA
(except ResetVector and Stack buffer) to  smram at smm
ready to lock point. ResetVector must below 1M and Stack
buffer is write only in S3 phase, so these two fields not
copy to smram. Also PiSmmCpuDxeSmm driver owned the task
to restore the CPU setting and it's a SMM driver.

After above change, the acpi nvs memory type and below 4G
limitation is no longer needed.

This change remove the limitation in the comments for
ACPI_CPU_DATA definition.

Cc: Marvin Häuser <Marvin.Haeuser@outlook.com>
Cc: Fan Jeff <vanjeff_919@hotmail.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
UefiCpuPkg/Include/AcpiCpuData.h

index ec092074cea52a09fbde16e066b3d2065dfc15e5..9e51145c084007703b37ddd8df4b2c4b2b042366 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Definitions for CPU S3 data.\r
 \r
-Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -57,15 +57,13 @@ typedef struct {
   //\r
   UINT32                    InitialApicId;\r
   //\r
-  // Physical address of CPU_REGISTER_TABLE_ENTRY structures.  This buffer must be\r
-  // allocated below 4GB from memory of type EfiACPIMemoryNVS.\r
+  // Physical address of CPU_REGISTER_TABLE_ENTRY structures.\r
   //\r
   EFI_PHYSICAL_ADDRESS      RegisterTableEntry;\r
 } CPU_REGISTER_TABLE;\r
 \r
 //\r
-// Data structure that is required for ACPI S3 resume.  This structure must be\r
-// allocated below 4GB from memory of type EfiACPIMemoryNVS.  The PCD\r
+// Data structure that is required for ACPI S3 resume. The PCD\r
 // PcdCpuS3DataAddress must be set to the physical address where this structure\r
 // is allocated\r
 //\r
@@ -78,21 +76,17 @@ typedef struct {
   //\r
   EFI_PHYSICAL_ADDRESS  StartupVector;\r
   //\r
-  // Physical address of structure of type IA32_DESCRIPTOR.  This structure must\r
-  // be allocated below 4GB from memory of type EfiACPIMemoryNVS.  The\r
+  // Physical address of structure of type IA32_DESCRIPTOR. The\r
   // IA32_DESCRIPTOR structure provides the base address and length of a GDT\r
-  // The buffer for GDT must also be allocated below 4GB from memory of type\r
-  // EfiACPIMemoryNVS.  The GDT must be filled in with the GDT contents that are\r
+  // The GDT must be filled in with the GDT contents that are\r
   // used during an ACPI S3 resume.  This is typically the contents of the GDT\r
   // used by the boot processor when the platform is booted.\r
   //\r
   EFI_PHYSICAL_ADDRESS  GdtrProfile;\r
   //\r
-  // Physical address of structure of type IA32_DESCRIPTOR.  This structure must\r
-  // be allocated below 4GB from memory of type EfiACPIMemoryNVS.  The\r
+  // Physical address of structure of type IA32_DESCRIPTOR.  The\r
   // IA32_DESCRIPTOR structure provides the base address and length of an IDT.\r
-  // The buffer for IDT must also be allocated below 4GB from memory of type\r
-  // EfiACPIMemoryNVS.  The IDT must be filled in with the IDT contents that are\r
+  // The IDT must be filled in with the IDT contents that are\r
   // used during an ACPI S3 resume.  This is typically the contents of the IDT\r
   // used by the boot processor when the platform is booted.\r
   //\r
@@ -100,7 +94,7 @@ typedef struct {
   //\r
   // Physical address of a buffer that is used as stacks during ACPI S3 resume.\r
   // The total size of this buffer, in bytes, is NumberOfCpus * StackSize.  This\r
-  // structure must be allocated below 4GB from memory of type EfiACPIMemoryNVS.\r
+  // structure must be allocated from memory of type EfiACPIMemoryNVS.\r
   //\r
   EFI_PHYSICAL_ADDRESS  StackAddress;\r
   //\r
@@ -118,14 +112,12 @@ typedef struct {
   // Physical address of structure of type MTRR_SETTINGS that contains a copy\r
   // of the MTRR settings that are compatible with the MTRR settings used by\r
   // the boot processor when the platform was booted.  These MTRR settings are\r
-  // used during an ACPI S3 resume.  This structure must be allocated below 4GB\r
-  // from memory of type EfiACPIMemoryNVS.\r
+  // used during an ACPI S3 resume.\r
   //\r
   EFI_PHYSICAL_ADDRESS  MtrrTable;\r
   //\r
   // Physical address of an array of CPU_REGISTER_TABLE structures, with\r
-  // NumberOfCpus entries.  This array must be allocated below 4GB from memory\r
-  // of type EfiACPIMemoryNVS.  If a register table is not required, then the\r
+  // NumberOfCpus entries.  If a register table is not required, then the\r
   // TableLength and AllocatedSize fields of CPU_REGISTER_TABLE are set to 0.\r
   // If TableLength is > 0, then elements of RegisterTableEntry are used to\r
   // initialize the CPU that matches InitialApicId, during an ACPI S3 resume,\r
@@ -134,8 +126,7 @@ typedef struct {
   EFI_PHYSICAL_ADDRESS  PreSmmInitRegisterTable;\r
   //\r
   // Physical address of an array of CPU_REGISTER_TABLE structures, with\r
-  // NumberOfCpus entries.  This array must be allocated below 4GB from memory\r
-  // of type EfiACPIMemoryNVS.  If a register table is not required, then the\r
+  // NumberOfCpus entries.  If a register table is not required, then the\r
   // TableLength and AllocatedSize fields of CPU_REGISTER_TABLE are set to 0.\r
   // If TableLength is > 0, then elements of RegisterTableEntry are used to\r
   // initialize the CPU that matches InitialApicId, during an ACPI S3 resume,\r
@@ -144,8 +135,7 @@ typedef struct {
   EFI_PHYSICAL_ADDRESS  RegisterTable;\r
   //\r
   // Physical address of a buffer that contains the machine check handler that\r
-  // is used during an ACPI S3 Resume.  This buffer must be allocated below 4GB\r
-  // from memory of type EfiACPIMemoryNVS.  In order for this machine check\r
+  // is used during an ACPI S3 Resume.  In order for this machine check\r
   // handler to be active on an AP during an ACPI S3 resume, the machine check\r
   // vector in the IDT provided by IdtrProfile must be initialized to transfer\r
   // control to this physical address.\r