Fix PkgLength calculation for the SSDT.

Signed-off-by: Magnus Christensson <mch@virtutech.com>
This commit is contained in:
Magnus Christensson 2009-11-25 16:26:58 +01:00 committed by Kevin O'Connor
parent 6d75be2d03
commit 9fb3f4d950
1 changed files with 4 additions and 2 deletions

View File

@ -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';