From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUcm7-0000dj-K6 for qemu-devel@nongnu.org; Tue, 12 Jan 2010 04:10:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUcm0-0000ar-Sz for qemu-devel@nongnu.org; Tue, 12 Jan 2010 04:10:52 -0500 Received: from [199.232.76.173] (port=37228 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUcm0-0000ae-Gd for qemu-devel@nongnu.org; Tue, 12 Jan 2010 04:10:48 -0500 Received: from dns.vtab.com ([62.20.90.195]:54062 helo=oden.vtab.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NUclz-0005Nn-Lp for qemu-devel@nongnu.org; Tue, 12 Jan 2010 04:10:48 -0500 Message-ID: <4B4C3C91.8090606@virtutech.com> Date: Tue, 12 Jan 2010 10:10:41 +0100 From: Magnus Christensson MIME-Version: 1.0 References: <20091213151408.GB22854@morn.localdomain> <4B26047A.60409@virtutech.com> <20091224002906.GB6273@morn.localdomain> In-Reply-To: <20091224002906.GB6273@morn.localdomain> Content-Type: multipart/mixed; boundary="------------010908080004080305080203" Subject: [Qemu-devel] Re: [PATCH] Seabios: Fix PkgLength calculation for the SSDT. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: seabios@seabios.org, qemu-devel@nongnu.org, Gleb Natapov This is a multi-part message in MIME format. --------------010908080004080305080203 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. --------------010908080004080305080203 Content-Type: text/x-patch; name="0001-Fix-PkgLength-calculation-for-the-SSDT.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Fix-PkgLength-calculation-for-the-SSDT.patch" >>From 183a34ee3a218bf64cb440e456628d361af98bfc Mon Sep 17 00:00:00 2001 From: Magnus Christensson Date: Wed, 25 Nov 2009 16:26:58 +0100 Subject: [PATCH] Fix PkgLength calculation for the SSDT. Signed-off-by: Magnus Christensson --- 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 --------------010908080004080305080203--