From 13275e43c59bad05b4e488eb728ac9b8210a2654 Mon Sep 17 00:00:00 2001 From: fsmp Date: Fri, 27 Jun 1997 23:48:05 +0000 Subject: apic_vector.s: - added Xcpustop IPI code to support stop_cpus()/restart_cpus(). it is off by default, enable via smptests.h:TEST_CPUSTOP intr_machdep.h: - moved +ICULEN to lower level. - added entry for Xcpustop. --- sys/i386/isa/apic_vector.s | 77 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) (limited to 'sys/i386/isa/apic_vector.s') diff --git a/sys/i386/isa/apic_vector.s b/sys/i386/isa/apic_vector.s index fa7edb0..debc249 100644 --- a/sys/i386/isa/apic_vector.s +++ b/sys/i386/isa/apic_vector.s @@ -1,9 +1,11 @@ /* * from: vector.s, 386BSD 0.1 unknown origin - * $Id: apic_vector.s,v 1.2 1997/05/31 08:59:51 peter Exp $ + * $Id: apic_vector.s,v 1.1 1997/06/26 17:52:12 smp Exp smp $ */ +#include /** TEST_CPUSTOP */ + /* convert an absolute IRQ# into a bitmask */ #define IRQ_BIT(irq_num) (1 << (irq_num)) @@ -178,6 +180,69 @@ _Xinvltlb: popl %eax iret +#ifdef TEST_CPUSTOP +/* + * Executed by a CPU when it receives an Xcpustop IPI from another CPU, + * + * - Signals its receipt. + * - Waits for permission to restart. + * - Signals its restart. + */ + + .text + SUPERALIGN_TEXT + .globl _Xcpustop +_Xcpustop: + pushl %eax + pushl %ds /* save current data segment */ + +#ifdef DEBUG_CPUSTOP + movb $0x50, %al + outb %al, $POST_ADDR +#endif + + movl $KDSEL, %eax + movl %ax, %ds /* use KERNEL data segment */ + + movl _cpuid, %eax /* id */ + + lock + btsl %eax, _stopped_cpus /* stopped_cpus |= (1<