diff options
Diffstat (limited to 'src/northbridge/amd/amdk8')
-rw-r--r-- | src/northbridge/amd/amdk8/northbridge.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c index c7321a478b..8f0a11bf9e 100644 --- a/src/northbridge/amd/amdk8/northbridge.c +++ b/src/northbridge/amd/amdk8/northbridge.c @@ -874,6 +874,7 @@ static void amdk8_domain_set_resources(device_t dev) #endif unsigned long mmio_basek; u32 pci_tolm; + u64 ramtop = 0; int i, idx; #if CONFIG_HW_MEM_HOLE_SIZEK != 0 struct hw_mem_hole_info mem_hole; @@ -1042,11 +1043,8 @@ static void amdk8_domain_set_resources(device_t dev) ram_resource(dev, (idx | i), basek, pre_sizek); idx += 0x10; sizek -= pre_sizek; -#if CONFIG_GFXUMA - set_top_of_ram_once(uma_memory_base); -#else - set_top_of_ram_once(mmio_basek * 1024); -#endif + if (!ramtop) + ramtop = mmio_basek * 1024; } #if CONFIG_HW_MEM_HOLE_SIZEK != 0 if(reset_memhole) @@ -1071,15 +1069,15 @@ static void amdk8_domain_set_resources(device_t dev) idx += 0x10; printk(BIOS_DEBUG, "%d: mmio_basek=%08lx, basek=%08x, limitk=%08x\n", i, mmio_basek, basek, limitk); -#if CONFIG_GFXUMA - set_top_of_ram_once(uma_memory_base); -#else - set_top_of_ram_once(limitk * 1024); -#endif + if (!ramtop) + ramtop = limitk * 1024; } #if CONFIG_GFXUMA + set_top_of_ram(uma_memory_base); uma_resource(dev, 7, uma_memory_base >> 10, uma_memory_size >> 10); +#else + set_top_of_ram(ramtop); #endif assign_resources(dev->link_list); |