[OpenBIOS] Booting SunOS from OpenBIOS
mark.cave-ayland at ilande.co.uk
Sat Apr 6 09:16:59 CEST 2013
On 05/04/13 21:08, Tarl Neustaedter wrote:
> On 2013-Apr-5 15:40 , Artyom Tarasenko wrote:
>> OFMEM: ofmem_map_page_range ffc7d000 -> 006f7d000 00001000 mode 000000bc
>> OFMEM: ofmem_claim phys=ffffffffffffffff size=00014000 align=00020000
>> OFMEM: ofmem_claim_virt virt=00000000 size=00014000 align=00020000
>> OFMEM: ofmem_map_page_range ffc60000 -> 006f60000 00014000 mode 000000bc
>> ^^^^ this one
> Wherever that's coming from, that looks like an allocator doing
> descending addresses.
>> OFMEM: ofmem_map_page_range ffc5c000 -> 006f78000 00001000 mode 000000bc
>> OFMEM: ofmem_claim phys=ffffffffffffffff size=00002000 align=00002000
>> OFMEM: ofmem_claim_virt virt=ffc5d000 size=00002000 align=00000000
>> OFMEM: ofmem_map_page_range ffc5d000 -> 006f5e000 00002000 mode 000000bc
>> ...OFMEM: ofmem_claim phys=ffffffffffffffff size=00002000 align=00002000
>> OFMEM: ofmem_claim_virt virt=ffc5f000 size=00002000 align=00000000
>> OFMEM: Non-free virtual memory claimed!
>> ^^^^ overlaps with this one.
> This allocator, whatever it is has been doing ascending addresses. This
> actually looks like you simply ran out of room.
Ah now I see. It looks as if kadb assumes that it has free use of the
region from 0xffc00000 but the OFMEM allocator starts auto-allocating
memory from beneath the internal heap which is below the ROM image at
0xffd00000. As Tarl rightly points out, as the allocations grow then
kadb tries to grab an area of memory we have already claimed which
causes the overlap error.
Does the attached patch against SVN trunk enable you to get into kadb?
It's the same as my last patch except for the following addition:
@@ -61,7 +61,7 @@ ucell ofmem_arch_get_heap_top(void)
- return (ucell)TOP_OF_RAM;
+ return (ucell)0xff000000;
So when we are auto-allocating from OFMEM, rather than starting from
beneath the internal heap, we simply start auto-allocating from
0xff000000 downwards which should leave the 0xffc00000 region being used
by kadb well alone. A quick test with the patch shows that my Solaris 8
image can still boot both normally and into kadb.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2155 bytes
Desc: not available
More information about the OpenBIOS