generic: lzma-loader: fix cache invalidation
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 21 Mar 2016 13:15:09 +0000 (13:15 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 21 Mar 2016 13:15:09 +0000 (13:15 +0000)
The current code only partially invalidates both caches
because the cache size and cache-line size values are
incorrectly passed to the C code.

Fix the assembly code to pass the arguments in the correct
order.

Tested on RB532.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49056 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/generic/image/lzma-loader/src/start.S

index 8274580..f025dab 100644 (file)
@@ -145,15 +145,15 @@ nodc:
        addu    t0,s3
 noic:
        /* jump to main */
-       move    a0,s3                   /* icache line size */
-       move    a1,s4                   /* icache size */
-       move    a2,s1                   /* dcache line size */
+       move    a0,s4                   /* icache size */
+       move    a1,s3                   /* icache line size */
+       move    a2,s2                   /* dcache size */
 #ifdef IMAGE_COPY
        jal             t2
 #else
        jal     entry
 #endif
-       move    a3,s2                   /* dcache size */
+       move    a3,s1                   /* dcache line size */
 
        .set reorder
 END(_start)