[OpenBIOS] Booting SunOS from OpenBIOS

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri Apr 5 11:20:09 CEST 2013


On 05/04/13 02:23, Artyom Tarasenko wrote:

>> That's interesting. You're asking for a page size (0x2000) on a non-page
>> boundary (0xffc6.5000). The complaint is because it extends far enough to
>> overlap with what the map_page_range above (0xffc6.6000).
>
> Yes. After looking more carefully I think it goes wrong before this point:
>
> OFMEM: ofmem_claim phys=ffffffffffffffff size=00001000 align=00001000
> OFMEM: ofmem_claim_virt virt=00000000 size=00001000 align=00001000
> OFMEM: ofmem_map_page_range ffc7f000 ->  006f7f000 00001000 mode 000000bc
> OFMEM: ofmem_claim phys=ffffffffffffffff size=00001000 align=00001000
> OFMEM: ofmem_claim_virt virt=00000000 size=00001000 align=00001000
> OFMEM: ofmem_map_page_range ffc7e000 ->  006f7e000 00001000 mode 000000bc
> OFMEM: ofmem_claim phys=ffffffffffffffff size=00001000 align=00001000
> OFMEM: ofmem_claim_virt virt=00000000 size=00001000 align=00001000
> 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=00014000
> OFMEM: bad alignment 81920
>
> ^^^ here is something OpenBIOS doesn't like.

Ah yes. Since in the case where va == NULL we've set align = size, we 
still need to round align to the nearest power of 2. Does the attached 
patch help at all?

Note that this is just a proof-of-concept patch. Since the specification 
is quite clear about this behaviour, if it works then I'll move the 
power of 2 rounding directly into OFMEM so cases like this are handled 
automatically.


ATB,

Mark.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openbios-align-rounding.patch
Type: text/x-patch
Size: 1722 bytes
Desc: not available
URL: <http://www.openbios.org/pipermail/openbios/attachments/20130405/d0a3f0d5/attachment.patch>


More information about the OpenBIOS mailing list