summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2016-07-29 11:25:28 +0800
committerdavid wei <david.wei@intel.com>2016-08-10 10:38:31 +0800
commitc286ec2fe677ecfa4797680869518b52e97056c7 (patch)
tree0fef00cd5f96200a8afed0c99a20b9f83daa30ef
parent651a720302726b359a43fecd13dda57792dec8ab (diff)
downloadedk2-platforms-c286ec2fe677ecfa4797680869518b52e97056c7.tar.xz
Vlv2TbltDevicePkg/AcpiPlatform: Amend the declaration of mGlobalNvsArea
mGlobalNvsArea wasn't declared as extern in AcpiPlatform.h and the header was included in AcpiPlatform.c and AcpiPlatformHooks.c. Although it's declared as extern in AcpiPlatformHooks.c, gcc still created an instance of mGlobalNvsArea in AcpiPlatformHooks.c since the header was expanded first and then the linker complained "multiple definition". This commit rearrange the delaration of mGlobalNvsArea to satisfy gcc. Cc: David Wei <david.wei@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: David Wei <david.wei@intel.com>
-rw-r--r--Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c1
-rw-r--r--Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h2
-rw-r--r--Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.c1
3 files changed, 2 insertions, 2 deletions
diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
index bb9cee536a..70ad07e600 100644
--- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
+++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
@@ -66,6 +66,7 @@ CHAR16 gACPIOSFRRefDataBlockVariableName[] = ACPI_OSFR_REF_DATA_BLOCK_VARIABL
CHAR16 gACPIOSFRMfgStringVariableName[] = ACPI_OSFR_MFG_STRING_VARIABLE_NAME;
EFI_CPU_IO_PROTOCOL *mCpuIo;
+EFI_GLOBAL_NVS_AREA_PROTOCOL mGlobalNvsArea;
#ifndef __GNUC__
#pragma optimize("", off)
#endif
diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h
index fbc927281f..8587beb976 100644
--- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h
+++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h
@@ -59,7 +59,7 @@ Abstract:
//
// Global variables.
//
-EFI_GLOBAL_NVS_AREA_PROTOCOL mGlobalNvsArea;
+extern EFI_GLOBAL_NVS_AREA_PROTOCOL mGlobalNvsArea;
//
// ACPI table information used to initialize tables.
diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.c b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.c
index c89c07f073..2dc9657c57 100644
--- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.c
+++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.c
@@ -33,7 +33,6 @@ Abstract:
//
#include "AcpiPlatformHooksLib.h"
-extern EFI_GLOBAL_NVS_AREA_PROTOCOL mGlobalNvsArea;
extern SYSTEM_CONFIGURATION mSystemConfiguration;
ENHANCED_SPEEDSTEP_PROTOCOL *mEistProtocol = NULL;