diff options
author | Stefan Reinauer <stepan@openbios.org> | 2006-07-19 15:32:49 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2006-07-19 15:32:49 +0000 |
commit | 4f1cb2342630e806399b2febafc8c215a8bf6059 (patch) | |
tree | 2eff2a16749e234a079a5fff3fdca4a6bc58c39b /src/arch/i386/boot/linuxbios_table.c | |
parent | e32243a9b1ee4b4008bed424908d98e99610b8ad (diff) |
move mptable to 960k to 1M
https://openbios.org/roundup/linuxbios/issue55
This patch is a little bit enhanced, it keeps the ppc table consistent,
which Yinghai's original patch did not.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2342 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/i386/boot/linuxbios_table.c')
-rw-r--r-- | src/arch/i386/boot/linuxbios_table.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/arch/i386/boot/linuxbios_table.c b/src/arch/i386/boot/linuxbios_table.c index a625fe0473..402f7f90e0 100644 --- a/src/arch/i386/boot/linuxbios_table.c +++ b/src/arch/i386/boot/linuxbios_table.c @@ -349,15 +349,22 @@ static struct lb_memory *build_lb_mem(struct lb_header *head) } unsigned long write_linuxbios_table( - unsigned long low_table_start, unsigned long low_table_end, - unsigned long rom_table_startk, unsigned long rom_table_endk) + unsigned long low_table_start, unsigned long low_table_end, + unsigned long rom_table_start, unsigned long rom_table_end) { unsigned long table_size; struct lb_header *head; struct lb_memory *mem; - head = lb_table_init(low_table_end); - low_table_end = (unsigned long)head; + if(low_table_end > (0x1000 - sizeof(struct lb_header))) { /* after 4K */ + /* We need to put lbtable on to [0xf0000,0x100000) */ + head = lb_table_init(rom_table_end); + rom_table_end = (unsigned long)head; + } else { + head = lb_table_init(low_table_end); + low_table_end = (unsigned long)head; + } + if (HAVE_OPTION_TABLE == 1) { struct lb_record *rec_dest, *rec_src; /* Write the option config table... */ @@ -370,16 +377,13 @@ unsigned long write_linuxbios_table( /* Record where RAM is located */ mem = build_lb_mem(head); - /* Find the current mptable size */ - table_size = (low_table_end - low_table_start); - /* Record the mptable and the the lb_table (This will be adjusted later) */ lb_add_memory_range(mem, LB_MEM_TABLE, - low_table_start, table_size); + low_table_start, low_table_end - low_table_start); - /* Record the pirq table */ + /* Record the pirq table, acpi tables, and maybe the mptable */ lb_add_memory_range(mem, LB_MEM_TABLE, - rom_table_startk << 10, (rom_table_endk - rom_table_startk) << 10); + rom_table_start, rom_table_end - rom_table_start); /* Note: * I assume that there is always memory at immediately after @@ -393,8 +397,7 @@ unsigned long write_linuxbios_table( /* Record our various random string information */ lb_strings(head); - low_table_end = lb_table_fini(head); - /* Remember where my valid memory ranges are */ - return low_table_end; + return lb_table_fini(head); + } |