diff options
author | Timothy Pearson <tpearson@raptorengineeringinc.com> | 2015-03-13 12:48:31 -0500 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2015-03-17 04:33:06 +0100 |
commit | 49168805112d021f8715cab3abded8ab384860ac (patch) | |
tree | da3eca2c996f7f552c0dd41a671a253f1a8fc680 /src/northbridge/amd | |
parent | 447240808c62cb877e343c40802a35d01ed198fb (diff) | |
download | coreboot-49168805112d021f8715cab3abded8ab384860ac.tar.gz coreboot-49168805112d021f8715cab3abded8ab384860ac.tar.bz2 coreboot-49168805112d021f8715cab3abded8ab384860ac.zip |
cpu/amd/model_10xxx: Move GFXUMA size calculation to separate function
This is required for early CBMEM support.
Change-Id: I31d9b6a04ef963a7d3e045d9c5201ae64604218a
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: http://review.coreboot.org/8663
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/northbridge/amd')
-rw-r--r-- | src/northbridge/amd/amdfam10/northbridge.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c index 5ce7ae66d7fa..e2b144126b64 100644 --- a/src/northbridge/amd/amdfam10/northbridge.c +++ b/src/northbridge/amd/amdfam10/northbridge.c @@ -33,6 +33,7 @@ #include <cpu/x86/lapic.h> #include <cpu/amd/mtrr.h> #include <cpu/amd/amdfam10_sysconf.h> +#include <cpu/amd/model_10xxx/ram_calc.h> #if CONFIG_LOGICAL_CPUS #include <cpu/amd/multicore.h> @@ -740,21 +741,7 @@ static void setup_uma_memory(void) { #if CONFIG_GFXUMA uint32_t topmem = (uint32_t) bsp_topmem(); - /* refer to UMA Size Consideration in 780 BDG. */ - switch (topmem) { - case 0x10000000: /* 256M system memory */ - uma_memory_size = 0x4000000; /* 64M recommended UMA */ - break; - - case 0x20000000: /* 512M system memory */ - uma_memory_size = 0x8000000; /* 128M recommended UMA */ - break; - - default: /* 1GB and above system memory */ - uma_memory_size = 0x10000000; /* 256M recommended UMA */ - break; - } - + uma_memory_size = get_uma_memory_size(topmem); uma_memory_base = topmem - uma_memory_size; /* TOP_MEM1 */ printk(BIOS_INFO, "%s: uma size 0x%08llx, memory start 0x%08llx\n", __func__, uma_memory_size, uma_memory_base); |