From 1fe6c64ba136697a14fbefa6b0b70b1e8fe1fa0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20M=C4=83gheru=C8=99an-Stanciu?= Date: Fri, 8 Jul 2011 22:41:12 +0000 Subject: [PATCH] Fix memory size reporting on AMD family 14h systems for >= 4GB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Applying Scott Duplichan's fix for memory >=4GB Adjusted it to the new directory structure (agesa_wrapper was renamed to just agesa). Boot-tested and confirmed to work, on my board Linux can now access the whole RAM. Change-Id: I31d66a488a7811d214d84653860b3e0116f67d19 Signed-off-by: Scott Duplichan Acked-by: Marshall Buschman Signed-off-by: Cristian Măgherușan-Stanciu Reviewed-on: http://review.coreboot.org/48 Tested-by: build bot (Jenkins) Reviewed-by: Peter Stuge --- src/northbridge/amd/agesa/family14/northbridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c index 78ba2dad07..e38500d56f 100644 --- a/src/northbridge/amd/agesa/family14/northbridge.c +++ b/src/northbridge/amd/agesa/family14/northbridge.c @@ -652,8 +652,8 @@ printk(BIOS_DEBUG, "adsr - CONFIG_PCI_64BIT_PREF_MEM is true.\n"); d = get_dram_base_mask(0); if (d.mask & 1) { - basek = ((resource_t)(d.base)) << 8; - limitk = (resource_t)((d.mask << 8) | 0xFFFFFF); + basek = ((resource_t)((u64)d.base)) << 8; + limitk = (resource_t)(((u64)d.mask << 8) | 0xFFFFFF); printk(BIOS_DEBUG, "adsr: (before) basek = %llx, limitk = %llx.\n",basek,limitk); /* Convert these values to multiples of 1K for ease of math. */