From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web08.576.1613597595772400085 for ; Wed, 17 Feb 2021 13:33:15 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=A54vsHF1; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [131.107.174.202]) by linux.microsoft.com (Postfix) with ESMTPSA id EBA8C20B57A0; Wed, 17 Feb 2021 13:33:14 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EBA8C20B57A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1613597595; bh=xo6e1j4oR4w0f43sop/1qm/DR7edaYBxJDSn9zPkG5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A54vsHF13veV/cW3RdbguJO2/RG5+4iaZJ5Ks0LnwvO3Cmoulph6gH8c6s6MUW2ir oEGRmHrFWXj+32zXzrva7hbrrGmDxW+ESZltyhfCc02G3s8YN1WChGRFl6/Ch5B3KW Q0VhHh30WMoCzRwDsOdhol7w9+KoBBQ8tQ/gW2Vw= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Laszlo Ersek , Rahul Kumar Subject: [PATCH v3 1/5] UefiCpuPkg/SmmCpuFeaturesLib: Move multi-instance function decl to header Date: Wed, 17 Feb 2021 13:32:23 -0800 Message-Id: <20210217213227.1277-2-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20210217213227.1277-1-mikuback@linux.microsoft.com> References: <20210217213227.1277-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki 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 Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Signed-off-by: Michael Kubacki Reviewed-by: Laszlo Ersek --- UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 11 +----= ----- UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibNoStm.c | 1 + UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c | 1 + UefiCpuPkg/Library/SmmCpuFeaturesLib/CpuFeaturesLib.h | 22 +++++= +++++++++++++++ UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf | 1 + UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf | 1 + 6 files changed, 27 insertions(+), 10 deletions(-) diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c b/U= efiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c index 8fed18cf0e17..75bde752785a 100644 --- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c @@ -15,6 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include +#include "CpuFeaturesLib.h" =20 // // Machine Specific Registers (MSRs) @@ -35,16 +36,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define SMM_FEATURES_LIB_IA32_MCA_CAP 0x17D #define SMM_CODE_ACCESS_CHK_BIT BIT58 =20 -/** - Internal worker function that is called to complete CPU initialization= at the - end of SmmCpuFeaturesInitializeProcessor(). - -**/ -VOID -FinishSmmCpuFeaturesInitializeProcessor ( - VOID - ); - // // Set default value to assume SMRR is not supported // diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibNoStm.= c b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibNoStm.c index 3e63c5e27f98..c562582ccee0 100644 --- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibNoStm.c +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibNoStm.c @@ -9,6 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 #include #include +#include "CpuFeaturesLib.h" =20 /** Internal worker function that is called to complete CPU initialization= at the diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c b/UefiCpuPkg/L= ibrary/SmmCpuFeaturesLib/SmmStm.c index f7f8afacffb5..b5aad41fdb64 100644 --- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c @@ -21,6 +21,7 @@ =20 #include =20 +#include "CpuFeaturesLib.h" #include "SmmStm.h" =20 #define TXT_EVTYPE_BASE 0x400 diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/CpuFeaturesLib.h b/Uefi= CpuPkg/Library/SmmCpuFeaturesLib/CpuFeaturesLib.h new file mode 100644 index 000000000000..4645bbb066c9 --- /dev/null +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/CpuFeaturesLib.h @@ -0,0 +1,22 @@ +/** @file + Internal library function definitions. + + Copyright (c) Microsoft Corporation. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _CPU_FEATURES_LIB_H_ +#define _CPU_FEATURES_LIB_H_ + +/** + Internal worker function that is called to complete CPU initialization= at the + end of SmmCpuFeaturesInitializeProcessor(). + +**/ +VOID +FinishSmmCpuFeaturesInitializeProcessor ( + VOID + ); + +#endif diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf b= /UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf index dd828baf69cb..a6d8467d26aa 100644 --- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf @@ -17,6 +17,7 @@ [Defines] CONSTRUCTOR =3D SmmCpuFeaturesLibConstructor =20 [Sources] + CpuFeaturesLib.h SmmCpuFeaturesLib.c SmmCpuFeaturesLibNoStm.c =20 diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.in= f b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf index 50b9cc871302..89cd252ef44e 100644 --- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf @@ -18,6 +18,7 @@ [Defines] CONSTRUCTOR =3D SmmCpuFeaturesLibStmConstructor =20 [Sources] + CpuFeaturesLib.h SmmCpuFeaturesLib.c SmmStm.c SmmStm.h --=20 2.28.0.windows.1