From ec2d28a28725356dec9613b4309c56942677e465 Mon Sep 17 00:00:00 2001 From: Tom Zimmerman Date: Fri, 3 Oct 2003 15:48:45 +0000 Subject: [PATCH] Made changes to allow one cpu to be plugged into a SMP board. --- src/arch/i386/lib/hardwaremain.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/arch/i386/lib/hardwaremain.c b/src/arch/i386/lib/hardwaremain.c index e22c2f430e..76fe3edf91 100644 --- a/src/arch/i386/lib/hardwaremain.c +++ b/src/arch/i386/lib/hardwaremain.c @@ -162,10 +162,17 @@ static void wait_for_other_cpus(void) } for(i = 0; i < MAX_CPUS; i++) { if (!(processor_map[i] & CPU_ENABLED)) { - printk_err("CPU %d/%u did not initialize!\n", - i, initial_apicid[i]); - processor_map[i] = 0; - mainboard_cpu_fixup(i); + if(initial_apicid[i] == -1) { + printk_err("CPU %d is not installed\n", + i); + processor_map[i] = 0; + } + else { + printk_err("CPU %d/%u did not initialize!\n", + i, initial_apicid[i]); + processor_map[i] = 0; + mainboard_cpu_fixup(i); + } } } printk_debug("All AP CPUs stopped\n"); @@ -237,9 +244,6 @@ void write_tables(struct mem_range *mem) void hardwaremain(int boot_complete) { -#if CONFIG_ASSIGNIRQ == 1 - void assignirq(void); -#endif /* Processor ID of the BOOT cpu (i.e. the one running this code) */ unsigned long boot_cpu; int boot_index; @@ -326,6 +330,9 @@ void hardwaremain(int boot_complete) printk_spew("BOOT CPU is %d\n", boot_cpu); processor_map[boot_index] = CPU_BOOTPROCESSOR|CPU_ENABLED; + // generic mainboard fixup + mainboard_fixup(); + /* Now start the other cpus initializing * The sooner they start the sooner they stop. */ @@ -333,9 +340,6 @@ void hardwaremain(int boot_complete) startup_other_cpus(processor_map); post_code(0x77); - // generic mainboard fixup - mainboard_fixup(); - #ifndef MAINBOARD_FIXUP_IN_CHARGE post_code(0x91); @@ -361,9 +365,6 @@ void hardwaremain(int boot_complete) /* to do: intel_serial_on(); */ final_mainboard_fixup(); -#if CONFIG_ASSIGNIRQ == 1 - assignirq(); -#endif post_code(0xec);