diff options
author | Michael Kinney <michael.d.kinney@intel.com> | 2015-12-24 00:14:00 +0000 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-02-25 09:46:23 +0800 |
commit | f478dac8a100526cafd82ffe8a3229d3b22a7836 (patch) | |
tree | 8245881f1b839e512bbff6cd384bf1faf769db24 | |
parent | 7233344929570e0d41e0774eb1216d2f9b5c6b19 (diff) | |
download | edk2-platforms-f478dac8a100526cafd82ffe8a3229d3b22a7836.tar.xz |
UefiCpuPkg/PiSmmCpuDxeSmm: Initialize gSmst fields on S3 resume
Update S3 resume path to initialize the fields of gSmst before
the gSmst fields are used to complete initialization in S3 resume.
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19504 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 6011381199b21e906bcb87a30f58ebe70b9b7154)
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c index 949dd4e5c1..36a0650b2f 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c @@ -1497,6 +1497,15 @@ PerformPreTasks ( //
if (mRestoreSmmConfigurationInS3) {
//
+ // Need make sure gSmst is correct because below function may use them.
+ //
+ gSmst->SmmStartupThisAp = gSmmCpuPrivate->SmmCoreEntryContext.SmmStartupThisAp;
+ gSmst->CurrentlyExecutingCpu = gSmmCpuPrivate->SmmCoreEntryContext.CurrentlyExecutingCpu;
+ gSmst->NumberOfCpus = gSmmCpuPrivate->SmmCoreEntryContext.NumberOfCpus;
+ gSmst->CpuSaveStateSize = gSmmCpuPrivate->SmmCoreEntryContext.CpuSaveStateSize;
+ gSmst->CpuSaveState = gSmmCpuPrivate->SmmCoreEntryContext.CpuSaveState;
+
+ //
// Configure SMM Code Access Check feature if available.
//
ConfigSmmCodeAccessCheck ();
|