X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/ce814c1c05dae77e9a265509ae0671ef145a9b38..0d2d5b055d824a8eb822f29181aed5435fc3c045:/target/linux/image/generic/lzma-loader/src/decompress.c?ds=sidebyside diff --git a/target/linux/image/generic/lzma-loader/src/decompress.c b/target/linux/image/generic/lzma-loader/src/decompress.c index f602276dd..4ed432d1a 100644 --- a/target/linux/image/generic/lzma-loader/src/decompress.c +++ b/target/linux/image/generic/lzma-loader/src/decompress.c @@ -106,6 +106,13 @@ void entry(unsigned long icache_size, unsigned long icache_lsize, { unsigned int i; /* temp value */ unsigned int osize; /* uncompressed size */ + volatile unsigned int arg0, arg1, arg2, arg3; + + /* restore argument registers */ + __asm__ __volatile__ ("ori %0, $12, 0":"=r"(arg0)); + __asm__ __volatile__ ("ori %0, $13, 0":"=r"(arg1)); + __asm__ __volatile__ ("ori %0, $14, 0":"=r"(arg2)); + __asm__ __volatile__ ("ori %0, $15, 0":"=r"(arg3)); ILzmaInCallback callback; CLzmaDecoderState vs; @@ -142,6 +149,6 @@ void entry(unsigned long icache_size, unsigned long icache_lsize, blast_icache(icache_size, icache_lsize); /* Jump to load address */ - ((void (*)(void)) KERNEL_ENTRY)(); + ((void (*)(int a0, int a1, int a2, int a3)) KERNEL_ENTRY)(arg0, arg1, arg2, arg3); } }