summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/include/db_machdep.h
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2001-07-31 06:05:05 +0000
committerjake <jake@FreeBSD.org>2001-07-31 06:05:05 +0000
commitfb7edc502f41d82771205b77ec72ec6f85c7992a (patch)
tree09518e5a462c7f369bd3cbd7d956ad24588b2a9b /sys/sparc64/include/db_machdep.h
parent489876bc4dc75168229017bfd4c2a43ec2711417 (diff)
downloadFreeBSD-src-fb7edc502f41d82771205b77ec72ec6f85c7992a.zip
FreeBSD-src-fb7edc502f41d82771205b77ec72ec6f85c7992a.tar.gz
Flesh out the sparc64 port considerably. This contains:
- mostly complete kernel pmap support, and tested but currently turned off userland pmap support - low level assembly language trap, context switching and support code - fully implemented atomic.h and supporting cpufunc.h - some support for kernel debugging with ddb - various header tweaks and filling out of machine dependent structures
Diffstat (limited to 'sys/sparc64/include/db_machdep.h')
-rw-r--r--sys/sparc64/include/db_machdep.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/sys/sparc64/include/db_machdep.h b/sys/sparc64/include/db_machdep.h
index 5d091ee..0e4954e 100644
--- a/sys/sparc64/include/db_machdep.h
+++ b/sys/sparc64/include/db_machdep.h
@@ -29,4 +29,48 @@
#ifndef _MACHINE_DB_MACHDEP_H_
#define _MACHINE_DB_MACHDEP_H_
+#include <machine/frame.h>
+#include <machine/trap.h>
+
+#define BYTE_MSF (1)
+
+typedef vm_offset_t db_addr_t;
+typedef u_long db_expr_t;
+
+struct db_regs {
+ u_long dr_global[8];
+};
+
+typedef struct trapframe db_regs_t;
+extern db_regs_t ddb_regs;
+#define DDB_REGS (&ddb_regs)
+
+#define PC_REGS(regs) ((db_addr_t)(regs)->tf_tpc)
+
+#define BKPT_INST (0)
+#define BKPT_SIZE (4)
+#define BKPT_SET(inst) (BKPT_INST)
+
+#define FIXUP_PC_AFTER_BREAK do { \
+ ddb_regs.tf_tpc = ddb_regs.tf_tnpc; \
+ ddb_regs.tf_tnpc += BKPT_SIZE; \
+} while (0);
+
+#define db_clear_single_step(regs)
+#define db_set_single_step(regs)
+
+#define IS_BREAKPOINT_TRAP(type, code) (type == T_BREAKPOINT)
+#define IS_WATCHPOINT_TRAP(type, code) (0)
+
+#define inst_trap_return(ins) (0)
+#define inst_return(ins) (0)
+#define inst_call(ins) (0)
+#define inst_load(ins) (0)
+#define inst_store(ins) (0)
+
+#define DB_SMALL_VALUE_MAX (0x7fffffff)
+#define DB_SMALL_VALUE_MIN (-0x40001)
+
+#define DB_ELFSIZE 64
+
#endif /* !_MACHINE_DB_MACHDEP_H_ */
OpenPOWER on IntegriCloud