From c773514d457265e9ada334572641e1b137c66aac Mon Sep 17 00:00:00 2001 From: Michael Kinney Date: Thu, 17 Nov 2016 12:43:04 -0800 Subject: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Add volatile to mNumberToFinish Add volatile qualifier to mNumberToFinish to prevent GCC 5.4 compiler from optimizing away required logic in ACPI S3 resume. Cc: Liming Gao Cc: Laszlo Ersek Cc: Andrew Fish Cc: Jeff Fan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney Reviewed-by: Laszlo Ersek Reviewed-by: Jeff Fan --- UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c index 4af86b70f2..532b7c44bd 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c @@ -55,7 +55,7 @@ AsmGetAddressMap ( #define LEGACY_REGION_BASE (0xA0000 - LEGACY_REGION_SIZE) ACPI_CPU_DATA mAcpiCpuData; -UINT32 mNumberToFinish; +volatile UINT32 mNumberToFinish; MP_CPU_EXCHANGE_INFO *mExchangeInfo; BOOLEAN mRestoreSmmConfigurationInS3 = FALSE; VOID *mGdtForAp = NULL;