From 51773d49de84e7f1d7b1f1c39c45a7c0fb4198d5 Mon Sep 17 00:00:00 2001 From: Jeff Fan Date: Sat, 2 Jul 2016 12:01:02 +0800 Subject: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Clean up CheckFeatureSupported() Removed EFIAPI and parameter from CheckFeatureSupported() and removed CheckProcessorFeature() totally. Cc: Michael Kinney Cc: Feng Tian Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Feng Tian Reviewed-by: Michael Kinney Regression-tested-by: Laszlo Ersek --- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 2 +- UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 47 +--------------------- UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h | 14 +------ 3 files changed, 3 insertions(+), 60 deletions(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c index 50059e4241..dbe63ee9d2 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c @@ -359,7 +359,7 @@ SmmInitHandler ( // // Check XD and BTS features on each processor on normal boot // - CheckFeatureSupported (NULL); + CheckFeatureSupported (); } if (mIsBsp) { diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c index d315194dfc..329574ebb2 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c @@ -925,13 +925,10 @@ InitSmmProfileInternal ( /** Check if XD feature is supported by a processor. - @param[in,out] Buffer The pointer to private data buffer. - **/ VOID -EFIAPI CheckFeatureSupported ( - IN OUT VOID *Buffer + VOID ) { UINT32 RegEax; @@ -978,48 +975,6 @@ CheckFeatureSupported ( } } -/** - Check if XD and BTS features are supported by all processors. - -**/ -VOID -CheckProcessorFeature ( - VOID - ) -{ - EFI_STATUS Status; - EFI_MP_SERVICES_PROTOCOL *MpServices; - - Status = gBS->LocateProtocol (&gEfiMpServiceProtocolGuid, NULL, (VOID **)&MpServices); - ASSERT_EFI_ERROR (Status); - - // - // First detect if XD and BTS are supported - // - mXdSupported = TRUE; - mBtsSupported = TRUE; - - // - // Check if XD and BTS are supported on all processors. - // - CheckFeatureSupported (NULL); - - // - //Check on other processors if BSP supports this - // - if (mXdSupported || mBtsSupported) { - MpServices->StartupAllAPs ( - MpServices, - CheckFeatureSupported, - TRUE, - NULL, - 0, - NULL, - NULL - ); - } -} - /** Enable XD feature. diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h index 328d2b9758..13ff675ba2 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h @@ -90,13 +90,10 @@ PageFaultIdtHandlerSmmProfile ( /** Check if XD feature is supported by a processor. - @param[in,out] Buffer The pointer to private data buffer. - **/ VOID -EFIAPI CheckFeatureSupported ( - IN OUT VOID *Buffer + VOID ); /** @@ -117,15 +114,6 @@ InitPaging ( VOID ); -/** - Check if XD and BTS features are supported by all processors. - -**/ -VOID -CheckProcessorFeature ( - VOID - ); - extern BOOLEAN mXdSupported; extern BOOLEAN mXdEnabled; -- 2.39.2