From owner-freebsd-ppc@freebsd.org Tue May 16 22:41:35 2017 Return-Path: Delivered-To: freebsd-ppc@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 C1D08D6E5CD for ; Tue, 16 May 2017 22:41:35 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-7.reflexion.net [208.70.210.7]) (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 787D164C for ; Tue, 16 May 2017 22:41:35 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 8486 invoked from network); 16 May 2017 22:44:59 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 16 May 2017 22:44:59 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.0) with SMTP; Tue, 16 May 2017 18:41:28 -0400 (EDT) Received: (qmail 14021 invoked from network); 16 May 2017 22:41:28 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 16 May 2017 22:41:28 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id C238DEC7C08; Tue, 16 May 2017 15:41:27 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: FYI: powerpc EXC_LAST==0x2f00 vs. EXC_DEBUG ==0x2f10 and such? Message-Id: <0BC58DBC-AC9B-46F8-8F3A-1AEB90622BC4@dsl-only.net> Date: Tue, 16 May 2017 15:41:27 -0700 To: FreeBSD PowerPC ML , Justin Hibbits X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 22:41:35 -0000 [Context: I'm having problems with production-style kernel builds for TARGET_ARCH=3Dpowerpc (used an old PowerMac G5 so-called "Quad Core") getting occasional panics that involve oddities like: frame->exc =3D=3D 0x903a64e in the fatal kernel trap information on the console display. I'm not claiming the below is related but while looking around to figure out how to investigate I ran into what I report below. (The first 2 are from a block of 4xx / 85xx EXC_'s). ] =46rom /usr/src/sys/powerpc/include/trap.h : #define EXC_DEBUG 0x2f10 /* Debug trap */ #define EXC_VECAST_E 0x2f20 /* Altivec Assist (Book-E) */ #define EXC_LAST 0x2f00 /* Last possible exception = vector */ #define EXC_AST 0x3000 /* Fake AST vector */ /* Trap was in user mode */ #define EXC_USER 0x10000 And also: /usr/src/sys/powerpc/ofw/ofw_machdep.c:char = save_trap_init[0x2f00]; /* EXC_LAST */ /usr/src/sys/powerpc/ofw/ofw_machdep.c:char = save_trap_of[0x2f00]; /* EXC_LAST */ /usr/src/sys/powerpc/include/profile.h:#define __PROFILE_VECTOR_TOP = (EXC_LAST + 0x100) These makes it look like EXC_LAST and some literal 0x2f00's might be insufficient for some contexts. If they are sufficient for those contexts some notes about the relationships of the beyond-last ones would seem appropriate. The other power specific references for EXC_LAST are below. Note the __syncicache ones and bcopy ones, for example. /usr/src/sys/powerpc/aim/mmu_oea.c: if (phys_avail[j] < = EXC_LAST) /usr/src/sys/powerpc/aim/mmu_oea.c: phys_avail[j] +=3D= EXC_LAST; /usr/src/sys/powerpc/aim/mmu_oea64.c: if (phys_avail[j] < = EXC_LAST) /usr/src/sys/powerpc/aim/mmu_oea64.c: phys_avail[j] +=3D= EXC_LAST; /usr/src/sys/powerpc/aim/aim_machdep.c: for (trap =3D EXC_RST; trap < = EXC_LAST; trap +=3D 0x20) /usr/src/sys/powerpc/aim/aim_machdep.c: __syncicache(EXC_RSVD, EXC_LAST = - EXC_RSVD); /usr/src/sys/powerpc/powerpc/trap.c: { EXC_LAST, NULL } /usr/src/sys/powerpc/powerpc/trap.c: for (pe =3D powerpc_exceptions; = pe->vector !=3D EXC_LAST; pe++) { /usr/src/sys/powerpc/ofw/ofw_machdep.c: bcopy((void *)EXC_RST, = save_trap_vec, EXC_LAST - EXC_RST); /usr/src/sys/powerpc/ofw/ofw_machdep.c: bcopy(restore_trap_vec, (void = *)EXC_RST, EXC_LAST - EXC_RST); /usr/src/sys/powerpc/ofw/ofw_machdep.c: __syncicache(EXC_RSVD, EXC_LAST = - EXC_RSVD); =3D=3D=3D Mark Millard markmi at dsl-only.net