diff mbox

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

Message ID 4B4C3C91.8090606@virtutech.com
State New
Headers show

Commit Message

Magnus Christensson Jan. 12, 2010, 9:10 a.m. UTC
On 12/24/2009 01:29 AM, Kevin O'Connor wrote:
> 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?
>    
Attached (sorry for the delay).

M.

Comments

Kevin O'Connor Jan. 12, 2010, 1:36 p.m. UTC | #1
On Tue, Jan 12, 2010 at 10:10:41AM +0100, Magnus Christensson wrote:
> On 12/24/2009 01:29 AM, Kevin O'Connor wrote:
> >On Mon, Dec 14, 2009 at 10:25:14AM +0100, Magnus Christensson wrote:
> >>>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?
> Attached (sorry for the delay).

Thanks.  Commit 3012af18.
-Kevin
Avi Kivity Feb. 8, 2010, 10:19 a.m. UTC | #2
On 01/12/2010 03:36 PM, Kevin O'Connor wrote:
> On Tue, Jan 12, 2010 at 10:10:41AM +0100, Magnus Christensson wrote:
>    
>> On 12/24/2009 01:29 AM, Kevin O'Connor wrote:
>>      
>>> On Mon, Dec 14, 2009 at 10:25:14AM +0100, Magnus Christensson wrote:
>>>        
>>>>> 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?
>>>        
>> Attached (sorry for the delay).
>>      
> Thanks.  Commit 3012af18.
>    

Without this patch, Windows 2008 r2 won't boot with more than 4 cpus.  
Kevin/Anthony, can you coordinate a SeaBIOS release including this patch?

Probably needed for qemu 0.12 as well.
Anthony Liguori Feb. 8, 2010, 5:15 p.m. UTC | #3
On 02/08/2010 04:19 AM, Avi Kivity wrote:
> On 01/12/2010 03:36 PM, Kevin O'Connor wrote:
>> On Tue, Jan 12, 2010 at 10:10:41AM +0100, Magnus Christensson wrote:
>>> On 12/24/2009 01:29 AM, Kevin O'Connor wrote:
>>>> On Mon, Dec 14, 2009 at 10:25:14AM +0100, Magnus Christensson wrote:
>>>>>> 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?
>>> Attached (sorry for the delay).
>> Thanks.  Commit 3012af18.
>
> Without this patch, Windows 2008 r2 won't boot with more than 4 cpus.  
> Kevin/Anthony, can you coordinate a SeaBIOS release including this patch?
>
> Probably needed for qemu 0.12 as well.

Kevin,

Just let me know when you cut a new release.  Did we ever decide what to 
do about a stable branch?

Regards,

Anthony Liguori
Kevin O'Connor Feb. 9, 2010, 12:38 a.m. UTC | #4
On Mon, Feb 08, 2010 at 11:15:03AM -0600, Anthony Liguori wrote:
> On 02/08/2010 04:19 AM, Avi Kivity wrote:
> >Without this patch, Windows 2008 r2 won't boot with more than 4
> >cpus.  Kevin/Anthony, can you coordinate a SeaBIOS release
> >including this patch?
> >
> >Probably needed for qemu 0.12 as well.
> 
> Kevin,
> 
> Just let me know when you cut a new release.  Did we ever decide
> what to do about a stable branch?

I created the branch "0.5.1-stable" and cherry-picked 2d3f0f5e and
3012af18.  I'll tag a release (and update the build version) if you're
happy with just those two changes.

-Kevin
diff mbox

Patch

From 183a34ee3a218bf64cb440e456628d361af98bfc Mon Sep 17 00:00:00 2001
From: Magnus Christensson <mch@virtutech.com>
Date: Wed, 25 Nov 2009 16:26:58 +0100
Subject: [PATCH] Fix PkgLength calculation for the SSDT.

Signed-off-by: Magnus Christensson <mch@virtutech.com>
---
 src/acpi.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/acpi.c b/src/acpi.c
index f613b03..244536a 100644
--- a/src/acpi.c
+++ b/src/acpi.c
@@ -429,10 +429,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 + 2) & 0xf);
+        *(ssdt_ptr++) = (cpu_length + 2) >> 4;
     }
     *(ssdt_ptr++) = '_'; // Name
     *(ssdt_ptr++) = 'P';
-- 
1.6.2.5