summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2007-08-04 16:39:39 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:27:11 +0200
commitf9fd27989cb6402fbdf624c350e9908903902745 (patch)
tree23db43573495c3612fa8e60cfb8b59533417f9ba
parent5f31fc65e9479fe7c637c82e280e20bf4ef39250 (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".
-rw-r--r--ChangeLog6
-rw-r--r--i386/i386/i386asm.sym4
-rw-r--r--i386/i386/lock.h2
-rw-r--r--i386/i386/mp_desc.c32
4 files changed, 37 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 4d46ac3..4c832d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,13 +8,17 @@
and _current_timer.
* i386/i386/io_perm.c (i386_io_perm_create): Lock io_perm->port, not
inexistent device->port.
+ * i386/i386at/model_dep.c: Make init_alloc_aligned() extern.
* i386/i386/mp_desc.c: Include <machine/vm_param.h>
(interrupt_stack_alloc): Call init_alloc_aligned() instead of
init_alloc().
- * i386/i386at/model_dep.c: Make init_alloc_aligned() extern.
+ (cpu_control, interrupt_processor, cpu_start, start_other_cpus): New
+ functions.
* i386/i386/mp_desc.h: Include <i386at/idt.h> instead of "idt.h"
* i386/i386/cswitch.S: Use EXT(interrupt_stack) instead of
_interrupt_stack.
+ * i386/i386/i386asm.sym (MP_GDT, MP_IDT): Remove macros.
+ * i386/i386/lock.h: Don't include_next "lock.h".
2007-07-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
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 */