]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Move RestoreSmmConfigurationInS3 function to PerformPreTasks().
authorYao, Jiewen <jiewen.yao@intel.com>
Wed, 25 Nov 2015 04:28:46 +0000 (04:28 +0000)
committerjyao1 <jyao1@Edk2>
Wed, 25 Nov 2015 04:28:46 +0000 (04:28 +0000)
In this way, we can centralize the silicon configuration in
PerformRemainingTasks()/PerformPreTasks() function.
If there are more features need to be configured, they can put in
PerformRemainingTasks()/PerformPreTasks() only.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Kinney, Michael D" <michael.d.kinney@intel.com>
Reviewed-by: "Laszlo Ersek" <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18938 6f19259b-4bc3-4df7-8a09-765794883524

UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h

index 80378a3faf4262601a69826337b4297865934834..3e8b0936aa8415aa1f980a77ccbd399eaff6dd78 100644 (file)
@@ -412,15 +412,9 @@ BSPHandler (
   AcquireSpinLockOrFail (&mSmmMpSyncData->CpuData[CpuIndex].Busy);\r
 \r
   //\r
-  // Restore SMM Configuration in S3 boot path.\r
+  // Perform the pre tasks\r
   //\r
-  if (mRestoreSmmConfigurationInS3) {\r
-    //\r
-    // Configure SMM Code Access Check feature if available.\r
-    //\r
-    ConfigSmmCodeAccessCheck ();\r
-    mRestoreSmmConfigurationInS3 = FALSE;\r
-  }\r
+  PerformPreTasks ();\r
 \r
   //\r
   // Invoke SMM Foundation EntryPoint with the processor information context.\r
index 532ac0974b7de7d48e6f3c9d8dcb8b106d28404f..2489848c794f807d3a137271a0eeaf38d145ff89 100644 (file)
@@ -1437,3 +1437,25 @@ PerformRemainingTasks (
     mSmmReadyToLock = FALSE;\r
   }\r
 }\r
+\r
+/**\r
+  Perform the pre tasks.\r
+\r
+**/\r
+VOID\r
+PerformPreTasks (\r
+  VOID\r
+  )\r
+{\r
+  //\r
+  // Restore SMM Configuration in S3 boot path.\r
+  //\r
+  if (mRestoreSmmConfigurationInS3) {\r
+    //\r
+    // Configure SMM Code Access Check feature if available.\r
+    //\r
+    ConfigSmmCodeAccessCheck ();\r
+\r
+    mRestoreSmmConfigurationInS3 = FALSE;\r
+  }\r
+}\r
index 106e67465c0a4c7112fecc8a962c7a538fafaaa8..66d85d80e1266bb8de1ae39570e8ba663955cbcf 100644 (file)
@@ -586,6 +586,15 @@ PerformRemainingTasks (
   VOID\r
   );\r
 \r
+/**\r
+  Perform the pre tasks.\r
+\r
+**/\r
+VOID\r
+PerformPreTasks (\r
+  VOID\r
+  );\r
+\r
 /**\r
   Initialize MSR spin lock by MSR index.\r
 \r