Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 May 2017 15:41:27 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, Justin Hibbits <jhibbits@FreeBSD.org>
Subject:   FYI: powerpc EXC_LAST==0x2f00 vs. EXC_DEBUG ==0x2f10 and such?
Message-ID:  <0BC58DBC-AC9B-46F8-8F3A-1AEB90622BC4@dsl-only.net>

next in thread | raw e-mail | index | archive | help
[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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0BC58DBC-AC9B-46F8-8F3A-1AEB90622BC4>