Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Motorola PowerStack II / Estrella 300 and options FIRMWORKSBUGS



Hi,

[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.)

Well, I assumed that you tried to step over the mtsrin instruction via
the OFW debugger.  If you discovered the hang via some other means
(which I'd wonder how actually), I'd need more data.

But if my assumption is correct, you _are_ entering OFW immediately
after this instruction (as the OFW debugger is of course part of OFW).
So OFW doesn't find the environment it expects (which probably includes
even the trap vector of the debugging trap in this case, i.e. OFW doesn't
execute even one of its instructions in this case :-)).

Ciao,
Wolfgang
--
ws%TooLs.DE@localhost     Wolfgang Solfrank, TooLs GmbH         +49-228-985800




Home | Main Index | Thread Index | Old Index