From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D7C9981EE3 for ; Tue, 15 Nov 2016 06:08:08 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 15 Nov 2016 06:08:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,495,1473145200"; d="scan'208";a="1068738136" Received: from jfan12-desk.ccr.corp.intel.com ([10.239.9.5]) by fmsmga001.fm.intel.com with ESMTP; 15 Nov 2016 06:08:11 -0800 From: Jeff Fan To: edk2-devel@lists.01.org Cc: Paolo Bonzini , Laszlo Ersek , Jiewen Yao , Feng Tian , Michael D Kinney Date: Tue, 15 Nov 2016 22:08:08 +0800 Message-Id: <20161115140809.5292-2-jeff.fan@intel.com> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20161115140809.5292-1-jeff.fan@intel.com> References: <20161115140809.5292-1-jeff.fan@intel.com> Subject: [PATCH v2 1/2] UefiCpuPkg/PiSmmCpuDxeSmm: Add volatile for parameter NumberToFinish X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2016 14:08:08 -0000 Adding *volatile* type for NumberToFinish parameter of TransferApToSafeState(). Cc: Paolo Bonzini Cc: Laszlo Ersek Cc: Jiewen Yao Cc: Feng Tian Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c | 4 ++-- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 2 +- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c index 9760373..22e2d9a 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c @@ -107,12 +107,12 @@ VOID TransferApToSafeState ( IN UINT32 ApHltLoopCode, IN UINT32 TopOfStack, - IN UINT32 *NumberToFinish + IN volatile UINT32 *NumberToFinish ) { SwitchStack ( (SWITCH_STACK_ENTRY_POINT) (UINTN) ApHltLoopCode, - NumberToFinish, + (UINT32 *) NumberToFinish, NULL, (VOID *) (UINTN) TopOfStack ); diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h index 88d9c85..6688f88 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h @@ -837,7 +837,7 @@ VOID TransferApToSafeState ( IN UINT32 ApHltLoopCode, IN UINT32 TopOfStack, - IN UINT32 *NumberToFinish + IN volatile UINT32 *NumberToFinish ); #endif diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c index 6844c3f..8f0935d 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c @@ -112,7 +112,7 @@ VOID TransferApToSafeState ( IN UINT32 ApHltLoopCode, IN UINT32 TopOfStack, - IN UINT32 *NumberToFinish + IN volatile UINT32 *NumberToFinish ) { AsmDisablePaging64 ( -- 2.9.3.windows.2