summaryrefslogtreecommitdiff
path: root/src/northbridge/amd/amdk8/amdk8_acpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/amd/amdk8/amdk8_acpi.c')
-rw-r--r--src/northbridge/amd/amdk8/amdk8_acpi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/northbridge/amd/amdk8/amdk8_acpi.c b/src/northbridge/amd/amdk8/amdk8_acpi.c
index 712315ee09..c3f0f07d23 100644
--- a/src/northbridge/amd/amdk8/amdk8_acpi.c
+++ b/src/northbridge/amd/amdk8/amdk8_acpi.c
@@ -270,7 +270,15 @@ int k8acpi_write_vars(void)
msr = rdmsr(TOP_MEM);
lens += acpigen_write_name_dword("TOM1", msr.lo);
msr = rdmsr(TOP_MEM2);
- lens += acpigen_write_name_qword("TOM2", (((uint64_t) msr.hi) << 32) | msr.lo);
+ /*
+ * Since XP only implements parts of ACPI 2.0, we can't use a qword
+ * here.
+ * See http://www.acpi.info/presentations/S01USMOBS169_OS%2520new.ppt
+ * slide 22ff.
+ * Shift value right by 20 bit to make it fit into 32bit,
+ * giving us 1MB granularity and a limit of almost 4Exabyte of memory.
+ */
+ lens += acpigen_write_name_dword("TOM2", (msr.hi << 12) | msr.lo >> 20);
lens += k8acpi_write_HT();
//minus opcode