From 687b3ba327a703e9951c1297fa49aefce0ea5655 Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Mon, 13 Sep 2010 14:49:02 +0000 Subject: Port k8 UMA handling to fam10. Signed-off-by: Myles Watson Acked-by: Myles Watson git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5807 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/northbridge/amd/amdfam10/northbridge.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/northbridge') 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 -- cgit v1.2.3