diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2007-08-04 16:39:39 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:27:11 +0200 |
commit | f9fd27989cb6402fbdf624c350e9908903902745 (patch) | |
tree | 23db43573495c3612fa8e60cfb8b59533417f9ba /i386 | |
parent | 5f31fc65e9479fe7c637c82e280e20bf4ef39250 (diff) |
2007-08-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
* i386/i386/mp_desc.c: (cpu_control, interrupt_processor, cpu_start)
(start_other_cpus): New functions.
* i386/i386/i386asm.sym (MP_GDT, MP_IDT): Remove macros.
* i386/i386/lock.h: Don't include_next "lock.h".
Diffstat (limited to 'i386')
-rw-r--r-- | i386/i386/i386asm.sym | 4 | ||||
-rw-r--r-- | i386/i386/lock.h | 2 | ||||
-rw-r--r-- | i386/i386/mp_desc.c | 32 |
3 files changed, 32 insertions, 6 deletions
diff --git a/i386/i386/i386asm.sym b/i386/i386/i386asm.sym index fb3ee43..8cfb2c0 100644 --- a/i386/i386/i386asm.sym +++ b/i386/i386/i386asm.sym @@ -117,10 +117,6 @@ expr (VM_MIN_KERNEL_ADDRESS>>PDESHIFT)*sizeof(pt_entry_t) KERNELBASEPDE expr RB_KDB #endif /* MACH_KDB */ -#if NCPUS > 1 -offset mp_desc_table mp gdt -offset mp_desc_table mp idt -#endif /* NCPUS > 1 */ expr INTSTACK_SIZE #if !STAT_TIME diff --git a/i386/i386/lock.h b/i386/i386/lock.h index 09b3f2b..2b5c4aa 100644 --- a/i386/i386/lock.h +++ b/i386/i386/lock.h @@ -124,7 +124,5 @@ extern void simple_lock_pause(void); #endif /* NCPUS > 1 */ -#include_next "lock.h" - #endif /* _I386_LOCK_H_ */ diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c index b037846..7f0b21e 100644 --- a/i386/i386/mp_desc.c +++ b/i386/i386/mp_desc.c @@ -237,4 +237,36 @@ simple_lock_pause(void) dummy++; /* keep the compiler from optimizing the loop away */ } +kern_return_t +cpu_control(int cpu, int *info, unsigned int count) +{ + printf("cpu_control(%d, %p, %d) not implemented\n", + cpu, info, count); + return KERN_FAILURE; +} + +void +interrupt_processor(int cpu) +{ + printf("interrupt cpu %d\n",cpu); +} + +kern_return_t +cpu_start(int cpu) +{ + if (machine_slot[cpu].running) + return KERN_FAILURE; + + return intel_startCPU(cpu); +} + +void +start_other_cpus(void) +{ + int cpu; + for (cpu = 0; cpu < NCPUS; cpu++) + if (cpu != cpu_number()) + cpu_start(cpu); +} + #endif /* NCPUS > 1 */ |