From owner-svn-src-all@freebsd.org Sun Dec 31 20:08:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D65E8EA4FBD; Sun, 31 Dec 2017 20:08:17 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2B0D17CA; Sun, 31 Dec 2017 20:08:17 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVK8G7b017305; Sun, 31 Dec 2017 20:08:16 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVK8G4c017304; Sun, 31 Dec 2017 20:08:16 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201712312008.vBVK8G4c017304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 31 Dec 2017 20:08:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327441 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 327441 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 20:08:17 -0000 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",