Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1184
-gerrit
commit 53d42342667eaa94da20df258d5d49664c015f58 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Sat Jul 7 13:42:03 2012 +0300
Move cpus_ready_for_init() to AMD K8
The function is a noop for all but amd/serengeti_cheetah.
Change-Id: I09e2e710aa964c2f31e35fcea4f14856cc1e1dca Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/cpu/x86/lapic/lapic_cpu_init.c | 2 -- src/include/cpu/cpu.h | 6 ------ src/northbridge/amd/amdk8/amdk8.h | 2 ++ src/northbridge/amd/amdk8/northbridge.c | 3 +++ 4 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c index b6dc560..302eeba 100644 --- a/src/cpu/x86/lapic/lapic_cpu_init.c +++ b/src/cpu/x86/lapic/lapic_cpu_init.c @@ -286,8 +286,6 @@ void initialize_cpus(struct bus *cpu_bus) smm_init(); #endif
- cpus_ready_for_init(); - /* Initialize the bootstrap processor */ cpu_initialize(cpu_bus, 0);
diff --git a/src/include/cpu/cpu.h b/src/include/cpu/cpu.h index 9765dfd..90e4620 100644 --- a/src/include/cpu/cpu.h +++ b/src/include/cpu/cpu.h @@ -11,12 +11,6 @@ void secondary_cpu_init(int index);
extern unsigned int cpucount;
-#if !CONFIG_WAIT_BEFORE_CPUS_INIT - #define cpus_ready_for_init() do {} while(0) -#else - void cpus_ready_for_init(void); -#endif - #if CONFIG_HAVE_SMI_HANDLER void smm_init(void); void smm_lock(void); diff --git a/src/northbridge/amd/amdk8/amdk8.h b/src/northbridge/amd/amdk8/amdk8.h index 5aa3b31..e001706 100644 --- a/src/northbridge/amd/amdk8/amdk8.h +++ b/src/northbridge/amd/amdk8/amdk8.h @@ -14,4 +14,6 @@ void setup_resource_map_offset(const unsigned int *register_values, int max, uns void fill_mem_ctrl(int controllers, struct mem_controller *ctrl_a, const uint16_t *spd_addr); #endif
+void cpus_ready_for_init(void); + #endif /* AMDK8_H */ diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c index 5eeeda2..cf80389 100644 --- a/src/northbridge/amd/amdk8/northbridge.c +++ b/src/northbridge/amd/amdk8/northbridge.c @@ -1331,6 +1331,9 @@ static u32 cpu_bus_scan(device_t dev, u32 max)
static void cpu_bus_init(device_t dev) { +#if CONFIG_WAIT_BEFORE_CPUS_INIT + cpus_ready_for_init(); +#endif initialize_cpus(dev->link_list); }
Kyösti Mälkki wrote:
Move cpus_ready_for_init() to AMD K8 The function is a noop for all but amd/serengeti_cheetah.
..
+++ b/src/northbridge/amd/amdk8/northbridge.c @@ -1331,6 +1331,9 @@ static u32 cpu_bus_scan(device_t dev, u32 max)
static void cpu_bus_init(device_t dev) { +#if CONFIG_WAIT_BEFORE_CPUS_INIT
- cpus_ready_for_init();
+#endif initialize_cpus(dev->link_list); }
src$ git grep WAIT_BEFORE_CPUS_INIT cpu/amd/model_fxx/model_fxx_init.c:#if CONFIG_WAIT_BEFORE_CPUS_INIT cpu/x86/Kconfig:config WAIT_BEFORE_CPUS_INIT include/cpu/cpu.h:#if !CONFIG_WAIT_BEFORE_CPUS_INIT mainboard/amd/pistachio/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/amd/serengeti_cheetah/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/ibm/e325/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/ibm/e326/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/iwill/dk8_htx/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/iwill/dk8s2/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/iwill/dk8x/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/msi/ms9652_fam10/Kconfig:config WAIT_BEFORE_CPUS_INIT mainboard/technexion/tim8690/Kconfig: select WAIT_BEFORE_CPUS_INIT
If it really only applies to serengeti_cheetah then please also move the config out of cpu/x86/Kconfig and remove all the selects from other boards.
//Peter
On Sat, 2012-07-07 at 13:01 +0200, Peter Stuge wrote:
Kyösti Mälkki wrote:
Move cpus_ready_for_init() to AMD K8 The function is a noop for all but amd/serengeti_cheetah.
..
+++ b/src/northbridge/amd/amdk8/northbridge.c @@ -1331,6 +1331,9 @@ static u32 cpu_bus_scan(device_t dev, u32 max)
static void cpu_bus_init(device_t dev) { +#if CONFIG_WAIT_BEFORE_CPUS_INIT
- cpus_ready_for_init();
+#endif initialize_cpus(dev->link_list); }
src$ git grep WAIT_BEFORE_CPUS_INIT cpu/amd/model_fxx/model_fxx_init.c:#if CONFIG_WAIT_BEFORE_CPUS_INIT cpu/x86/Kconfig:config WAIT_BEFORE_CPUS_INIT include/cpu/cpu.h:#if !CONFIG_WAIT_BEFORE_CPUS_INIT mainboard/amd/pistachio/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/amd/serengeti_cheetah/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/ibm/e325/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/ibm/e326/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/iwill/dk8_htx/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/iwill/dk8s2/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/iwill/dk8x/Kconfig: select WAIT_BEFORE_CPUS_INIT mainboard/msi/ms9652_fam10/Kconfig:config WAIT_BEFORE_CPUS_INIT mainboard/technexion/tim8690/Kconfig: select WAIT_BEFORE_CPUS_INIT
If it really only applies to serengeti_cheetah then please also move the config out of cpu/x86/Kconfig and remove all the selects from other boards.
I was hoping that someone who understands use of MEM_TRAIN_SEQ would show a way to drop WAIT_BEFORE_CPUS_INIT Kconfig altogether.
Kyösti
On Sat, Jul 7, 2012 at 4:30 AM, Kyösti Mälkki kyosti.malkki@gmail.com wrote:
I was hoping that someone who understands use of MEM_TRAIN_SEQ would show a way to drop WAIT_BEFORE_CPUS_INIT Kconfig altogether.
It tied in to early efforts to have APs do training as well as BSPs. That's my fading memory. We did lots of stuff in serengeti that did not work out :-)
ron