From: Magnus Christensson Date: Wed, 25 Nov 2009 15:26:58 +0000 (+0100) Subject: Fix PkgLength calculation for the SSDT. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=3012af189e0f89bd33df1c0711a46f098053e9a7;p=seabios.git Fix PkgLength calculation for the SSDT. Signed-off-by: Magnus Christensson --- 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';