AMD and GFXUMA: move setup_uma_memory() to northbridge

UMA region can be determined at any time after the amount
of RAM is known and before the uma_resource() call.

Change-Id: I2a0bf2d3cad55ee70e889c88846f962b7faa0c7e
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/1379
Reviewed-by: Zheng Bao <zheng.bao@amd.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Anton Kochkov <anton.kochkov@gmail.com>
This commit is contained in:
Kyösti Mälkki
2012-07-19 19:26:43 +03:00
committed by Anton Kochkov
parent 30f04645c1
commit 6b5eb1cc2d
36 changed files with 18 additions and 62 deletions

View File

@@ -469,7 +469,7 @@ static void set_resources(device_t dev)
printk(BIOS_DEBUG, "Fam12h - northbridge.c - set_resources - End.\n");
}
void setup_uma_memory(void)
static void setup_uma_memory(void)
{
#if CONFIG_GFXUMA
msr_t msr, msr2;
@@ -611,6 +611,8 @@ static void domain_set_resources(device_t dev)
u32 reset_memhole = 1;
#endif
setup_uma_memory();
#if CONFIG_PCI_64BIT_PREF_MEM
printk(BIOS_DEBUG, "adsr - CONFIG_PCI_64BIT_PREF_MEM is true.\n");

View File

@@ -517,7 +517,7 @@ static void domain_read_resources(device_t dev)
#endif
}
void setup_uma_memory(void)
static void setup_uma_memory(void)
{
#if CONFIG_GFXUMA
msr_t msr, msr2;
@@ -574,6 +574,8 @@ static void domain_set_resources(device_t dev)
u32 reset_memhole = 1;
#endif
setup_uma_memory();
#if CONFIG_PCI_64BIT_PREF_MEM
printk(BIOS_DEBUG, "adsr - CONFIG_PCI_64BIT_PREF_MEM is true.\n");

View File

@@ -629,7 +629,7 @@ static struct hw_mem_hole_info get_hw_mem_hole_info(void)
#define ONE_MB 0x100000
void setup_uma_memory(void)
static void setup_uma_memory(void)
{
#if CONFIG_GFXUMA
msr_t msr, msr2;
@@ -686,6 +686,8 @@ static void domain_set_resources(device_t dev)
u32 reset_memhole = 1;
#endif
setup_uma_memory();
#if CONFIG_PCI_64BIT_PREF_MEM
for (link = dev->link_list; link; link = link->next) {

View File

@@ -638,7 +638,7 @@ static struct hw_mem_hole_info get_hw_mem_hole_info(void)
#define ONE_MB_SHIFT 20
void setup_uma_memory(void)
static void setup_uma_memory(void)
{
#if CONFIG_GFXUMA
msr_t msr, msr2;
@@ -696,6 +696,8 @@ static void domain_set_resources(device_t dev)
u32 reset_memhole = 1;
#endif
setup_uma_memory();
#if CONFIG_PCI_64BIT_PREF_MEM
for (link = dev->link_list; link; link = link->next) {

View File

@@ -848,7 +848,7 @@ static void disable_hoist_memory(unsigned long hole_startk, int node_id)
#include <cbmem.h>
#endif
void setup_uma_memory(void)
static void setup_uma_memory(void)
{
#if CONFIG_GFXUMA
msr_t msr, msr2;
@@ -903,6 +903,8 @@ static void amdfam10_domain_set_resources(device_t dev)
u32 reset_memhole = 1;
#endif
setup_uma_memory();
#if CONFIG_PCI_64BIT_PREF_MEM
for(link = dev->link_list; link; link = link->next) {

View File

@@ -823,7 +823,7 @@ static u32 hoist_memory(unsigned long hole_startk, int node_id)
#include <cbmem.h>
#endif
void setup_uma_memory(void)
static void setup_uma_memory(void)
{
#if CONFIG_GFXUMA
msr_t msr, msr2;
@@ -896,6 +896,8 @@ static void amdk8_domain_set_resources(device_t dev)
u32 reset_memhole = 1;
#endif
setup_uma_memory();
#if 0
/* Place the IO devices somewhere safe */
io = find_resource(dev, 0);