OR in the unsigned form of the MCAR lower register.

When ORing in a register_t to a wider integer (vm_paddr_t), it gets sign
extended, so high addresses overwrite the upper word with all 0xf.  Cast to the
unsigned form (u_register_t), to avoid this problem, and get correct addresses
printed.
This commit is contained in:
Justin Hibbits 2016-04-25 03:01:57 +00:00
parent da3aa7a13f
commit 01a40173f7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298560

View File

@ -434,7 +434,7 @@ printtrap(u_int vector, struct trapframe *frame, int isfatal, int user)
(u_long)mfspr(SPR_MSSSR0));
#elif defined(BOOKE)
pa = mfspr(SPR_MCARU);
pa = (pa << 32) | mfspr(SPR_MCAR);
pa = (pa << 32) | (u_register_t)mfspr(SPR_MCAR);
printf(" mcsr = 0x%lx\n", (u_long)mfspr(SPR_MCSR));
printf(" mcar = 0x%jx\n", (uintmax_t)pa);
#endif