Subject: ofwboot problems on ofppc
To: None <,>
From: Aymeric Vincent <>
List: port-powerpc
Date: 06/25/2003 21:21:30

we are currently trying together with a friend to run NetBSD/ofppc
under psim.

Among the many weird things that we see, one of the easiest to fix
seems to be ofwboot.

However, the OF_seek() function in ofppc/stand/ofwboot/Locore.c takes
a u_quad_t as parameter, and can't printf() the right value it gets
passed (noticed because it passes bad values to the openfirmware).

Does it ring a bell to anyone?

I tried the following things:

- compile with -mno-multiple, with -O, with -O2, with -ffreestanding
  -> no change
- compile with no optimization -> ofwboot crashes (!)
- ofdev.c which calls OF_seek() in strategy() lacked the "openfirm.h"
#include, but even with it included, it changes nothing.

Loading the kernel directly works but fails miserably, whichever
executable we give it instead of init: e.g. :

root device: ofdisk0c
dump device (default ofdisk0b): 

file system (default generic): 

root on ofdisk0c dumps on ofdisk0b
root file system type: cd9660
init path (default /sbin/init): /rescue/date
init: trying /rescue/date
panic: init died (signal 0, exit 0)
Stopped in pid 1.1 (date) at    0x1c9684:       lwz     r0, r1, 0x14

I suspect "init" could be passed bad arguments just because the kernel
doesn't get them from ofwboot, and that's why I'm trying harder to
make ofwboot work.