]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg: Remove PcdFrameworkCompatibilitySupport usage
authorDandan Bi <dandan.bi@intel.com>
Sun, 28 Apr 2019 13:42:33 +0000 (21:42 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 9 May 2019 01:42:55 +0000 (09:42 +0800)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464

Currently Framework compatibility support is not needed and
PcdFrameworkCompatibilitySupport will be removed from edk2.
So remove the usage of this PCD firstly.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf

index 77c3fb6bdcdd93e2142dbc96c33eedd2e8a680bd..83ce1c4037d1b72dc1d6bb2ea65adf709724f658 100644 (file)
@@ -743,8 +743,6 @@ S3ResumeExecuteBootScript (
   PEI_SMM_ACCESS_PPI         *SmmAccess;\r
   UINTN                      Index;\r
   VOID                       *GuidHob;\r
-  IA32_DESCRIPTOR            *IdtDescriptor;\r
-  VOID                       *IdtBuffer;\r
   PEI_S3_RESUME_STATE        *PeiS3ResumeState;\r
   BOOLEAN                    InterruptStatus;\r
 \r
@@ -804,34 +802,6 @@ S3ResumeExecuteBootScript (
     AsmWriteCr3 ((UINTN)AcpiS3Context->S3NvsPageTableAddress);\r
   }\r
 \r
-  if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {\r
-    //\r
-    // On some platform, such as ECP, a dispatch node in boot script table may execute a 32-bit PEIM which may need PeiServices\r
-    // pointer. So PeiServices need preserve in (IDTBase- sizeof (UINTN)).\r
-    //\r
-    IdtDescriptor = (IA32_DESCRIPTOR *) (UINTN) (AcpiS3Context->IdtrProfile);\r
-    //\r
-    // Make sure the newly allocated IDT align with 16-bytes\r
-    //\r
-    IdtBuffer = AllocatePages (EFI_SIZE_TO_PAGES((IdtDescriptor->Limit + 1) + 16));\r
-    if (IdtBuffer == NULL) {\r
-      REPORT_STATUS_CODE (\r
-        EFI_ERROR_CODE | EFI_ERROR_MAJOR,\r
-        (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_RESUME_FAILED)\r
-        );\r
-      ASSERT (FALSE);\r
-    }\r
-    //\r
-    // Additional 16 bytes allocated to save IA32 IDT descriptor and Pei Service Table Pointer\r
-    // IA32 IDT descriptor will be used to setup IA32 IDT table for 32-bit Framework Boot Script code\r
-    //\r
-    ZeroMem (IdtBuffer, 16);\r
-    AsmReadIdtr ((IA32_DESCRIPTOR *)IdtBuffer);\r
-    CopyMem ((VOID*)((UINT8*)IdtBuffer + 16),(VOID*)(IdtDescriptor->Base), (IdtDescriptor->Limit + 1));\r
-    IdtDescriptor->Base = (UINTN)((UINT8*)IdtBuffer + 16);\r
-    *(UINTN*)(IdtDescriptor->Base - sizeof(UINTN)) = (UINTN)GetPeiServicesTablePointer ();\r
-  }\r
-\r
   InterruptStatus = SaveAndDisableInterrupts ();\r
   //\r
   // Need to make sure the GDT is loaded with values that support long mode and real mode.\r
index d694a986919674f3194af1e2ff479102f29e2ebc..aae984d138baceacde54ccbe8069dbd9481bcacf 100644 (file)
@@ -5,7 +5,7 @@
 # This module will excute the boot script saved during last boot and after that,\r
 # control is passed to OS waking up handler.\r
 #\r
-# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>\r
 # Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
 #\r
 # SPDX-License-Identifier: BSD-2-Clause-Patent\r
@@ -89,7 +89,6 @@
 \r
 [FeaturePcd]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode         ## CONSUMES\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport  ## CONSUMES\r
 \r
 [Pcd]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable  ## SOMETIMES_CONSUMES\r