Subject: OFW bootloader needs OF_claim() before OF_read()?
To: None <port-macppc@netbsd.org>
From: Brian R. Gaeke <brg@dgate.org>
List: port-macppc
Date: 04/29/2004 23:20:05
Hello,

I still haven't succeeded in completely loading a netbsd kernel
using ofwboot.xcf on my G5, but I noticed that the OF_read() call was
failing (return value = 0xffffffff, or -1) when it was trying to read
the kernel text section into memory starting at address 0x100000.

If I insert OF_claim() calls in loadfile_elf32.c just before every
READ() call, such that all the area that is being read into is first
claimed, then I get much farther in the loading process - it seems
to be able to read all the kernel text, data & bss, but then it
fails to read the symbol table, apparently. This failure I haven't
figured out yet.

Anyway, I'm kind of fuzzy on the intended semantics of OF_claim().
Is it supposed to be true that you need to OF_claim() any memory
which you are going to OF_read() into?  Is there a reference for
this sort of information?

-Brian