diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2008-12-13 20:51:34 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2008-12-13 20:51:34 +0000 |
commit | 045c348cf3d700670b5780dd713c2e75436e5b4a (patch) | |
tree | e471f52dd964c6839dc7f42d32514424ab4c81de /src/arch/i386/boot | |
parent | 42f03e564726fbc85842f30022e4d7c074e8cccc (diff) | |
download | coreboot-045c348cf3d700670b5780dd713c2e75436e5b4a.tar.xz |
Move mainboard specific changes to the coreboot memory table into the
mainboard specific code. (And add a hook to allow other mainboards do
a similar thing if required)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G Minnich <rminnich@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3812 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/i386/boot')
-rw-r--r-- | src/arch/i386/boot/coreboot_table.c | 12 | ||||
-rw-r--r-- | src/arch/i386/boot/coreboot_table.h | 3 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/arch/i386/boot/coreboot_table.c b/src/arch/i386/boot/coreboot_table.c index 427b978d96..e74e3e9fef 100644 --- a/src/arch/i386/boot/coreboot_table.c +++ b/src/arch/i386/boot/coreboot_table.c @@ -357,7 +357,8 @@ static void lb_remove_memory_range(struct lb_memory *mem, } } -static void lb_add_memory_range(struct lb_memory *mem, +/* This function is used in mainboard specific code, too */ +void lb_add_memory_range(struct lb_memory *mem, uint32_t type, uint64_t start, uint64_t size) { lb_remove_memory_range(mem, start, size); @@ -447,15 +448,10 @@ unsigned long write_coreboot_table( lb_add_memory_range(mem, LB_MEM_TABLE, rom_table_start, rom_table_end-rom_table_start); - /* AMD rs690 chip, we should remove the UMA from system memory. */ -#if (CONFIG_GFXUMA == 1) - printk_info("uma_memory_start=0x%x, uma_memory_size=0x%x \n", - uma_memory_start, uma_memory_size); - lb_add_memory_range(mem, LB_MEM_TABLE, - uma_memory_start, uma_memory_size); +#if (HAVE_MAINBOARD_RESOURCES == 1) + add_mainboard_resources(mem); #endif - /* Note: * I assume that there is always memory at immediately after * the low_table_end. This means that after I setup the coreboot table. diff --git a/src/arch/i386/boot/coreboot_table.h b/src/arch/i386/boot/coreboot_table.h index a5ba0f5963..4c8c44a18c 100644 --- a/src/arch/i386/boot/coreboot_table.h +++ b/src/arch/i386/boot/coreboot_table.h @@ -26,4 +26,7 @@ struct lb_memory *get_lb_mem(void); extern struct cmos_option_table option_table; +/* defined by mainboard.c if the mainboard requires extra resources */ +int add_mainboard_resources(struct lb_memory *mem); + #endif /* COREBOOT_TABLE_H */ |