diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-04 23:45:54 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-04 23:45:54 +0000 |
commit | 5424d15729d1b5915d87e909b47eabdfaf06cd12 (patch) | |
tree | 8fb2005ec56bdde5c8ea1525c1eefe2033b80623 /sys/arch/m88k | |
parent | 1214d4250a15e351eadd4f3c0f36335de0f25cba (diff) |
Work in progress SMP code for 88110 processor using the BusSwitch chip as
an IPI facility, for MVME197DP.
It's still missing a few remote cache IPIs and IPI do not seem to be reliably
triggered on remote processors at the moment (but this could be a problem
on the board I am currently testing on), at least it will boot multiuser
using only cpu0 to schedule processes.
Diffstat (limited to 'sys/arch/m88k')
-rw-r--r-- | sys/arch/m88k/include/cpu.h | 22 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/db_interface.c | 10 |
2 files changed, 21 insertions, 11 deletions
diff --git a/sys/arch/m88k/include/cpu.h b/sys/arch/m88k/include/cpu.h index 4ffac7f6892..c082d6fdc78 100644 --- a/sys/arch/m88k/include/cpu.h +++ b/sys/arch/m88k/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.31 2007/11/15 21:23:16 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.32 2007/12/04 23:45:51 miod Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * Copyright (c) 1992, 1993 @@ -42,7 +42,7 @@ #define __M88K_CPU_H__ /* - * CTL_MACHDEP definitinos. + * CTL_MACHDEP definitions. */ #define CPU_CONSDEV 1 /* dev_t: console terminal device */ #define CPU_MAXID 2 /* number of valid machdep ids */ @@ -90,7 +90,7 @@ struct cpu_info { struct pcb *ci_curpcb; /* ...and its pcb */ u_int ci_cpuid; /* cpu number */ - u_int ci_primary; /* set if master cpu */ + u_int ci_pfsr_i0, ci_pfsr_i1; /* instruction... */ u_int ci_pfsr_d0, ci_pfsr_d1; /* ... and data CMMU PFSRs */ @@ -101,18 +101,28 @@ struct cpu_info { u_long ci_spin_locks; /* spin locks counter */ - int ci_ddb_state; /* ddb status */ + int ci_ddb_state; /* ddb status */ #define CI_DDB_RUNNING 0 #define CI_DDB_ENTERDDB 1 #define CI_DDB_INDDB 2 #define CI_DDB_PAUSE 3 - int ci_ipi; /* pending ipis */ + int ci_softintr; /* pending soft interrupts */ + +#ifdef MULTIPROCESSOR + + int ci_ipi; /* pending ipis */ #define CI_IPI_NOTIFY 0x00000001 #define CI_IPI_HARDCLOCK 0x00000002 #define CI_IPI_STATCLOCK 0x00000004 #define CI_IPI_DDB 0x00000008 - int ci_softintr; /* pending soft interrupts */ + +#define CI_IPI_TLB_FLUSH 0x00000010 +#define CI_IPI_CACHE_FLUSH 0x00000020 +#define CI_IPI_ICACHE_FLUSH 0x00000040 + u_int32_t ci_ipi_arg1; + u_int32_t ci_ipi_arg2; +#endif }; extern cpuid_t master_cpu; diff --git a/sys/arch/m88k/m88k/db_interface.c b/sys/arch/m88k/m88k/db_interface.c index 03b7f6309b6..0d54c176176 100644 --- a/sys/arch/m88k/m88k/db_interface.c +++ b/sys/arch/m88k/m88k/db_interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.c,v 1.11 2007/11/14 23:15:03 miod Exp $ */ +/* $OpenBSD: db_interface.c,v 1.12 2007/12/04 23:45:52 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -642,7 +642,7 @@ m88k_db_cpu_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) return; } - db_printf(" cpu state curproc curpcb depth ipi softintr\n"); + db_printf(" cpu flags state curproc curpcb depth ipi softintr\n"); CPU_INFO_FOREACH(cpu, ci) { switch (ci->ci_ddb_state) { case CI_DDB_RUNNING: @@ -659,10 +659,10 @@ m88k_db_cpu_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) ci->ci_ddb_state); break; } - db_printf("%ccpu%1d %-14s %08x %08x %3d %08x %08x\n", + db_printf("%ccpu%1d %02x %-14s %08x %08x %3d %08x %08x\n", (cpu == cpu_number()) ? '*' : ' ', CPU_INFO_UNIT(ci), - state, ci->ci_curproc, ci->ci_curpcb, ci->ci_intrdepth, - ci->ci_ipi, ci->ci_softintr); + ci->ci_flags, state, ci->ci_curproc, ci->ci_curpcb, + ci->ci_intrdepth, ci->ci_ipi, ci->ci_softintr); } } |