Port-macppc archive

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

Re: [PATCH] Incorrect segment 0 initialization for PMAC G5



Hello,

On Mon, 01 Apr 2013 17:25:30 +0200
Phileas Fogg <phileas-fogg%mail.ru@localhost> wrote:

> Hi Michael,
> 
> i prepared the first bunch of patches for G5 support.
> These patches fix MMU issues on G5.
> I tested the patches with NetBSD HEAD.
> Please review them and tell me if it's OK.
> After applying these patches your NetBSD kernel should boot in virtual
> mode and panic in init_interrupt. All patches were tested by me
> with netbooting.

I'll look at them in a minute.

> Patch description
> ------------------
> 
> POWERMAC_G5_11_2.patch   :  My kernel config which i used
> 
> locore.S.patch           :  Enable 64bit bridge mode at boot
> 
> trap_subr.S.patch        :  Enable 64bit bridge mode when entering an
>                              exception handler
> 
> pmap.c.patch             :  Disable kernel map in pmap_bootstrap
> 
> ofw_rascons.c.patch      :  Do not use ROM font if kernel option
>                              OFWOEA_WSCONS_NO_ROM_FONT is defined.
>                              I'm having problems with ROM font currently,
>                              my machine hangs, so that's why i added
>                              a new kernel option.
> 
> ofwoea_machdep.c.patch   :  Make OFW code+data mapping machine
>                              independent and map video frame buffer into
>                              pmap_kernel for console.
>                              Also fix ofw_map segments.

> The display console can be used only after MMU was enabled.
> It's safe to use it before too but you won't see any messages
> or you will see some strange things on display.

It worked when I was messing with it, but that was more than a year
ago. I don't think it's much of a restriction anyway since the MMU is
enabled long before going into autoconfig.

> In virtual mode i set GUARDED and CACHE-INHIBITED attributes for video
> frame buffer addresses and the it works as expected.

No need to set GUARDED - we don't really care if writes to video memory
are in strict order. In fact we explicitly disable it for userland
( think Xserver ) mappings of video memory (but not registers of
course), for a small but measurable speedup.

> For some reason i'm having trouble with ROM font, don't know why but
> my machine hangs if i use it. I tried to map it with MMU, it didn't
> help. OFWOEA_WSCONS_NO_ROM_FONT disables it.

We have the same problem on sparc64. It's not like we absolutely need
the ROM font anyway, it's just cosmetics to mimic firmware output to a
degree, until a driver takes over. Nothing to lose sleep about in my
opinion.

have fun
Michael


Home | Main Index | Thread Index | Old Index