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:
parent
66299e89cd
commit
e6cff0f7c1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user