[PATCH 13/13] Fix PkgLength calculation for the SSDT.

Magnus Christensson mch at virtutech.com
Wed Nov 25 16:26:58 CET 2009


Signed-off-by: Magnus Christensson <mch at virtutech.com>
---
 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;
     }
     *(ssdt_ptr++) = '_'; // Name
     *(ssdt_ptr++) = 'P';
-- 
1.6.2.5


--------------010906020603050202070006--




More information about the coreboot mailing list