Subject: Re: Motorola PowerStack II / Estrella 300 and options FIRMWORKSBUGS
To: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
From: Wolfgang Solfrank <ws@tools.de>
List: port-powerpc
Date: 11/04/2002 17:33:14
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.

While newer PPC bindings to OFW specify methods for interoperability
between OFW and the "client" (which is the kernel in our case), the
implementation in the FirePower machine (and probably in your box, too)
predate this specification, and thus there is no possibility for the
kernel to tell OFW about the changed mapping.

Therefor, NetBSD/ofppc does it the hard way by preserving the mmu
configuration found at the start and switching back to this configuration
whenever entering OFW (and disabling interrupts while doing so).

End result is that you cannot expect to run OFW routines (including the
OFW debugger) at arbitrary points while the kernel is running :-(.

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