fix the tree

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2296 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer 2006-05-04 10:08:04 +00:00
parent 7ac38a33f6
commit ab4f5d0c10
4 changed files with 10 additions and 17 deletions

View File

@ -38,17 +38,15 @@ static void copy_and_run(void)
#else #else
__asm__ volatile ( __asm__ volatile (
"leal _liseg, %0\n\t" "leal _liseg, %0\n\t"
"leal _iseg, %1\n\t" "leal _iseg, %1\n\t"
: "=a" (src) , "=b" (dst) : "=a" (src) , "=b" (dst)
); );
print_debug_cp_run("src=",(uint32_t)src); print_debug_cp_run("src=",(uint32_t)src);
print_debug_cp_run("dst=",(uint32_t)dst); print_debug_cp_run("dst=",(uint32_t)dst);
olen = unrv2b(src, dst, &ilen); olen = unrv2b(src, dst);
print_debug_cp_run("linxbios_ram.nrv2b length = ", ilen);
#endif #endif
print_debug_cp_run("linxbios_ram.bin length = ", olen); print_debug_cp_run("linxbios_ram.bin length = ", olen);

View File

@ -4,6 +4,8 @@
*/ */
#if CONFIG_COMPRESS #if CONFIG_COMPRESS
#define ENDIAN 0
#define BITSIZE 32
#include "lib/nrv2b.c" #include "lib/nrv2b.c"
#endif #endif
@ -11,9 +13,7 @@ static void copy_and_run(unsigned cpu_reset)
{ {
uint8_t *src, *dst; uint8_t *src, *dst;
unsigned long dst_len; unsigned long dst_len;
unsigned long ilen = 0, olen = 0, last_m_off = 1; unsigned long ilen, olen;
uint32_t bb = 0;
unsigned bc = 0;
print_debug("Copying LinuxBIOS to ram.\r\n"); print_debug("Copying LinuxBIOS to ram.\r\n");
@ -44,7 +44,7 @@ static void copy_and_run(unsigned cpu_reset)
// dump_mem(src, src+0x100); // dump_mem(src, src+0x100);
unrv2b(src, dst); olen=unrv2b(src, dst);
#endif #endif
// dump_mem(dst, dst+0x100); // dump_mem(dst, dst+0x100);

View File

@ -29,7 +29,7 @@
#define GETBIT(bb, src, ilen) GETBIT_LE32(bb, src, ilen) #define GETBIT(bb, src, ilen) GETBIT_LE32(bb, src, ilen)
#endif #endif
static unsigned long unrv2b(uint8_t * src, uint8_t * dst, unsigned long *ilen_p) static unsigned long unrv2b(uint8_t * src, uint8_t * dst)
{ {
unsigned long ilen = 0, olen = 0, last_m_off = 1; unsigned long ilen = 0, olen = 0, last_m_off = 1;
uint32_t bb = 0; uint32_t bb = 0;
@ -38,8 +38,8 @@ static unsigned long unrv2b(uint8_t * src, uint8_t * dst, unsigned long *ilen_p)
// skip length // skip length
src += 4; src += 4;
/* FIXME: check olen with the length stored in first 4 bytes */
/* FIXME: check olen with len on first 4 bytes */
for (;;) { for (;;) {
unsigned int m_off, m_len; unsigned int m_off, m_len;
while (GETBIT(bb, src, ilen)) { while (GETBIT(bb, src, ilen)) {
@ -77,8 +77,6 @@ static unsigned long unrv2b(uint8_t * src, uint8_t * dst, unsigned long *ilen_p)
} while (--m_len > 0); } while (--m_len > 0);
} }
*ilen_p = ilen;
return olen; return olen;
} }

View File

@ -27,15 +27,12 @@ extern unsigned char _heap, _eheap;
/*static const */unsigned char *rom_end = (unsigned char *)(CONFIG_ROM_STREAM_START + PAYLOAD_SIZE - 1); /*static const */unsigned char *rom_end = (unsigned char *)(CONFIG_ROM_STREAM_START + PAYLOAD_SIZE - 1);
/*XXXXXXXXXXXXXX */ /*XXXXXXXXXXXXXX */
unsigned char *rom_start = (void *)CONFIG_ROM_STREAM_START;
unsigned char *rom_end = (void *)(CONFIG_ROM_STREAM_START + PAYLOAD_SIZE - 1);
static const unsigned char *rom; static const unsigned char *rom;
int stream_init(void) int stream_init(void)
{ {
#if CONFIG_COMPRESSED_ROM_STREAM #if CONFIG_COMPRESSED_ROM_STREAM
unsigned long dest; unsigned long dest;
unsigned long ilen;
unsigned long olen; unsigned long olen;
#endif #endif
@ -60,7 +57,7 @@ int stream_init(void)
#endif #endif
printk_debug("Uncompressing to RAM 0x%08lx ", dest); printk_debug("Uncompressing to RAM 0x%08lx ", dest);
olen = unrv2b((uint8_t *) rom_start, (uint8_t *)dest, &ilen ); olen = unrv2b((uint8_t *) rom_start, (uint8_t *)dest );
printk_debug(" ilen = 0x%08lx olen = 0x%08lx done.\n", ilen, olen); printk_debug(" ilen = 0x%08lx olen = 0x%08lx done.\n", ilen, olen);
rom_end = dest + olen - 1; rom_end = dest + olen - 1;
rom = dest; rom = dest;