svn commit: r327441 - head/sys/powerpc/powerpc
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sun Dec 31 20:08:17 UTC 2017
Author: nwhitehorn
Date: Sun Dec 31 20:08:16 2017
New Revision: 327441
URL: https://svnweb.freebsd.org/changeset/base/327441
Log:
Provide relative, as well as absolute, addresses in trap panic panics. This
makes it easier to cross-correlate them with instruction listings without
worrying about where the kernel was relocated to.
MFC after: 1 week
Modified:
head/sys/powerpc/powerpc/trap.c
Modified: head/sys/powerpc/powerpc/trap.c
==============================================================================
--- head/sys/powerpc/powerpc/trap.c Sun Dec 31 19:24:13 2017 (r327440)
+++ head/sys/powerpc/powerpc/trap.c Sun Dec 31 20:08:16 2017 (r327441)
@@ -97,6 +97,8 @@ static int handle_user_slb_spill(pmap_t pm, vm_offset_
extern int n_slbs;
#endif
+extern vm_offset_t __startkernel;
+
#ifdef KDB
int db_trap_glue(struct trapframe *); /* Called from trap_subr.S */
#endif
@@ -123,6 +125,7 @@ static struct powerpc_exception powerpc_exceptions[] =
{ EXC_EXI, "external interrupt" },
{ EXC_ALI, "alignment" },
{ EXC_PGM, "program" },
+ { EXC_HEA, "hypervisor emulation assistance" },
{ EXC_FPU, "floating-point unavailable" },
{ EXC_APU, "auxiliary proc unavailable" },
{ EXC_DECR, "decrementer" },
@@ -484,9 +487,11 @@ printtrap(u_int vector, struct trapframe *frame, int i
printf(" esr = 0x%b\n",
(int)frame->cpu.booke.esr, ESR_BITMASK);
#endif
- printf(" srr0 = 0x%" PRIxPTR "\n", frame->srr0);
+ printf(" srr0 = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n",
+ frame->srr0, frame->srr0 - (__startkernel - KERNBASE));
printf(" srr1 = 0x%lx\n", (u_long)frame->srr1);
- printf(" lr = 0x%" PRIxPTR "\n", frame->lr);
+ printf(" lr = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n",
+ frame->lr, frame->lr - (__startkernel - KERNBASE));
printf(" curthread = %p\n", curthread);
if (curthread != NULL)
printf(" pid = %d, comm = %s\n",
More information about the svn-src-all
mailing list