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

On 03/30/2013 01:16 PM, Michael wrote:

On Fri, 29 Mar 2013 20:26:14 +0100
Phileas Fogg <phileas-fogg%mail.ru@localhost> wrote:

3. Currently i'm stuck in
sys/arch/macppc/macppc/interrupts.c:init_interrupts because G5's U4 MPIC
is not found.

An extra match line in macppc/interrupts.c:init_openpic() should do it ( 
assuming it is sufficiently OpenPIC-like ).

Why does NetBSD require the interrupt controller to be initialized
before configure process, why not use autoconf to autodetect interrupt
controllers too.

Because devices that need to register interrupts may attach before the
interrupt controller does. Also, there may be more than one ( for
example, some old world PowerBooks have two cascaded ohare PICs, some
ofppc or prep boxes have OpenPIC or IVR and an i8259 ) which would
complicate things further if each one would attach on its own. It's
just simpler this way.

4. The function ofwoea_initppc maps the OFW code+data at 0xff800000 to
0x3fc00000. And that's not correct on my machine. On my G5 it's mapped
to 0x7fc00000.

Yes, this needs to be fixed. I think the code assumes 1GB of RAM and
the address should be LOW_RAM_SIZE - 0x00400000.

have fun

Thanks for the explanation.

I made more progress in the last days :)

genfb attaches now to my NVidia card but it has some issues with color
map setting and the screen is black. Disabling cmap callback fixes the

Nvidia card is attached to a U4 PCI-E bridge. I modified u3 driver
slightly and got it working perfectly.

Console is real fast now :)

And i managed to build a small ramdisk and insert it into my netbsd
kernel. Root filesystem is mounted correctly now and init process is started too but i don't have a keyboard because i still haven't fixed
OpenPIC issues.

And i had some issues with OpenFirmware and a netbsd kernel with ~10MB
memory disk filesystem. I was getting "CLAIM failed" messages from OFW, grrr.
I figured out it was because of the default 'load-base' address which is
0x800000. The address allows one to load netbsd ELFs of size at most
~7MB because the netbsd kernel is loaded at address 0x100000.
Moving the 'load-base' to 0x2000000 fixed it. Now i can load huge
netbsd kernels over network.


Home | Main Index | Thread Index | Old Index