]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/SmmCpuFeaturesLib: Move multi-instance function decl to header
authorMichael Kubacki <michael.kubacki@microsoft.com>
Wed, 17 Feb 2021 21:32:23 +0000 (13:32 -0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 8 Mar 2021 18:07:32 +0000 (18:07 +0000)
FinishSmmCpuFeaturesInitializeProcessor() is a multi-instance
internal library function that is currently not declared in a
header file but embedded in "SmmCpuFeaturesLib.c".

This change cleans up the declaration moving it to a new header
file "CpuFeaturesLib.h" and removing the local declaration in
"SmmCpuFeaturesLib.c".

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210217213227.1277-2-mikuback@linux.microsoft.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
[lersek@redhat.com: replace the guard macro "_CPU_FEATURES_LIB_H_" with
 "CPU_FEATURES_LIB_H_", for fixing ECC 8003, per commit 6ffbb3581ab7]

UefiCpuPkg/Library/SmmCpuFeaturesLib/CpuFeaturesLib.h [new file with mode: 0644]
UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c
UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibNoStm.c
UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf
UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c

diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/CpuFeaturesLib.h b/UefiCpuPkg/Library/SmmCpuFeaturesLib/CpuFeaturesLib.h
new file mode 100644 (file)
index 0000000..106e070
--- /dev/null
@@ -0,0 +1,22 @@
+/** @file\r
+  Internal library function definitions.\r
+\r
+  Copyright (c) Microsoft Corporation.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef CPU_FEATURES_LIB_H_\r
+#define CPU_FEATURES_LIB_H_\r
+\r
+/**\r
+  Internal worker function that is called to complete CPU initialization at the\r
+  end of SmmCpuFeaturesInitializeProcessor().\r
+\r
+**/\r
+VOID\r
+FinishSmmCpuFeaturesInitializeProcessor (\r
+  VOID\r
+  );\r
+\r
+#endif\r
index 8fed18cf0e171bca6e12bb857b14bf88d048ee8e..75bde752785a7127ed5b5c38bd1cbd73219d883a 100644 (file)
@@ -15,6 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/DebugLib.h>\r
 #include <Register/Intel/Cpuid.h>\r
 #include <Register/Intel/SmramSaveStateMap.h>\r
+#include "CpuFeaturesLib.h"\r
 \r
 //\r
 // Machine Specific Registers (MSRs)\r
@@ -35,16 +36,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define SMM_FEATURES_LIB_IA32_MCA_CAP              0x17D\r
 #define   SMM_CODE_ACCESS_CHK_BIT                  BIT58\r
 \r
-/**\r
-  Internal worker function that is called to complete CPU initialization at the\r
-  end of SmmCpuFeaturesInitializeProcessor().\r
-\r
-**/\r
-VOID\r
-FinishSmmCpuFeaturesInitializeProcessor (\r
-  VOID\r
-  );\r
-\r
 //\r
 // Set default value to assume SMRR is not supported\r
 //\r
index dd828baf69cb1bd53b82ea2157fbcd9473f7227e..a6d8467d26aa555c8a4d18d394022452907ab157 100644 (file)
@@ -17,6 +17,7 @@
   CONSTRUCTOR                    = SmmCpuFeaturesLibConstructor\r
 \r
 [Sources]\r
+  CpuFeaturesLib.h\r
   SmmCpuFeaturesLib.c\r
   SmmCpuFeaturesLibNoStm.c\r
 \r
index 3e63c5e27f98db97d14bd2445057e1665ae528be..c562582ccee067ea3e4cadc442c03dc800d72dda 100644 (file)
@@ -9,6 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 #include <PiSmm.h>\r
 #include <Library/SmmCpuFeaturesLib.h>\r
+#include "CpuFeaturesLib.h"\r
 \r
 /**\r
   Internal worker function that is called to complete CPU initialization at the\r
index 50b9cc871302c9b325ac88db4a9e2c2bb9e1928d..89cd252ef44eda51bf4e5de5ef1c345a949626fe 100644 (file)
@@ -18,6 +18,7 @@
   CONSTRUCTOR                    = SmmCpuFeaturesLibStmConstructor\r
 \r
 [Sources]\r
+  CpuFeaturesLib.h\r
   SmmCpuFeaturesLib.c\r
   SmmStm.c\r
   SmmStm.h\r
index f7f8afacffb50724cf37825c76fee3b734c93429..b5aad41fdb6474ab69f5e1b9b5133fb0de120a12 100644 (file)
@@ -21,6 +21,7 @@
 \r
 #include <Protocol/MpService.h>\r
 \r
+#include "CpuFeaturesLib.h"\r
 #include "SmmStm.h"\r
 \r
 #define TXT_EVTYPE_BASE                  0x400\r