From owner-svn-src-all@freebsd.org Mon Nov 30 02:40:42 2015 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 EB4A8A33F17; Mon, 30 Nov 2015 02:40:42 +0000 (UTC) (envelope-from jhibbits@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 969B21980; Mon, 30 Nov 2015 02:40:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU2efWR029434; Mon, 30 Nov 2015 02:40:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU2efnn029432; Mon, 30 Nov 2015 02:40:41 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201511300240.tAU2efnn029432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 30 Nov 2015 02:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291463 - in head/sys/powerpc: include powerpc X-SVN-Group: head 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.20 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: Mon, 30 Nov 2015 02:40:43 -0000 Author: jhibbits Date: Mon Nov 30 02:40:41 2015 New Revision: 291463 URL: https://svnweb.freebsd.org/changeset/base/291463 Log: Print machine check address for Book-E. Bits in mcsr indicate if the address is valid, and whether it's a physical address or effective address. Sponsored by: Alex Perez/Inertial Computing Modified: head/sys/powerpc/include/spr.h head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Mon Nov 30 02:23:56 2015 (r291462) +++ head/sys/powerpc/include/spr.h Mon Nov 30 02:40:41 2015 (r291463) @@ -652,7 +652,9 @@ #elif defined(BOOKE) +#define SPR_MCARU 0x239 /* ..8 Machine Check Address register upper bits */ #define SPR_MCSR 0x23c /* ..8 Machine Check Syndrome register */ +#define SPR_MCAR 0x23d /* ..8 Machine Check Address register */ #define SPR_ESR 0x003e /* ..8 Exception Syndrome Register */ #define ESR_PIL 0x08000000 /* Program interrupt - illegal */ Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Mon Nov 30 02:23:56 2015 (r291462) +++ head/sys/powerpc/powerpc/trap.c Mon Nov 30 02:40:41 2015 (r291463) @@ -401,6 +401,9 @@ static void printtrap(u_int vector, struct trapframe *frame, int isfatal, int user) { uint16_t ver; +#ifdef BOOKE + vm_paddr_t pa; +#endif printf("\n"); printf("%s %s trap:\n", isfatal ? "fatal" : "handled", @@ -429,7 +432,10 @@ printtrap(u_int vector, struct trapframe printf(" msssr0 = 0x%lx\n", (u_long)mfspr(SPR_MSSSR0)); #elif defined(BOOKE) - printf(" mcsr = 0x%lx\n", (u_long)mfspr(SPR_MCSR)); + pa = mfspr(SPR_MCARU); + pa = (pa << 32) | mfspr(SPR_MCAR); + printf(" mcsr = 0x%lx\n", (u_long)mfspr(SPR_MCSR)); + printf(" mcar = 0x%jx\n", (uintmax_t)pa); #endif break; }