summaryrefslogtreecommitdiff
path: root/src/northbridge/amd
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2010-09-13 14:49:02 +0000
committerMyles Watson <mylesgw@gmail.com>2010-09-13 14:49:02 +0000
commit687b3ba327a703e9951c1297fa49aefce0ea5655 (patch)
treed47934ccd6ea5873b05ecebd0fa87a69087c5c82 /src/northbridge/amd
parent6b56e43b6d96678cf7adeb1878702d3e52573985 (diff)
Port k8 UMA handling to fam10.
Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5807 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/amd')
-rw-r--r--src/northbridge/amd/amdfam10/northbridge.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index a42362682e..727a5ba10c 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -865,6 +865,9 @@ static void disable_hoist_memory(unsigned long hole_startk, int node_id)
#if CONFIG_WRITE_HIGH_TABLES==1
#define HIGH_TABLES_SIZE 64 // maximum size of high tables in KB
extern uint64_t high_tables_base, high_tables_size;
+#if CONFIG_GFXUMA == 1
+extern uint64_t uma_memory_base, uma_memory_size;
+#endif
#endif
static void amdfam10_domain_set_resources(device_t dev)
@@ -1038,7 +1041,11 @@ static void amdfam10_domain_set_resources(device_t dev)
#if CONFIG_WRITE_HIGH_TABLES==1
if (high_tables_base==0) {
/* Leave some space for ACPI, PIRQ and MP tables */
+#if CONFIG_GFXUMA == 1
+ high_tables_base = uma_memory_base - (HIGH_TABLES_SIZE * 1024);
+#else
high_tables_base = (mmio_basek - HIGH_TABLES_SIZE) * 1024;
+#endif
high_tables_size = HIGH_TABLES_SIZE * 1024;
printk(BIOS_DEBUG, " split: %dK table at =%08llx\n", HIGH_TABLES_SIZE,
high_tables_base);
@@ -1073,7 +1080,11 @@ static void amdfam10_domain_set_resources(device_t dev)
i, mmio_basek, basek, limitk);
if (high_tables_base==0) {
/* Leave some space for ACPI, PIRQ and MP tables */
+#if CONFIG_GFXUMA == 1
+ high_tables_base = uma_memory_base - (HIGH_TABLES_SIZE * 1024);
+#else
high_tables_base = (limitk - HIGH_TABLES_SIZE) * 1024;
+#endif
high_tables_size = HIGH_TABLES_SIZE * 1024;
}
#endif