2 * linux/arch/nios2nommu/boot/compressed/head.S
8 #include <asm/asm-offsets.h>
9 #include <asm/asm-macros.h>
12 * This code can be loaded anywhere, as long as output will not
21 // flush the instruction cache
22 movia r1,NIOS2_ICACHE_SIZE
23 movi r2,NIOS2_ICACHE_LINE_SIZE
27 bgt r1, zero, text_init
28 // then flush the pipeline
30 // flush the data cache
31 movia r1,NIOS2_DCACHE_SIZE
32 movi r2,NIOS2_DCACHE_LINE_SIZE
36 bgt r1, zero, data_init
37 //------------------------------------------------------
38 // Zero out the .bss segment (uninitialized common data)
40 movia r2,__bss_start // presume nothing is between
41 movia r1,_end // the .bss and _end.
46 // set up the stack pointer, some where higher than _end. The stack space must be greater than 32K for decompress.
49 // save args passed from u-boot
56 * decompress the kernel
58 call decompress_kernel
61 // flush all cache after loading
62 // flush the data cache
63 movia r1,NIOS2_DCACHE_SIZE
64 movi r2,NIOS2_DCACHE_LINE_SIZE
68 bgt r1, zero, data_flush
69 // flush the instruction cache
70 movia r1,NIOS2_ICACHE_SIZE
71 movi r2,NIOS2_ICACHE_LINE_SIZE
75 bgt r1, zero, text_flush
76 // then flush the pipeline
78 // pass saved args to kernel
83 movia r1,LINUX_SDRAM_START
87 fake_headers_as_bzImage: