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: Mon, 14 Dec 2009 10:25:14 +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/13/2009 04:14 PM, Kevin O'Connor wrote:
----- Forwarded message from Gleb Natapov<address@hidden>  -----

From: Gleb Natapov<address@hidden>
To: Kevin O'Connor<address@hidden>
Date: Sun, 13 Dec 2009 15:18:08 +0200
Subject: Re: address@hidden: [coreboot] [PATCH] Seabios: Fix PkgLength
        calculation for the SSDT.]

On Thu, Dec 10, 2009 at 08:55:30AM -0500, Kevin O'Connor wrote:
FYI.

----- Forwarded message from Magnus Christensson<address@hidden>  -----

From: Magnus Christensson<address@hidden>
To: address@hidden
Date: Thu, 26 Nov 2009 13:22:14 +0100
Subject: [coreboot] [PATCH] Seabios: Fix PkgLength calculation for the SSDT.

See attached patch.

M.


> From d9dc0f50b2ce756e8a3b4ede0a8ecbe76f2afcb8 Mon Sep 17 00:00:00 2001
From: Magnus Christensson<address@hidden>
Date: Wed, 25 Nov 2009 16:26:58 +0100
Subject: [PATCH 13/13] Fix PkgLength calculation for the SSDT.

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

diff --git a/src/acpi.c b/src/acpi.c
index 843af69..88007ae 100644
--- 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.

M.





reply via email to

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