-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathseabios-Fix-PkgLength-calculation-for-the-SSDT.patch
51 lines (43 loc) · 1.58 KB
/
seabios-Fix-PkgLength-calculation-for-the-SSDT.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From c21607c3d0b473a3f8663f8f08e0ace7aac9298c Mon Sep 17 00:00:00 2001
From: Marcelo Tosatti <[email protected]>
Date: Mon, 8 Mar 2010 20:22:08 -0300
Subject: [PATCH] Fix PkgLength calculation for the SSDT
RH-Author: Marcelo Tosatti <[email protected]>
Message-id: <[email protected]>
Patchwork-id: 7598
O-Subject: [RHEL6 seabios] Fix PkgLength calculation for the SSDT
Bugzilla: 571553
RH-Acked-by: Gleb Natapov <[email protected]>
RH-Acked-by: Michael S. Tsirkin <[email protected]>
RH-Acked-by: Justin M. Forbes <[email protected]>
commit 9fb3f4d950744e97cc655b7d7b523d8bf101e4a0
Author: Magnus Christensson <[email protected]>
Date: Wed Nov 25 16:26:58 2009 +0100
Fix PkgLength calculation for the SSDT.
Signed-off-by: Magnus Christensson <[email protected]>
BZ: 571553
Signed-off-by: Eduardo Habkost <[email protected]>
---
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.3.rc4.29.g8146