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
This commit is contained in:
Myles Watson 2010-09-13 14:49:02 +00:00
parent 6b56e43b6d
commit 687b3ba327
1 changed files with 11 additions and 0 deletions

View File

@ -865,6 +865,9 @@ static void disable_hoist_memory(unsigned long hole_startk, int node_id)
#if CONFIG_WRITE_HIGH_TABLES==1 #if CONFIG_WRITE_HIGH_TABLES==1
#define HIGH_TABLES_SIZE 64 // maximum size of high tables in KB #define HIGH_TABLES_SIZE 64 // maximum size of high tables in KB
extern uint64_t high_tables_base, high_tables_size; extern uint64_t high_tables_base, high_tables_size;
#if CONFIG_GFXUMA == 1
extern uint64_t uma_memory_base, uma_memory_size;
#endif
#endif #endif
static void amdfam10_domain_set_resources(device_t dev) 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 CONFIG_WRITE_HIGH_TABLES==1
if (high_tables_base==0) { if (high_tables_base==0) {
/* Leave some space for ACPI, PIRQ and MP tables */ /* 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; high_tables_base = (mmio_basek - HIGH_TABLES_SIZE) * 1024;
#endif
high_tables_size = HIGH_TABLES_SIZE * 1024; high_tables_size = HIGH_TABLES_SIZE * 1024;
printk(BIOS_DEBUG, " split: %dK table at =%08llx\n", HIGH_TABLES_SIZE, printk(BIOS_DEBUG, " split: %dK table at =%08llx\n", HIGH_TABLES_SIZE,
high_tables_base); high_tables_base);
@ -1073,7 +1080,11 @@ static void amdfam10_domain_set_resources(device_t dev)
i, mmio_basek, basek, limitk); i, mmio_basek, basek, limitk);
if (high_tables_base==0) { if (high_tables_base==0) {
/* Leave some space for ACPI, PIRQ and MP tables */ /* 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; high_tables_base = (limitk - HIGH_TABLES_SIZE) * 1024;
#endif
high_tables_size = HIGH_TABLES_SIZE * 1024; high_tables_size = HIGH_TABLES_SIZE * 1024;
} }
#endif #endif