diff options
| author | Felix Fietkau <nbd@openwrt.org> | 2006-06-07 23:45:42 +0000 |
|---|---|---|
| committer | Felix Fietkau <nbd@openwrt.org> | 2006-06-07 23:45:42 +0000 |
| commit | 829c95db103151d07bcb3207a5a7eb0889feff5e (patch) | |
| tree | 2216b544d750db5ccf9b6e2c0e16efe30e02f558 /openwrt/target/linux/image/generic/lzma-loader/src/start.S | |
| parent | 11b8b8af73ac2d02d09cd61ce14d9f3d43058d89 (diff) | |
| download | mtk-20170518-829c95db103151d07bcb3207a5a7eb0889feff5e.zip mtk-20170518-829c95db103151d07bcb3207a5a7eb0889feff5e.tar.gz mtk-20170518-829c95db103151d07bcb3207a5a7eb0889feff5e.tar.bz2 | |
generic lzma loader: add support for memory copying, preserve prom arguments
SVN-Revision: 3908
Diffstat (limited to 'openwrt/target/linux/image/generic/lzma-loader/src/start.S')
| -rw-r--r-- | openwrt/target/linux/image/generic/lzma-loader/src/start.S | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/openwrt/target/linux/image/generic/lzma-loader/src/start.S b/openwrt/target/linux/image/generic/lzma-loader/src/start.S index 37c7ca3..9a85c4c 100644 --- a/openwrt/target/linux/image/generic/lzma-loader/src/start.S +++ b/openwrt/target/linux/image/generic/lzma-loader/src/start.S @@ -34,10 +34,30 @@ LEAF(_start) .set mips32 .set noreorder + /* save argument registers */ + move t4, a0 + move t5, a1 + move t6, a2 + move t7, a3 + /* set up stack */ li sp, 0xa0000000 + RAMSIZE - 16 - - + +#ifdef IMAGE_COPY + /* Copy decompressor code to the right place */ + li t2, LOADADDR + add a0, t2, 0 + la a1, code_start + la a2, code_stop +$L1: + lw t0, 0(a1) + sw t0, 0(a0) + add a1, 4 + add a0, 4 + blt a1, a2, $L1 + nop +#endif + /* At this point we need to invalidate dcache and */ /* icache before jumping to new code */ @@ -128,7 +148,11 @@ noic: move a0,s3 /* icache line size */ move a1,s4 /* icache size */ move a2,s1 /* dcache line size */ +#ifdef IMAGE_COPY + jal t2 +#else jal entry +#endif move a3,s2 /* dcache size */ .set reorder |
