summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2008-09-16 04:20:43 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2008-09-16 04:20:43 +0000
commita15f64b6da518de85dfbf9f633ec9d04f8d76e76 (patch)
treef27f93db00d51a14dfe6fc48219f1c861b6081e8 /sys/arch/powerpc
parent28b1fafca5fb1a8888b84ab98aa5a50a73d115e1 (diff)
SMP ddb support, with some feedback from kettenis.
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r--sys/arch/powerpc/include/cpu.h9
-rw-r--r--sys/arch/powerpc/include/db_machdep.h13
-rw-r--r--sys/arch/powerpc/include/intr.h7
3 files changed, 26 insertions, 3 deletions
diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h
index 4a6d2ed2692..2553e3b0183 100644
--- a/sys/arch/powerpc/include/cpu.h
+++ b/sys/arch/powerpc/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.38 2008/07/18 23:43:31 art Exp $ */
+/* $OpenBSD: cpu.h,v 1.39 2008/09/16 04:20:42 drahn Exp $ */
/* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */
/*
@@ -73,6 +73,13 @@ struct cpu_info {
volatile u_int64_t ci_nextstatevent;
int ci_statspending;
+ volatile int ci_ddb_paused;
+#define CI_DDB_RUNNING 0
+#define CI_DDB_SHOULDSTOP 1
+#define CI_DDB_STOPPED 2
+#define CI_DDB_ENTERDDB 3
+#define CI_DDB_INDDB 4
+
u_long ci_randseed;
};
diff --git a/sys/arch/powerpc/include/db_machdep.h b/sys/arch/powerpc/include/db_machdep.h
index 241c7511fd6..af3a6400e7b 100644
--- a/sys/arch/powerpc/include/db_machdep.h
+++ b/sys/arch/powerpc/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.21 2005/12/17 07:31:26 miod Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.22 2008/09/16 04:20:42 drahn Exp $ */
/* $NetBSD: db_machdep.h,v 1.13 1996/04/29 20:50:08 leo Exp $ */
/*
@@ -93,12 +93,23 @@ extern db_regs_t ddb_regs; /* register state */
#ifdef _KERNEL
+int db_enter_ddb(void);
+void db_startcpu(int);
+void db_stopcpu(int);
+void ppc_ipi_db(struct cpu_info *);
+
void kdb_kintr(void *);
int kdb_trap(int, void *);
void db_save_regs(struct trapframe *frame);
void ddb_trap(void);
db_expr_t db_dumpframe(u_int32_t pframe, int (*pr)(const char *, ...));
+extern struct mutex ddb_mp_mutex;
+
+#define DDB_STATE_NOT_RUNNING 0
+#define DDB_STATE_RUNNING 1
+#define DDB_STATE_EXITING 2
+
#endif /* _KERNEL */
#endif /* _PPC_DB_MACHDEP_H_ */
diff --git a/sys/arch/powerpc/include/intr.h b/sys/arch/powerpc/include/intr.h
index 3e2c206e9ef..f05d41e7189 100644
--- a/sys/arch/powerpc/include/intr.h
+++ b/sys/arch/powerpc/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.34 2007/11/14 20:33:32 thib Exp $ */
+/* $OpenBSD: intr.h,v 1.35 2008/09/16 04:20:42 drahn Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom, Opsycon AB and RTMX Inc, USA.
@@ -124,5 +124,10 @@ extern int ppc_configed_intr_cnt;
extern struct intrhand ppc_configed_intr[MAX_PRECONF_INTR];
void softnet(int isr);
+#define PPC_IPI_NOP 0
+#define PPC_IPI_DDB 1
+
+void ppc_send_ipi(struct cpu_info *, int);
+
#endif /* _LOCORE */
#endif /* _POWERPC_INTR_H_ */