[OpenBIOS] Booting SunOS from OpenBIOS

Artyom Tarasenko atar4qemu at gmail.com
Tue Apr 2 21:12:34 CEST 2013

After some debugging, I think the problem is in the current
obp_memalloc realization: it calls ofmem_claim_virt which
expects the address to be precise and thus can not be called
twice for the same virtual address.

Looking at the OpenSolaris headers (
http://fxr.watson.org/fxr/source/sun/sys/promif.h?v=OPENSOLARIS#L83 )

extern  caddr_t         prom_alloc(caddr_t virthint, size_t size, uint_t align);

it seems that "virthint" is just a hint for a virtual address, so
prom_alloc (which is our obp_memalloc) shall not fail unless the whole
RAM is exhausted.
The comment on lines 70-71 says:

"The alloc function should guarantee that it will never return an
invalid pointer."

Someone cares to fix?

Artyom Tarasenko

linux/sparc and solaris/sparc under qemu blog:

More information about the OpenBIOS mailing list