diff options
Diffstat (limited to 'arch/sh/kernel/head.S')
-rw-r--r-- | arch/sh/kernel/head.S | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/arch/sh/kernel/head.S b/arch/sh/kernel/head.S index f5f53d14f245..6aca4bc6ec5d 100644 --- a/arch/sh/kernel/head.S +++ b/arch/sh/kernel/head.S | |||
@@ -33,7 +33,7 @@ ENTRY(empty_zero_page) | |||
33 | .long 0x00360000 /* INITRD_START */ | 33 | .long 0x00360000 /* INITRD_START */ |
34 | .long 0x000a0000 /* INITRD_SIZE */ | 34 | .long 0x000a0000 /* INITRD_SIZE */ |
35 | .long 0 | 35 | .long 0 |
36 | .balign 4096,0,4096 | 36 | .balign PAGE_SIZE,0,PAGE_SIZE |
37 | 37 | ||
38 | .text | 38 | .text |
39 | /* | 39 | /* |
@@ -53,8 +53,10 @@ ENTRY(_stext) | |||
53 | ldc r0, sr | 53 | ldc r0, sr |
54 | ! Initialize global interrupt mask | 54 | ! Initialize global interrupt mask |
55 | mov #0, r0 | 55 | mov #0, r0 |
56 | #ifdef CONFIG_CPU_HAS_SR_RB | ||
56 | ldc r0, r6_bank | 57 | ldc r0, r6_bank |
57 | 58 | #endif | |
59 | |||
58 | /* | 60 | /* |
59 | * Prefetch if possible to reduce cache miss penalty. | 61 | * Prefetch if possible to reduce cache miss penalty. |
60 | * | 62 | * |
@@ -68,11 +70,14 @@ ENTRY(_stext) | |||
68 | ! | 70 | ! |
69 | mov.l 2f, r0 | 71 | mov.l 2f, r0 |
70 | mov r0, r15 ! Set initial r15 (stack pointer) | 72 | mov r0, r15 ! Set initial r15 (stack pointer) |
71 | mov #(THREAD_SIZE >> 8), r1 | 73 | mov #(THREAD_SIZE >> 10), r1 |
72 | shll8 r1 ! r1 = THREAD_SIZE | 74 | shll8 r1 ! r1 = THREAD_SIZE |
75 | shll2 r1 | ||
73 | sub r1, r0 ! | 76 | sub r1, r0 ! |
77 | #ifdef CONFIG_CPU_HAS_SR_RB | ||
74 | ldc r0, r7_bank ! ... and initial thread_info | 78 | ldc r0, r7_bank ! ... and initial thread_info |
75 | 79 | #endif | |
80 | |||
76 | ! Clear BSS area | 81 | ! Clear BSS area |
77 | mov.l 3f, r1 | 82 | mov.l 3f, r1 |
78 | add #4, r1 | 83 | add #4, r1 |
@@ -95,7 +100,11 @@ ENTRY(_stext) | |||
95 | nop | 100 | nop |
96 | 101 | ||
97 | .balign 4 | 102 | .balign 4 |
103 | #if defined(CONFIG_CPU_SH2) | ||
104 | 1: .long 0x000000F0 ! IMASK=0xF | ||
105 | #else | ||
98 | 1: .long 0x400080F0 ! MD=1, RB=0, BL=0, FD=1, IMASK=0xF | 106 | 1: .long 0x400080F0 ! MD=1, RB=0, BL=0, FD=1, IMASK=0xF |
107 | #endif | ||
99 | 2: .long init_thread_union+THREAD_SIZE | 108 | 2: .long init_thread_union+THREAD_SIZE |
100 | 3: .long __bss_start | 109 | 3: .long __bss_start |
101 | 4: .long _end | 110 | 4: .long _end |