[SeaBIOS] [PATCH] Seabios: Fix PkgLength calculation for the SSDT.

Kevin O'Connor kevin at koconnor.net
Thu Dec 24 01:29:06 CET 2009


On Mon, Dec 14, 2009 at 10:25:14AM +0100, Magnus Christensson wrote:
>>> --- a/src/acpi.c
>>> +++ b/src/acpi.c
>>> @@ -464,10 +464,12 @@ build_ssdt(void)
>>>       // build processor scope header
>>>       *(ssdt_ptr++) = 0x10; // ScopeOp
>>>       if (cpu_length<= 0x3e) {
>>> +        /* Handle 1-4 CPUs with one byte encoding */
>>>           *(ssdt_ptr++) = cpu_length + 1;
>>>       } else {
>>> -        *(ssdt_ptr++) = 0x7F;
>>> -        *(ssdt_ptr++) = (cpu_length + 2)>>  6;
>>> +        /* Handle 5-314 CPUs with two byte encoding */
>>> +        *(ssdt_ptr++) = 0x40 | ((cpu_length + 1)&  0xf);
>>> +        *(ssdt_ptr++) = (cpu_length + 1)>>  4;
>>>      
>> Should be cpu_length + 2 as far as I can tell. The current code is
>> definitely broken.
>>    
> Right. That should be cpu_length +2 in the else-part.

Can you resend the patch with the change?

Thanks,
-Kevin



More information about the SeaBIOS mailing list