Revision: 18850
http://sourceforge.net/p/edk2/code/18850
Author: vanjeff
Date: 2015-11-17 05:14:39 +0000 (Tue, 17 Nov 2015)
Log Message:
-----------
UefiCpuPkg: PiSmmCpuDxeSmm: Remove Framework compatibility
The PiSmmCpuDxeSmm module is using PcdFrameworkCompatibilitySupport to
provide compatibility with the SMM support in the IntelFrameworkPkg.
This change removes the Framework compatibility and requires all SMM
modules that provide SMI handlers to follow the PI Specification.
(Sync patch r18726 from main trunk.)
Cc: Jeff Fan <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <[email protected]>
Reviewed-by: Jeff Fan <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/18726
Modified Paths:
--------------
branches/UDK2015/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
branches/UDK2015/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
branches/UDK2015/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
Modified: branches/UDK2015/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
===================================================================
--- branches/UDK2015/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c 2015-11-17
05:13:43 UTC (rev 18849)
+++ branches/UDK2015/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c 2015-11-17
05:14:39 UTC (rev 18850)
@@ -76,13 +76,6 @@
EFI_CPU_INTERRUPT_HANDLER mExternalVectorTable[EXCEPTION_VECTOR_NUMBER];
-///
-/// SMM CPU Save State Protocol instance
-///
-EFI_SMM_CPU_SAVE_STATE_PROTOCOL mSmmCpuSaveState = {
- NULL
-};
-
//
// SMM stack information
//
@@ -530,18 +523,13 @@
}
//
- // Do below CPU things for native platform only
+ // Skip initialization if mAcpiCpuData is not valid
//
- if (!FeaturePcdGet(PcdFrameworkCompatibilitySupport)) {
+ if (mAcpiCpuData.NumberOfCpus > 0) {
//
- // Skip initialization if mAcpiCpuData is not valid
+ // First time microcode load and restore MTRRs
//
- if (mAcpiCpuData.NumberOfCpus > 0) {
- //
- // First time microcode load and restore MTRRs
- //
- EarlyInitializeCpu ();
- }
+ EarlyInitializeCpu ();
}
//
@@ -550,18 +538,13 @@
SmmRelocateBases ();
//
- // Do below CPU things for native platform only
+ // Skip initialization if mAcpiCpuData is not valid
//
- if (!FeaturePcdGet(PcdFrameworkCompatibilitySupport)) {
+ if (mAcpiCpuData.NumberOfCpus > 0) {
//
- // Skip initialization if mAcpiCpuData is not valid
+ // Restore MSRs for BSP and all APs
//
- if (mAcpiCpuData.NumberOfCpus > 0) {
- //
- // Restore MSRs for BSP and all APs
- //
- InitializeCpu ();
- }
+ InitializeCpu ();
}
//
@@ -687,13 +670,6 @@
mAcpiCpuData.NumberOfCpus = 0;
//
- // If FrameworkCompatibilitySspport is enabled, then do not copy CPU S3 Data
into SMRAM
- //
- if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {
- goto Done;
- }
-
- //
// If PcdCpuS3DataAddress was never set, then do not copy CPU S3 Data into
SMRAM
//
AcpiCpuData = (ACPI_CPU_DATA *)(UINTN)PcdGet64 (PcdCpuS3DataAddress);
@@ -1009,7 +985,6 @@
mSmmCpuPrivateData.SmmCoreEntryContext.CpuSaveStateSize =
gSmmCpuPrivate->CpuSaveStateSize;
mSmmCpuPrivateData.SmmCoreEntryContext.CpuSaveState =
gSmmCpuPrivate->CpuSaveState;
- mSmmCpuSaveState.CpuSaveState = (EFI_SMM_CPU_STATE
**)gSmmCpuPrivate->CpuSaveState;
//
// Allocate buffer for pointers to array in CPU_HOT_PLUG_DATA.
@@ -1150,25 +1125,6 @@
Status = InitializeSmmCpuServices (mSmmCpuHandle);
ASSERT_EFI_ERROR (Status);
- if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {
- //
- // Install Framework SMM Save State Protocol into UEFI protocol database
for backward compatibility
- //
- Status = SystemTable->BootServices->InstallMultipleProtocolInterfaces (
- &gSmmCpuPrivate->SmmCpuHandle,
- &gEfiSmmCpuSaveStateProtocolGuid,
- &mSmmCpuSaveState,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
- //
- // The SmmStartupThisAp service in Framework SMST should always be
non-null.
- // Update SmmStartupThisAp pointer in PI SMST here so that PI/Framework
SMM thunk
- // can have it ready when constructing Framework SMST.
- //
- gSmst->SmmStartupThisAp = SmmStartupThisAp;
- }
-
//
// register SMM Ready To Lock Protocol notification
//
Modified: branches/UDK2015/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
===================================================================
--- branches/UDK2015/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h 2015-11-17
05:13:43 UTC (rev 18849)
+++ branches/UDK2015/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h 2015-11-17
05:14:39 UTC (rev 18850)
@@ -21,7 +21,6 @@
#include <Protocol/SmmConfiguration.h>
#include <Protocol/SmmCpu.h>
#include <Protocol/SmmAccess2.h>
-#include <Protocol/SmmCpuSaveState.h>
#include <Protocol/SmmReadyToLock.h>
#include <Protocol/SmmCpuService.h>
Modified: branches/UDK2015/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
===================================================================
--- branches/UDK2015/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
2015-11-17 05:13:43 UTC (rev 18849)
+++ branches/UDK2015/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
2015-11-17 05:14:39 UTC (rev 18850)
@@ -89,7 +89,6 @@
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
UefiCpuPkg/UefiCpuPkg.dec
- IntelFrameworkPkg/IntelFrameworkPkg.dec
[LibraryClasses]
UefiDriverEntryPoint
@@ -126,7 +125,6 @@
gEfiSmmCpuProtocolGuid ## PRODUCES
gEfiSmmReadyToLockProtocolGuid ## NOTIFY
gEfiSmmCpuServiceProtocolGuid ## PRODUCES
- gEfiSmmCpuSaveStateProtocolGuid ## SOMETIMES_PRODUCES
[Guids]
gEfiAcpiVariableGuid ## SOMETIMES_CONSUMES ## HOB # it
is used for S3 boot.
@@ -135,7 +133,6 @@
gEfiAcpi10TableGuid ## SOMETIMES_CONSUMES ## SystemTable
[FeaturePcd]
- gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport ## CONSUMES
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmDebug ## CONSUMES
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmBlockStartupThisAp ## CONSUMES
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection ## CONSUMES
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits