[SeaBIOS] SeaBIOS error with Juniper FreeBSD kernel

Bjørn Mork bjorn at mork.no
Tue Aug 2 11:33:09 CEST 2011


"Kevin O'Connor" <kevin at koconnor.net> writes:
> On Mon, Aug 01, 2011 at 03:49:11PM +0200, Bjørn Mork wrote:
>> I just confirmed the issue running
>> 
>>  "JUNOS 11.1R3.5 built 2011-06-25 00:17:21 UTC"
>> 
>> which is as new as it officially gets at the moment.
> [...]
>> Also confirmed that 11.1R3.5 is working with SeaBIOS modified as
>> follows:
> [...]
>> -    void *finaltable = malloc_high(structure_table_length);
>> +    void *finaltable = malloc_fseg(structure_table_length);
>
> I'm not really sure how best to handle this.  The smbios table can be
> larger than the current space reserved for the f-segment (when there
> are a large number of CPUs).
>
> Some ideas:
>
> There is actually space in the f-segment that is unused, but not given
> to the malloc_fseg pool.  That space could be given to the pool -
> though the available space will still vary depending on the code size.
>
> It's also possible to relocate the 32bit "run-time" code to high
> memory which would then free up more space in the f-segment (at the
> cost of some high memory being reserved from the OS).  As above,
> though, the f-segment is still fundamentally limited by the 16bit code
> size.
>
> Also, it's possible the code could try to use the f-segment if there
> are less than say 16 cpus and use high memory when more cpus are
> present.

How about a variant over the last suggestion: Don't actually care bout
the number of CPUs, but just fall back to malloc_high if malloc_fseg
fails?

The attached patch works-for-me, and boots JUNOS as long as the number
of CPUs is low enough for malloc_fseg to succeed.


Bjørn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-SMBIOS-use-malloc_fseg-to-avoid-boot-error-on-JUNOS.patch
Type: text/x-diff
Size: 2248 bytes
Desc: not available
URL: <http://www.seabios.org/pipermail/seabios/attachments/20110802/374f0bf1/attachment.bin>


More information about the SeaBIOS mailing list