diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/i386/boot/tables.c | 2 | ||||
-rw-r--r-- | src/arch/i386/include/arch/smp/mpspec.h | 2 | ||||
-rw-r--r-- | src/arch/i386/lib/c_start.S | 4 | ||||
-rw-r--r-- | src/arch/i386/smp/mpspec.c | 2 | ||||
-rw-r--r-- | src/arch/i386/smp/secondary.S | 4 | ||||
-rw-r--r-- | src/arch/i386/smp/start_stop.c | 11 |
6 files changed, 9 insertions, 16 deletions
diff --git a/src/arch/i386/boot/tables.c b/src/arch/i386/boot/tables.c index 1b840ff379..513167188c 100644 --- a/src/arch/i386/boot/tables.c +++ b/src/arch/i386/boot/tables.c @@ -20,7 +20,7 @@ static void remove_logical_cpus(unsigned long *processor_map) if (disable_logical_cpus) { /* disable logical cpus */ int cnt; - for(cnt=MAX_PHYSICAL_CPUS;cnt<MAX_CPUS;cnt++) + for(cnt=CONFIG_MAX_PHYSICAL_CPUS;cnt<CONFIG_MAX_CPUS;cnt++) processor_map[cnt]=0; printk_debug("logical cpus disabled\n"); } diff --git a/src/arch/i386/include/arch/smp/mpspec.h b/src/arch/i386/include/arch/smp/mpspec.h index 96b2ab3e6b..e780593df6 100644 --- a/src/arch/i386/include/arch/smp/mpspec.h +++ b/src/arch/i386/include/arch/smp/mpspec.h @@ -268,7 +268,7 @@ void *smp_write_floating_table(unsigned long addr); unsigned long write_smp_table(unsigned long addr, unsigned long *processor_map); /* A table (per mainboard) listing the initial apicid of each cpu. */ -extern unsigned long initial_apicid[MAX_CPUS]; +extern unsigned long initial_apicid[CONFIG_MAX_CPUS]; #else /* HAVE_MP_TABLE */ static inline diff --git a/src/arch/i386/lib/c_start.S b/src/arch/i386/lib/c_start.S index 4c4146ec83..602fc51cbd 100644 --- a/src/arch/i386/lib/c_start.S +++ b/src/arch/i386/lib/c_start.S @@ -45,10 +45,10 @@ _start: movl APIC_ID(%edi), %eax shrl $24, %eax - /* Get the cpu index (MAX_CPUS on error) */ + /* Get the cpu index (CONFIG_MAX_CPUS on error) */ movl $-4, %ebx 1: addl $4, %ebx - cmpl $(MAX_CPUS << 2), %ebx + cmpl $(CONFIG_MAX_CPUS << 2), %ebx je 2 cmpl %eax, initial_apicid(%ebx) jne 1b diff --git a/src/arch/i386/smp/mpspec.c b/src/arch/i386/smp/mpspec.c index ff935bb996..d7b8c3e2f0 100644 --- a/src/arch/i386/smp/mpspec.c +++ b/src/arch/i386/smp/mpspec.c @@ -108,7 +108,7 @@ void smp_write_processors(struct mp_config_table *mc, cpuid(1, &eax, &ebx, &ecx, &edx); cpu_features = eax; cpu_feature_flags = edx; - for(i = 0; i < MAX_CPUS; i++) { + for(i = 0; i < CONFIG_MAX_CPUS; i++) { unsigned long cpu_apicid = initial_apicid[i]; unsigned long cpu_flag; if(initial_apicid[i]==-1) diff --git a/src/arch/i386/smp/secondary.S b/src/arch/i386/smp/secondary.S index 78c55764b0..c27d6282b0 100644 --- a/src/arch/i386/smp/secondary.S +++ b/src/arch/i386/smp/secondary.S @@ -48,10 +48,10 @@ _secondary_start: movl (APIC_ID + APIC_DEFAULT_BASE), %edi shrl $24, %edi - /* Get the cpu index (MAX_CPUS on error) */ + /* Get the cpu index (CONFIG_MAX_CPUS on error) */ movl $-4, %ebx 1: addl $4, %ebx - cmpl $(MAX_CPUS << 2), %ebx + cmpl $(CONFIG_MAX_CPUS << 2), %ebx je 2 cmpl %edi, initial_apicid(%ebx) jne 1b diff --git a/src/arch/i386/smp/start_stop.c b/src/arch/i386/smp/start_stop.c index bb8868a8d9..b40452403c 100644 --- a/src/arch/i386/smp/start_stop.c +++ b/src/arch/i386/smp/start_stop.c @@ -5,13 +5,6 @@ #include <string.h> #include <console/console.h> -#ifndef START_CPU_SEG -#define START_CPU_SEG 0x90000 -#endif -#if (START_CPU_SEG&0xffff) != 0 -#error START_CPU_SEG must be 64k aligned -#endif - static inline void hlt(void) { asm("hlt"); @@ -26,7 +19,7 @@ unsigned long this_processors_id(void) int processor_index(unsigned long apicid) { int i; - for(i = 0; i < MAX_CPUS; i++) { + for(i = 0; i < CONFIG_MAX_CPUS; i++) { if (initial_apicid[i] == apicid) { return i; } @@ -230,7 +223,7 @@ void startup_other_cpus(unsigned long *processor_map) int i; /* Assume the cpus are densly packed by apicid */ - for(i = 0; i < MAX_CPUS; i++) { + for(i = 0; i < CONFIG_MAX_CPUS; i++) { unsigned long cpu_apicid = initial_apicid[i]; if (cpu_apicid == -1) { printk_err("CPU %d not found\n",i); |