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]
--- /dev/null
+/** @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
#include <Library/DebugLib.h>\r
#include <Register/Intel/Cpuid.h>\r
#include <Register/Intel/SmramSaveStateMap.h>\r
#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
\r
//\r
// Machine Specific Registers (MSRs)\r
#define SMM_FEATURES_LIB_IA32_MCA_CAP 0x17D\r
#define SMM_CODE_ACCESS_CHK_BIT BIT58\r
\r
#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
//\r
// Set default value to assume SMRR is not supported\r
//\r
CONSTRUCTOR = SmmCpuFeaturesLibConstructor\r
\r
[Sources]\r
CONSTRUCTOR = SmmCpuFeaturesLibConstructor\r
\r
[Sources]\r
SmmCpuFeaturesLib.c\r
SmmCpuFeaturesLibNoStm.c\r
\r
SmmCpuFeaturesLib.c\r
SmmCpuFeaturesLibNoStm.c\r
\r
\r
#include <PiSmm.h>\r
#include <Library/SmmCpuFeaturesLib.h>\r
\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
\r
/**\r
Internal worker function that is called to complete CPU initialization at the\r
CONSTRUCTOR = SmmCpuFeaturesLibStmConstructor\r
\r
[Sources]\r
CONSTRUCTOR = SmmCpuFeaturesLibStmConstructor\r
\r
[Sources]\r
SmmCpuFeaturesLib.c\r
SmmStm.c\r
SmmStm.h\r
SmmCpuFeaturesLib.c\r
SmmStm.c\r
SmmStm.h\r
\r
#include <Protocol/MpService.h>\r
\r
\r
#include <Protocol/MpService.h>\r
\r
+#include "CpuFeaturesLib.h"\r
#include "SmmStm.h"\r
\r
#define TXT_EVTYPE_BASE 0x400\r
#include "SmmStm.h"\r
\r
#define TXT_EVTYPE_BASE 0x400\r