| .. | .. |
|---|
| 59 | 59 | |
|---|
| 60 | 60 | .align 4 |
|---|
| 61 | 61 | .literal_position |
|---|
| 62 | | -.Lstartup: |
|---|
| 63 | | - .word _startup |
|---|
| 64 | | - |
|---|
| 65 | | - .align 4 |
|---|
| 66 | 62 | _SetupOCD: |
|---|
| 67 | 63 | /* |
|---|
| 68 | 64 | * Initialize WB, WS, and clear PS.EXCM (to allow loop instructions). |
|---|
| .. | .. |
|---|
| 99 | 95 | 1: |
|---|
| 100 | 96 | #endif |
|---|
| 101 | 97 | #endif |
|---|
| 102 | | - .end no-absolute-literals |
|---|
| 103 | 98 | |
|---|
| 104 | | - l32r a0, .Lstartup |
|---|
| 99 | + movi a0, _startup |
|---|
| 105 | 100 | jx a0 |
|---|
| 106 | 101 | |
|---|
| 107 | 102 | ENDPROC(_start) |
|---|
| 103 | + .end no-absolute-literals |
|---|
| 108 | 104 | |
|---|
| 109 | 105 | __REF |
|---|
| 110 | 106 | .literal_position |
|---|
| .. | .. |
|---|
| 197 | 193 | movi a1, start_info |
|---|
| 198 | 194 | l32i a1, a1, 0 |
|---|
| 199 | 195 | |
|---|
| 200 | | - movi a2, (1 << PS_WOE_BIT) | LOCKLEVEL |
|---|
| 196 | + movi a2, PS_WOE_MASK | LOCKLEVEL |
|---|
| 201 | 197 | # WOE=1, INTLEVEL=LOCKLEVEL, UM=0 |
|---|
| 202 | 198 | wsr a2, ps # (enable reg-windows; progmode stack) |
|---|
| 203 | 199 | rsync |
|---|
| .. | .. |
|---|
| 263 | 259 | isync |
|---|
| 264 | 260 | ___invalidate_icache_all a2 a3 |
|---|
| 265 | 261 | isync |
|---|
| 262 | + |
|---|
| 263 | +#ifdef CONFIG_XIP_KERNEL |
|---|
| 264 | + /* Setup bootstrap CPU stack in XIP kernel */ |
|---|
| 265 | + |
|---|
| 266 | + movi a1, start_info |
|---|
| 267 | + l32i a1, a1, 0 |
|---|
| 268 | +#endif |
|---|
| 266 | 269 | |
|---|
| 267 | 270 | movi a6, 0 |
|---|
| 268 | 271 | xsr a6, excsave1 |
|---|
| .. | .. |
|---|
| 359 | 362 | * DATA section |
|---|
| 360 | 363 | */ |
|---|
| 361 | 364 | |
|---|
| 362 | | - .section ".data.init.refok" |
|---|
| 363 | | - .align 4 |
|---|
| 365 | + __REFDATA |
|---|
| 366 | + .align 4 |
|---|
| 364 | 367 | ENTRY(start_info) |
|---|
| 365 | | - .long init_thread_union + KERNEL_STACK_SIZE |
|---|
| 368 | + .long init_thread_union + KERNEL_STACK_SIZE |
|---|
| 366 | 369 | |
|---|
| 367 | 370 | /* |
|---|
| 368 | 371 | * BSS section |
|---|