diff options
author | marcel <marcel@FreeBSD.org> | 2004-07-10 22:59:30 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2004-07-10 22:59:30 +0000 |
commit | 7c010da81a215361ead99eb4a876af2ffb16348d (patch) | |
tree | c8b0f04d69769973cb6fe1928ec74a9b9e908db4 /sys/ia64/include/md_var.h | |
parent | 95c6c430069ffa4db994a89c4ccbf54ff21dc643 (diff) | |
download | FreeBSD-src-7c010da81a215361ead99eb4a876af2ffb16348d.zip FreeBSD-src-7c010da81a215361ead99eb4a876af2ffb16348d.tar.gz |
Update for the KDB framework:
o ksym_start and ksym_end changed type to vm_offset_t.
o Make debugging support conditional upon KDB instead of DDB.
o Call kdb_enter() instead of breakpoint().
o Remove implementation of Debugger().
o Call kdb_trap() according to the new world order.
unwinder:
o s/db_active/kdb_active/g
o Various s/ddb/kdb/g
o Add support for unwinding from the PCB as well as the trapframe.
Abuse a spare field in the special register set to flag whether
the PCB was actually constructed from a trapframe so that we can
make the necessary adjustments.
md_var.h:
o Add RSE convenience macros.
o Add ia64_bsp_adjust() to add or subtract from BSP while taking
NaT collections into account.
Diffstat (limited to 'sys/ia64/include/md_var.h')
-rw-r--r-- | sys/ia64/include/md_var.h | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/sys/ia64/include/md_var.h b/sys/ia64/include/md_var.h index 4946709..99d03dd42 100644 --- a/sys/ia64/include/md_var.h +++ b/sys/ia64/include/md_var.h @@ -33,6 +33,33 @@ * Miscellaneous machine-dependent declarations. */ +struct ia64_fdesc { + uint64_t func; + uint64_t gp; +}; + +#define FDESC_FUNC(fn) (((struct ia64_fdesc *) fn)->func) +#define FDESC_GP(fn) (((struct ia64_fdesc *) fn)->gp) + +/* Convenience macros to decompose CFM & ar.pfs. */ +#define IA64_CFM_SOF(x) ((x) & 0x7f) +#define IA64_CFM_SOL(x) (((x) >> 7) & 0x7f) +#define IA64_CFM_SOR(x) (((x) >> 14) & 0x0f) +#define IA64_CFM_RRB_GR(x) (((x) >> 18) & 0x7f) +#define IA64_CFM_RRB_FR(x) (((x) >> 25) & 0x7f) +#define IA64_CFM_RRB_PR(x) (((x) >> 32) & 0x3f) + +/* Concenience function (inline) to adjust backingstore pointers. */ +static __inline uint64_t +ia64_bsp_adjust(uint64_t bsp, int nslots) +{ + int bias = ((unsigned int)bsp & 0x1f8) >> 3; + nslots += (nslots + bias + 63*8) / 63 - 8; + return bsp + (nslots << 3); +} + +#ifdef _KERNEL + extern char sigcode[]; extern char esigcode[]; extern int szsigcode; @@ -43,14 +70,6 @@ struct reg; struct thread; struct trapframe; -struct ia64_fdesc { - u_int64_t func; - u_int64_t gp; -}; - -#define FDESC_FUNC(fn) (((struct ia64_fdesc *) fn)->func) -#define FDESC_GP(fn) (((struct ia64_fdesc *) fn)->gp) - void busdma_swi(void); int copyout_regstack(struct thread *, uint64_t *, uint64_t *); void cpu_mp_add(u_int, u_int, u_int); @@ -70,4 +89,6 @@ int syscall(struct trapframe *); void trap(int, struct trapframe *); int unaligned_fixup(struct trapframe *, struct thread *); +#endif /* _KERNEL */ + #endif /* !_MACHINE_MD_VAR_H_ */ |