[some printfs later]
sys/arch/powerpc/mpc6xx/pmap.c:pmap_bootstrap():
/*
* Initialize kernel pmap and hardware.
*/
for (i = 0; i < 16; i++) {
pmap_kernel()->pm_sr[i] = EMPTY_SEGMENT;
__asm __volatile ("mtsrin %0,%1"
:: "r"(EMPTY_SEGMENT), "r"(i << ADDR_SR_SHFT));
}
It hangs at the first execution of the inline ASM instruction.
That's to be expexcted: the kernel is modifying the mmu configuration,
but OpenFirmware isn't aware of that.
But why is the machine crashing when the MMU is reinitialized? I would
expect a crash at the next call to the OFW. Or is it because the kernel
expects to run still in "real" mode, i.e. MMU turned off, but the MMU is
active and so it crashes as it reloads the segment registers? (PSL_IR
and PSL_DR are 1 at that time.)