qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] Seabios: Fix PkgLength calculation for the SSDT


From: Magnus Christensson
Subject: [Qemu-devel] Re: [PATCH] Seabios: Fix PkgLength calculation for the SSDT.
Date: Tue, 12 Jan 2010 10:10:41 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3

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.

Attachment: 0001-Fix-PkgLength-calculation-for-the-SSDT.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]