[OpenBIOS] Sparc64 memory allocation problem
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Wed Aug 25 18:46:17 CEST 2010
Blue Swirl wrote:
>> Hmmm I didn't think that elf_load() should be being called by the openBSD
>> IEEE-1275 bootblock at all (it looks like the source just opens the file as
>> a standard device) - is it?
>
> Yes, I think the problem is with the next stage loader.
I took a quick look at the openBSD loader again, and it appears that it
moves load-base up to 0x6000 and then calls init-program which would
imply that init-program should sometimes claim the memory, and sometimes
not :( A quick play with openBSD 4.7 seems to show the problem has been
fixed there, which made me think they are relying on another assumption.
I did find an interesting comment in the OpenSolaris bootblock source
though:
\ OBP doesn't allocate memory for elf
\ programs, it assumes they'll fit
\ under the default 10MB limit
Does that mean there should be a default mapping on SPARC64 whereby the
first 10MB of memory (0 - 0xa00000), both physical and virtual, are
mapped together? This would explain why openBSD loads at 0x800000, and
by doing this we would mark that region of physical memory as being used
which means the phys_mem allocator would then choose somewhere different...
ATB,
Mark.
--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
Sirius Labs: http://www.siriusit.co.uk/labs
More information about the OpenBIOS
mailing list