[OpenBIOS] fcode rom loading
breuerr at mc.net
Tue Jun 28 15:49:33 CEST 2011
Bob Breuer wrote:
> I'm trying to get the sparc32 OpenBIOS to load an fcode rom, but it's
> not working. After byte-load, it reports out of memory.
> Here's the steps I'm using to setup a simple rom which just sets the
> device name to "QEMU,test", and then trying to run it:
> fd000000 1000 l!
> 00000020 1004 l!
> 12095145 1008 l!
> 4d552c74 100c l!
> 65737401 1010 l!
> 1412046e 1014 l!
> 616d6501 1018 l!
> 10000000 101c l!
> cd /iommu/sbus
> " /iommu/sbus" select-dev
> 1000 1 byte-load
> Here, OpenBIOS will report out of memory.
Turns out you don't even need any fcode to trigger this, as it does the
failing allocation in alloc-fcode-table:
4096 cells alloc-mem to fcode-table
Which looks like it tries to allocate 64k.
In arch/sparc32/openbios.c, MEMORY_SIZE is defined to 16k, which I think
will limit the malloc size. There's another define of 256k in
arch/sparc32/ofmem_sparc32.c that may also affect this.
On an SS-20, I can allocate at least 4M without problem:
ok 400000 alloc-mem
Are there any known problems with bumping up the size for both the 16k
and 256k limits?
More information about the OpenBIOS