diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-03-15 21:44:19 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-03-15 21:44:19 +0000 |
commit | 272e5ac533a4d733e5bb17d6eb9b1a8ce4c26df5 (patch) | |
tree | 1f73911329d48df3f982381c1abebeeb499bdb8a /sys/arch/hppa/include/db_machdep.h | |
parent | 95b13325476dd5114a97010e5cffb1a38740bb62 (diff) |
rewrite a pmap to use multilevel page tables.
lower 12 bits contain the perms, no unused bits left,
but a couple for off-tlb use (as the ref implemented now).
do not use the hvt, which might get some use later
if proven to speed thigs up, tlb handlers would po
another dozen of insns though, but if that's worth its...
move on the data seg and map kernel text rdonly (idea form fredette),
since all of the page0 mods done before that we are all fine
except for some viper fluff, but later w/ that.
this also picks up a bit more of ddb magic for bpt and ss.
tlb handlers can use a little bit more of attention,
but things, visually, seem to be much faster already, --
sorry, no benchmarks for now.
* effort sponsored in part by the `henry st. old ale house'
* and mr.pete and mr.lee in particular in thier generous entrirety.
* the proj took a little more that 72man*h as it was expected,
* but within murhy's law estimations.
Diffstat (limited to 'sys/arch/hppa/include/db_machdep.h')
-rw-r--r-- | sys/arch/hppa/include/db_machdep.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/sys/arch/hppa/include/db_machdep.h b/sys/arch/hppa/include/db_machdep.h index d4003aa932a..4951a23fb47 100644 --- a/sys/arch/hppa/include/db_machdep.h +++ b/sys/arch/hppa/include/db_machdep.h @@ -1,7 +1,7 @@ -/* $OpenBSD: db_machdep.h,v 1.7 2002/03/14 01:26:32 millert Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.8 2002/03/15 21:44:18 mickey Exp $ */ /* - * Copyright (c) 1998 Michael Shalayeff + * Copyright (c) 1998-2002 Michael Shalayeff * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,6 +35,7 @@ #include <uvm/uvm_extern.h> +#define DB_AOUT_SYMBOLS #define DB_ELF_SYMBOLS #define DB_ELFSIZE 32 @@ -53,8 +54,8 @@ extern db_regs_t ddb_regs; #define BKPT_SIZE sizeof(int) #define BKPT_SET(inst) BKPT_INST -#define IS_BREAKPOINT_TRAP(type, code) 1 -#define IS_WATCHPOINT_TRAP(type, code) 0 +#define IS_BREAKPOINT_TRAP(type, code) ((type) == T_IBREAK) +#define IS_WATCHPOINT_TRAP(type, code) ((type) == T_DBREAK) #define FIXUP_PC_AFTER_BREAK(regs) ((regs)->tf_iioq_head -= sizeof(int)) @@ -90,8 +91,25 @@ static __inline int inst_trap_return(u_int ins) { return (ins & 0xfc001fc0) == 0x00000ca0; } -#define db_clear_single_step(r) ((r)->tf_flags |= 0) -#define db_set_single_step(r) ((r)->tf_flags |= 0) +#if 0 +#define db_clear_single_step(r) ((r)->tf_flags &= ~(PSW_Z)) +#define db_set_single_step(r) ((r)->tf_flags |= (PSW_Z)) +#else +#define SOFTWARE_SSTEP 1 +#define SOFTWARE_SSTEP_EMUL 1 + +static __inline db_addr_t +next_instr_address(db_addr_t addr, int b) { + return (addr + 4); +} + +#define branch_taken(ins,pc,f,regs) branch_taken1(ins, pc, regs) +static __inline db_addr_t +branch_taken1(int ins, db_addr_t pc, db_regs_t *regs) { + return (pc); +} + +#endif int db_valid_breakpoint(db_addr_t); int kdb_trap(int, int, db_regs_t *); |