From fe3a75bc41545125f76c28238016658f48833ba2 Mon Sep 17 00:00:00 2001 From: Jeff Fan Date: Tue, 22 Mar 2016 10:15:53 +0800 Subject: UefiCpuPkg/PiSmmCpuDxeSmm: Using global semaphores in aligned buffer Update all global semaphores to the ones in allocated aligned semaphores buffer. 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/Ia32/PageTbl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c') diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c index 5d299044c4..a871bef4e2 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c @@ -1,7 +1,7 @@ /** @file Page table manipulation functions for IA-32 processors -Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -14,8 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "PiSmmCpuDxeSmm.h" -SPIN_LOCK mPFLock; - /** Create PageTable for SMM use. @@ -33,7 +31,7 @@ SmmInitPageTable ( // // Initialize spin lock // - InitializeSpinLock (&mPFLock); + InitializeSpinLock (mPFLock); if (FeaturePcdGet (PcdCpuSmmProfileEnable)) { // @@ -94,7 +92,7 @@ SmiPFHandler ( ASSERT (InterruptType == EXCEPT_IA32_PAGE_FAULT); - AcquireSpinLock (&mPFLock); + AcquireSpinLock (mPFLock); PFAddress = AsmReadCr2 (); @@ -128,5 +126,5 @@ SmiPFHandler ( SmiDefaultPFHandler (); } - ReleaseSpinLock (&mPFLock); + ReleaseSpinLock (mPFLock); } -- cgit v1.2.3