diff options
Diffstat (limited to 'arch/microblaze/kernel/head.S')
-rw-r--r-- | arch/microblaze/kernel/head.S | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S index 778a5ce2e4fc..77320b8fc16a 100644 --- a/arch/microblaze/kernel/head.S +++ b/arch/microblaze/kernel/head.S | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/mmu.h> | 39 | #include <asm/mmu.h> |
40 | #include <asm/processor.h> | 40 | #include <asm/processor.h> |
41 | 41 | ||
42 | .data | 42 | .section .data |
43 | .global empty_zero_page | 43 | .global empty_zero_page |
44 | .align 12 | 44 | .align 12 |
45 | empty_zero_page: | 45 | empty_zero_page: |
@@ -50,6 +50,11 @@ swapper_pg_dir: | |||
50 | 50 | ||
51 | #endif /* CONFIG_MMU */ | 51 | #endif /* CONFIG_MMU */ |
52 | 52 | ||
53 | .section .rodata | ||
54 | .align 4 | ||
55 | endian_check: | ||
56 | .word 1 | ||
57 | |||
53 | __HEAD | 58 | __HEAD |
54 | ENTRY(_start) | 59 | ENTRY(_start) |
55 | #if CONFIG_KERNEL_BASE_ADDR == 0 | 60 | #if CONFIG_KERNEL_BASE_ADDR == 0 |
@@ -79,10 +84,7 @@ real_start: | |||
79 | /* Does r7 point to a valid FDT? Load HEADER magic number */ | 84 | /* Does r7 point to a valid FDT? Load HEADER magic number */ |
80 | /* Run time Big/Little endian platform */ | 85 | /* Run time Big/Little endian platform */ |
81 | /* Save 1 as word and load byte - 0 - BIG, 1 - LITTLE */ | 86 | /* Save 1 as word and load byte - 0 - BIG, 1 - LITTLE */ |
82 | addik r11, r0, 0x1 /* BIG/LITTLE checking value */ | 87 | lbui r11, r0, TOPHYS(endian_check) |
83 | /* __bss_start will be zeroed later - it is just temp location */ | ||
84 | swi r11, r0, TOPHYS(__bss_start) | ||
85 | lbui r11, r0, TOPHYS(__bss_start) | ||
86 | beqid r11, big_endian /* DO NOT break delay stop dependency */ | 88 | beqid r11, big_endian /* DO NOT break delay stop dependency */ |
87 | lw r11, r0, r7 /* Big endian load in delay slot */ | 89 | lw r11, r0, r7 /* Big endian load in delay slot */ |
88 | lwr r11, r0, r7 /* Little endian load */ | 90 | lwr r11, r0, r7 /* Little endian load */ |
@@ -222,26 +224,26 @@ start_here: | |||
222 | #endif /* CONFIG_MMU */ | 224 | #endif /* CONFIG_MMU */ |
223 | 225 | ||
224 | /* Initialize small data anchors */ | 226 | /* Initialize small data anchors */ |
225 | la r13, r0, _KERNEL_SDA_BASE_ | 227 | addik r13, r0, _KERNEL_SDA_BASE_ |
226 | la r2, r0, _KERNEL_SDA2_BASE_ | 228 | addik r2, r0, _KERNEL_SDA2_BASE_ |
227 | 229 | ||
228 | /* Initialize stack pointer */ | 230 | /* Initialize stack pointer */ |
229 | la r1, r0, init_thread_union + THREAD_SIZE - 4 | 231 | addik r1, r0, init_thread_union + THREAD_SIZE - 4 |
230 | 232 | ||
231 | /* Initialize r31 with current task address */ | 233 | /* Initialize r31 with current task address */ |
232 | la r31, r0, init_task | 234 | addik r31, r0, init_task |
233 | 235 | ||
234 | /* | 236 | /* |
235 | * Call platform dependent initialize function. | 237 | * Call platform dependent initialize function. |
236 | * Please see $(ARCH)/mach-$(SUBARCH)/setup.c for | 238 | * Please see $(ARCH)/mach-$(SUBARCH)/setup.c for |
237 | * the function. | 239 | * the function. |
238 | */ | 240 | */ |
239 | la r9, r0, machine_early_init | 241 | addik r9, r0, machine_early_init |
240 | brald r15, r9 | 242 | brald r15, r9 |
241 | nop | 243 | nop |
242 | 244 | ||
243 | #ifndef CONFIG_MMU | 245 | #ifndef CONFIG_MMU |
244 | la r15, r0, machine_halt | 246 | addik r15, r0, machine_halt |
245 | braid start_kernel | 247 | braid start_kernel |
246 | nop | 248 | nop |
247 | #else | 249 | #else |