Blame 0002-Fix-PkgLength-calculation-for-the-SSDT.patch

Justin M. Forbes 41145f
From 9fb3f4d950744e97cc655b7d7b523d8bf101e4a0 Mon Sep 17 00:00:00 2001
Justin M. Forbes 41145f
From: Magnus Christensson <mch@virtutech.com>
Justin M. Forbes 41145f
Date: Wed, 25 Nov 2009 16:26:58 +0100
Justin M. Forbes 41145f
Subject: [PATCH] Fix PkgLength calculation for the SSDT.
Justin M. Forbes 41145f
Justin M. Forbes 41145f
Signed-off-by: Magnus Christensson <mch@virtutech.com>
Justin M. Forbes 41145f
---
Justin M. Forbes 41145f
 src/acpi.c |    6 ++++--
Justin M. Forbes 41145f
 1 files changed, 4 insertions(+), 2 deletions(-)
Justin M. Forbes 41145f
Justin M. Forbes 41145f
diff --git a/src/acpi.c b/src/acpi.c
Justin M. Forbes 41145f
index f613b03..244536a 100644
Justin M. Forbes 41145f
--- a/src/acpi.c
Justin M. Forbes 41145f
+++ b/src/acpi.c
Justin M. Forbes 41145f
@@ -429,10 +429,12 @@ build_ssdt(void)
Justin M. Forbes 41145f
     // build processor scope header
Justin M. Forbes 41145f
     *(ssdt_ptr++) = 0x10; // ScopeOp
Justin M. Forbes 41145f
     if (cpu_length <= 0x3e) {
Justin M. Forbes 41145f
+        /* Handle 1-4 CPUs with one byte encoding */
Justin M. Forbes 41145f
         *(ssdt_ptr++) = cpu_length + 1;
Justin M. Forbes 41145f
     } else {
Justin M. Forbes 41145f
-        *(ssdt_ptr++) = 0x7F;
Justin M. Forbes 41145f
-        *(ssdt_ptr++) = (cpu_length + 2) >> 6;
Justin M. Forbes 41145f
+        /* Handle 5-314 CPUs with two byte encoding */
Justin M. Forbes 41145f
+        *(ssdt_ptr++) = 0x40 | ((cpu_length + 2) & 0xf);
Justin M. Forbes 41145f
+        *(ssdt_ptr++) = (cpu_length + 2) >> 4;
Justin M. Forbes 41145f
     }
Justin M. Forbes 41145f
     *(ssdt_ptr++) = '_'; // Name
Justin M. Forbes 41145f
     *(ssdt_ptr++) = 'P';
Justin M. Forbes 41145f
-- 
Justin M. Forbes 41145f
1.6.6.1
Justin M. Forbes 41145f