diff options
author | Ronald G. Minnich <rminnich@gmail.com> | 2006-05-18 03:07:16 +0000 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2006-05-18 03:07:16 +0000 |
commit | bad9d105cf908bbb032768a1605265654b38ca3a (patch) | |
tree | 264093bd7636f621345cc232d0dbbf2a003f9c56 | |
parent | 5d573c28e7520085ff7b687c05834292d615860a (diff) | |
download | coreboot-bad9d105cf908bbb032768a1605265654b38ca3a.tar.xz |
cleanup some of the compressed rom stream ugliness -- more to do!
olpc and rumba can now boot linux out of flash. vsa was resized to 64K.
olpc and rumba now used compressed payload -- thanks stefan!
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2307 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r-- | src/cpu/amd/model_gx2/vsmsetup.c | 4 | ||||
-rw-r--r-- | src/lib/nrv2b.c | 3 | ||||
-rw-r--r-- | src/mainboard/amd/rumba/Options.lb | 1 | ||||
-rw-r--r-- | src/mainboard/olpc/rev_a/Options.lb | 1 | ||||
-rw-r--r-- | src/stream/rom_stream.c | 8 | ||||
-rw-r--r-- | targets/olpc/rev_a/Config.lb | 27 |
6 files changed, 18 insertions, 26 deletions
diff --git a/src/cpu/amd/model_gx2/vsmsetup.c b/src/cpu/amd/model_gx2/vsmsetup.c index dacaef89e1..62e17893b9 100644 --- a/src/cpu/amd/model_gx2/vsmsetup.c +++ b/src/cpu/amd/model_gx2/vsmsetup.c @@ -261,8 +261,8 @@ void do_vsmbios(void) */ //rom = 0xfff80000; //rom = 0xfffc0000; - /* the VSA starts at the base of rom - 128k */ - rom = ((unsigned long) 0) - (ROM_SIZE + 128*1024); + /* the VSA starts at the base of rom - 64 */ + rom = ((unsigned long) 0) - (ROM_SIZE + 64*1024); buf = (unsigned char *) rom; printk_debug("buf %p *buf %d buf[256k] %d\n", diff --git a/src/lib/nrv2b.c b/src/lib/nrv2b.c index e9956cfcfa..1c0fa7f0a3 100644 --- a/src/lib/nrv2b.c +++ b/src/lib/nrv2b.c @@ -35,7 +35,9 @@ static unsigned long unrv2b(uint8_t * src, uint8_t * dst) uint32_t bb = 0; unsigned bc = 0; const uint8_t *m_pos; + unsigned long file_len = *(unsigned long *) src; + printk_debug("compressed file len is supposed to be %d bytes\n", file_len); // skip length src += 4; /* FIXME: check olen with the length stored in first 4 bytes */ @@ -77,6 +79,7 @@ static unsigned long unrv2b(uint8_t * src, uint8_t * dst) } while (--m_len > 0); } + printk_debug("computed len is %d, file len is %d\n", olen, file_len); return olen; } diff --git a/src/mainboard/amd/rumba/Options.lb b/src/mainboard/amd/rumba/Options.lb index df3d1bdfb6..d55d8ce923 100644 --- a/src/mainboard/amd/rumba/Options.lb +++ b/src/mainboard/amd/rumba/Options.lb @@ -21,6 +21,7 @@ uses ROM_IMAGE_SIZE uses ROM_SECTION_SIZE uses ROM_SECTION_OFFSET uses CONFIG_ROM_STREAM_START +uses CONFIG_COMPRESSED_ROM_STREAM uses PAYLOAD_SIZE uses _ROMBASE uses _RAMBASE diff --git a/src/mainboard/olpc/rev_a/Options.lb b/src/mainboard/olpc/rev_a/Options.lb index df3d1bdfb6..d55d8ce923 100644 --- a/src/mainboard/olpc/rev_a/Options.lb +++ b/src/mainboard/olpc/rev_a/Options.lb @@ -21,6 +21,7 @@ uses ROM_IMAGE_SIZE uses ROM_SECTION_SIZE uses ROM_SECTION_OFFSET uses CONFIG_ROM_STREAM_START +uses CONFIG_COMPRESSED_ROM_STREAM uses PAYLOAD_SIZE uses _ROMBASE uses _RAMBASE diff --git a/src/stream/rom_stream.c b/src/stream/rom_stream.c index c9f2fa3f4d..e5a55d306d 100644 --- a/src/stream/rom_stream.c +++ b/src/stream/rom_stream.c @@ -32,7 +32,7 @@ static const unsigned char *rom; int stream_init(void) { #if CONFIG_COMPRESSED_ROM_STREAM - unsigned long dest; + unsigned char *dest; unsigned long olen; #endif @@ -51,14 +51,14 @@ int stream_init(void) dest = (CONFIG_LB_MEM_TOPK<<10); } #endif - if((dest < 0xf0000) && ((dest+olen)>0xf0000)) { //linuxbios tables etc - dest = (CONFIG_LB_MEM_TOPK<<10); + if((dest < (unsigned char *) 0xf0000) && ((dest+olen)> (unsigned char *)0xf0000)) { //linuxbios tables etc + dest = (unsigned char *) (CONFIG_LB_MEM_TOPK<<10); } #endif printk_debug("Uncompressing to RAM 0x%08lx ", dest); olen = unrv2b((uint8_t *) rom_start, (uint8_t *)dest ); - printk_debug(" ilen = 0x%08lx olen = 0x%08lx done.\n", ilen, olen); + printk_debug(" olen = 0x%08lx done.\n", olen); rom_end = dest + olen - 1; rom = dest; #else diff --git a/targets/olpc/rev_a/Config.lb b/targets/olpc/rev_a/Config.lb index da546808ff..aaa8aeb6b4 100644 --- a/targets/olpc/rev_a/Config.lb +++ b/targets/olpc/rev_a/Config.lb @@ -3,31 +3,18 @@ target rev_a mainboard olpc/rev_a -option ROM_SIZE=1024*128 +# leave 64k for vsa +option CONFIG_COMPRESSED_ROM_STREAM=1 +option ROM_SIZE=1024*512-64*1024 option FALLBACK_SIZE=ROM_SIZE -#romimage "normal" -# option USE_FALLBACK_IMAGE=0 -# option ROM_IMAGE_SIZE=0x10000 -# option LINUXBIOS_EXTRA_VERSION=".0Normal" -## payload /usr/share/etherboot/5.1.9pre2-lnxi-lb/tg3--ide_disk.zelf -## payload ../../../../tg3--ide_disk.zelf -## payload ../../../../../lnxieepro100.ebi -## payload /etc/hosts -## payload /home/hamish/work/etherboot/eb-5.2.6-lne100.elf -# payload /tmp/filo.elf -#end +option DEFAULT_CONSOLE_LOGLEVEL = 11 +option MAXIMUM_CONSOLE_LOGLEVEL = 11 romimage "fallback" option USE_FALLBACK_IMAGE=1 - option ROM_IMAGE_SIZE=0x10000 + option ROM_IMAGE_SIZE=0x8000 option LINUXBIOS_EXTRA_VERSION=".0Fallback" -# payload /usr/share/etherboot/5.1.9pre2-lnxi-lb/tg3--ide_disk.zelf -# payload ../../../../tg3--ide_disk.zelf -# payload ../../../../../lnxieepro100.ebia -# payload /etc/hosts -# payload /home/hamish/work/etherboot/eb-5.2.6-lne100.elf - payload /tmp/filo.elf + payload /tmp/olpcpayload.elf end buildrom ./linuxbios.rom ROM_SIZE "fallback" -#buildrom ./linuxbios.rom ROM_SIZE "normal" "fallback" |