Move the implementation of kdb_cpu_trap() from <machine/kdb.h> to

machdep.c. This makes it easier to add conditional code based on
options.
This commit is contained in:
Marcel Moolenaar 2014-03-16 22:56:22 +00:00
parent 2b567b38b4
commit c8afe4038e
2 changed files with 15 additions and 10 deletions

View File

@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$");
#include <machine/elf.h>
#include <machine/fpu.h>
#include <machine/intr.h>
#include <machine/kdb.h>
#include <machine/mca.h>
#include <machine/md_var.h>
#include <machine/pal.h>
@ -561,6 +562,18 @@ spinlock_exit(void)
intr_restore(intr);
}
void
kdb_cpu_trap(int vector, int code __unused)
{
__asm __volatile("flushrs;;");
/* Restart after the break instruction. */
if (vector == IA64_VEC_BREAK &&
kdb_frame->tf_special.ifa == IA64_FIXED_BREAK)
kdb_frame->tf_special.psr += IA64_PSR_RI_1;
}
void
map_vhpt(uintptr_t vhpt)
{

View File

@ -35,6 +35,8 @@
#define KDB_STOPPEDPCB(pc) (&(pc)->pc_md.pcb)
void kdb_cpu_trap(int, int);
static __inline void
kdb_cpu_clear_singlestep(void)
{
@ -62,14 +64,4 @@ kdb_cpu_sync_icache(unsigned char *addr, size_t size)
}
}
static __inline void
kdb_cpu_trap(int vector, int _)
{
__asm __volatile("flushrs;;");
if (vector == IA64_VEC_BREAK &&
kdb_frame->tf_special.ifa == IA64_FIXED_BREAK)
kdb_frame->tf_special.psr += IA64_PSR_RI_1;
}
#endif /* _MACHINE_KDB_H_ */