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
On 2002.11.04 17:33 Wolfgang Solfrank wrote:
> > [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.)
> 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.
Aha. The firmware is:
Open Firmware Revision ID . . . . . . . . . . . . . . . . =1.2 RM11
Open Firmware Revision Date . . . . . . . . . . . . . . . =Jun 4, 1998
PowerPC Open Firmware
Version 1.2 RM11 Thu Jun 4 10:20:43 MST 1998
Copyright Motorola 1995-96, All Rights Reserved
Copyright FirmWorks 1995-96, All Rights Reserved
> 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).
And the stuff in sys/arch/powerpc/powerpc/ofwreal.S and
sys/arch/powerpc/mpc6xx/ofw_subr.S is doing this. I noticed that this
MMU state saving is enabled with "options FIRMWORKSBUGS". As there was
done some work in this area lately I suspect that this broke somthing.
1.6 release gets far enough to start init but is unable to get a single
user shell runnning.
> End result is that you cannot expect to run OFW routines (including
> the OFW debugger) at arbitrary points while the kernel is running :-(.
I had time to read some parts of "PowerPC Microprocessor Family: The
Programming Environments for 32-Bit Microprocessors" and now that I know
what the mtsrin instruction does and how the MMU works, I got this
presumption myself. => Use the kernel debugger.
--
tschüß,
Jochen
Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/
Home |
Main Index |
Thread Index |
Old Index