Fix memory size reporting on AMD family 14h systems for >= 4GB
authorCristian Măgherușan-Stanciu <cristi.magherusan@gmail.com>
Fri, 8 Jul 2011 22:41:12 +0000 (22:41 +0000)
committerPeter Stuge <peter@stuge.se>
Fri, 8 Jul 2011 23:51:42 +0000 (01:51 +0200)
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 <scott@notabs.org>
Acked-by: Marshall Buschman <mbuschman@lucidmachines.com>
Signed-off-by: Cristian Măgherușan-Stanciu <cristi.magherusan@gmail.com>
Reviewed-on: http://review.coreboot.org/48
Tested-by: build bot (Jenkins)
Reviewed-by: Peter Stuge <peter@stuge.se>
src/northbridge/amd/agesa/family14/northbridge.c

index 78ba2dad07e651620c5c9235cf9e969adc28991b..e38500d56fd24aa3411afe2312cf0329312f2cfd 100644 (file)
@@ -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. */