diff --git a/src/northbridge/amd/amdk8/Makefile.inc b/src/northbridge/amd/amdk8/Makefile.inc index 29274f48ec..7497a07437 100644 --- a/src/northbridge/amd/amdk8/Makefile.inc +++ b/src/northbridge/amd/amdk8/Makefile.inc @@ -4,6 +4,9 @@ ramstage-y += northbridge.c ramstage-y += misc_control.c ramstage-y += get_sblk_pci1234.c ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c +ifeq ($(CONFIG_K8_REV_F_SUPPORT),y) +romstage-$(CONFIG_HAVE_ACPI_RESUME) += exit_from_self.c +endif # Enable this if you want to check the values of the PCI routing registers. # Call show_all_routes() anywhere amdk8.h is included. diff --git a/src/northbridge/amd/amdk8/exit_from_self.c b/src/northbridge/amd/amdk8/exit_from_self.c index 6da042f673..4b6f4e2a57 100644 --- a/src/northbridge/amd/amdk8/exit_from_self.c +++ b/src/northbridge/amd/amdk8/exit_from_self.c @@ -13,7 +13,13 @@ * GNU General Public License for more details. */ +#include +#include +#include +#include +#include #include "raminit.h" +#include "f.h" void exit_from_self(int controllers, const struct mem_controller *ctrl, struct sys_info *sysinfo) diff --git a/src/northbridge/amd/amdk8/f.h b/src/northbridge/amd/amdk8/f.h index db79fbf8d0..506a44970c 100644 --- a/src/northbridge/amd/amdk8/f.h +++ b/src/northbridge/amd/amdk8/f.h @@ -584,4 +584,6 @@ static inline void wait_all_core0_mem_trained(struct sys_info *sysinfo) } #endif +void dqs_restore_MC_NVRAM(unsigned int dev); + #endif /* AMDK8_F_H */ diff --git a/src/northbridge/amd/amdk8/raminit.c b/src/northbridge/amd/amdk8/raminit.c index 48e2bb93bd..b10cd0ef43 100644 --- a/src/northbridge/amd/amdk8/raminit.c +++ b/src/northbridge/amd/amdk8/raminit.c @@ -2266,7 +2266,7 @@ static uint32_t hoist_memory(int controllers, const struct mem_controller *ctrl, return carry_over; } -static void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl) +void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl) { uint32_t hole_startk; @@ -2325,7 +2325,6 @@ static void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl) #endif -#define TIMEOUT_LOOPS 300000 #if CONFIG_RAMINIT_SYSINFO static void sdram_enable(int controllers, const struct mem_controller *ctrl, struct sys_info *sysinfo) #else diff --git a/src/northbridge/amd/amdk8/raminit.h b/src/northbridge/amd/amdk8/raminit.h index 610d7d3d74..95a99b0d7f 100644 --- a/src/northbridge/amd/amdk8/raminit.h +++ b/src/northbridge/amd/amdk8/raminit.h @@ -14,6 +14,9 @@ struct mem_controller { struct sys_info; void exit_from_self(int controllers, const struct mem_controller *ctrl, struct sys_info *sysinfo); void setup_resource_map(const unsigned int *register_values, int max); +void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl); + +#define TIMEOUT_LOOPS 300000 #if defined(__PRE_RAM__) && CONFIG_RAMINIT_SYSINFO void sdram_initialize(int controllers, const struct mem_controller *ctrl, void *sysinfo); diff --git a/src/northbridge/amd/amdk8/raminit_f.c b/src/northbridge/amd/amdk8/raminit_f.c index e7a14ec454..d6632bbef5 100644 --- a/src/northbridge/amd/amdk8/raminit_f.c +++ b/src/northbridge/amd/amdk8/raminit_f.c @@ -2860,8 +2860,6 @@ static void sdram_set_spd_registers(const struct mem_controller *ctrl, return; } -#define TIMEOUT_LOOPS 300000 - #include "raminit_f_dqs.c" #if CONFIG_HW_MEM_HOLE_SIZEK != 0 @@ -2919,7 +2917,7 @@ static uint32_t hoist_memory(int controllers, const struct mem_controller *ctrl, return carry_over; } -static void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl) +void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl) { uint32_t hole_startk; @@ -2972,9 +2970,6 @@ static void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl) } #endif -#if CONFIG_HAVE_ACPI_RESUME -#include "exit_from_self.c" -#endif static void sdram_enable(int controllers, const struct mem_controller *ctrl, struct sys_info *sysinfo) diff --git a/src/northbridge/amd/amdk8/raminit_f_dqs.c b/src/northbridge/amd/amdk8/raminit_f_dqs.c index 204339cdb0..1e99f338c7 100644 --- a/src/northbridge/amd/amdk8/raminit_f_dqs.c +++ b/src/northbridge/amd/amdk8/raminit_f_dqs.c @@ -1848,7 +1848,7 @@ static void dqs_save_MC_NVRAM(unsigned int dev) } #endif -static void dqs_restore_MC_NVRAM(unsigned int dev) +void dqs_restore_MC_NVRAM(unsigned int dev) { int pos = 0; u32 reg;