summaryrefslogtreecommitdiff
path: root/src/northbridge/amd/amdk8
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2017-04-07 09:24:02 +0200
committerMartin Roth <martinroth@google.com>2017-04-10 20:53:00 +0200
commitf170e71630bff4b181dbd5b209d9fb3f8ce35131 (patch)
tree6aed1e3342678cf606bd07372b443a5a88ec6d5b /src/northbridge/amd/amdk8
parent237a93c43e9d269926f34839ee88f00833701ce6 (diff)
downloadcoreboot-f170e71630bff4b181dbd5b209d9fb3f8ce35131.tar.xz
nb/amdk8/(pre_)f.h: Don't declare global variable in header
This is needed if one wants to use the header more than once. Change-Id: I375d08465b6c64cd91e7563e3917764507d779ba Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/19029 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/northbridge/amd/amdk8')
-rw-r--r--src/northbridge/amd/amdk8/f.h2
-rw-r--r--src/northbridge/amd/amdk8/pre_f.h2
-rw-r--r--src/northbridge/amd/amdk8/raminit.c3
-rw-r--r--src/northbridge/amd/amdk8/raminit_f.c3
4 files changed, 7 insertions, 3 deletions
diff --git a/src/northbridge/amd/amdk8/f.h b/src/northbridge/amd/amdk8/f.h
index 359a1d6283..db79fbf8d0 100644
--- a/src/northbridge/amd/amdk8/f.h
+++ b/src/northbridge/amd/amdk8/f.h
@@ -520,7 +520,7 @@ struct sys_info {
#ifdef __PRE_RAM__
#include <arch/early_variables.h>
-struct sys_info sysinfo_car CAR_GLOBAL;
+extern struct sys_info sysinfo_car;
#endif
#include <reset.h>
diff --git a/src/northbridge/amd/amdk8/pre_f.h b/src/northbridge/amd/amdk8/pre_f.h
index 9c1eeb685c..abc51b111f 100644
--- a/src/northbridge/amd/amdk8/pre_f.h
+++ b/src/northbridge/amd/amdk8/pre_f.h
@@ -264,7 +264,7 @@ struct sys_info {
#ifdef __PRE_RAM__
#include <arch/early_variables.h>
-struct sys_info sysinfo_car CAR_GLOBAL;
+extern struct sys_info sysinfo_car;
#endif
#endif /* AMDK8_PRE_F_H */
diff --git a/src/northbridge/amd/amdk8/raminit.c b/src/northbridge/amd/amdk8/raminit.c
index 9f333fdaa9..48e2bb93bd 100644
--- a/src/northbridge/amd/amdk8/raminit.c
+++ b/src/northbridge/amd/amdk8/raminit.c
@@ -17,6 +17,9 @@
#include "option_table.h"
#endif
+#include <arch/early_variables.h>
+struct sys_info sysinfo_car CAR_GLOBAL;
+
void setup_resource_map(const unsigned int *register_values, int max)
{
int i;
diff --git a/src/northbridge/amd/amdk8/raminit_f.c b/src/northbridge/amd/amdk8/raminit_f.c
index aa2349d39b..e7a14ec454 100644
--- a/src/northbridge/amd/amdk8/raminit_f.c
+++ b/src/northbridge/amd/amdk8/raminit_f.c
@@ -37,10 +37,11 @@
#define printk_raminit(args...)
#endif
+#include <arch/early_variables.h>
+struct sys_info sysinfo_car CAR_GLOBAL;
#include "f_pci.c"
-
/* for PCI_ADDR(0, 0x18, 2, 0x98) index,
and PCI_ADDR(0x, 0x18, 2, 0x9c) data */
/*