Guo Ren | 9143a93 | 2018-09-05 14:25:07 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | |
| 3 | #include <linux/linkage.h> |
| 4 | #include <linux/init.h> |
| 5 | #include <asm/page.h> |
| 6 | #include <abi/entry.h> |
| 7 | |
| 8 | __HEAD |
| 9 | ENTRY(_start) |
Guo Ren | 205353f | 2019-04-12 19:08:34 +0800 | [diff] [blame] | 10 | SETUP_MMU |
Guo Ren | 9143a93 | 2018-09-05 14:25:07 +0800 | [diff] [blame] | 11 | |
| 12 | /* set stack point */ |
Guo Ren | 205353f | 2019-04-12 19:08:34 +0800 | [diff] [blame] | 13 | lrw r6, init_thread_union + THREAD_SIZE |
| 14 | mov sp, r6 |
Guo Ren | 9143a93 | 2018-09-05 14:25:07 +0800 | [diff] [blame] | 15 | |
| 16 | jmpi csky_start |
| 17 | END(_start) |
| 18 | |
| 19 | #ifdef CONFIG_SMP |
| 20 | .align 10 |
| 21 | ENTRY(_start_smp_secondary) |
Guo Ren | 205353f | 2019-04-12 19:08:34 +0800 | [diff] [blame] | 22 | SETUP_MMU |
Guo Ren | 9143a93 | 2018-09-05 14:25:07 +0800 | [diff] [blame] | 23 | |
Guo Ren | 0c8a32e | 2020-09-07 06:20:18 +0000 | [diff] [blame] | 24 | #ifdef CONFIG_PAGE_OFFSET_80000000 |
| 25 | lrw r6, secondary_msa1 |
Guo Ren | aefd946 | 2020-03-28 19:14:37 +0800 | [diff] [blame] | 26 | ld.w r6, (r6, 0) |
| 27 | mtcr r6, cr<31, 15> |
Guo Ren | 0c8a32e | 2020-09-07 06:20:18 +0000 | [diff] [blame] | 28 | #endif |
| 29 | |
| 30 | lrw r6, secondary_pgd |
| 31 | ld.w r6, (r6, 0) |
| 32 | mtcr r6, cr<28, 15> |
| 33 | mtcr r6, cr<29, 15> |
Guo Ren | aefd946 | 2020-03-28 19:14:37 +0800 | [diff] [blame] | 34 | |
Guo Ren | 9143a93 | 2018-09-05 14:25:07 +0800 | [diff] [blame] | 35 | /* set stack point */ |
Guo Ren | 205353f | 2019-04-12 19:08:34 +0800 | [diff] [blame] | 36 | lrw r6, secondary_stack |
| 37 | ld.w r6, (r6, 0) |
| 38 | mov sp, r6 |
Guo Ren | 9143a93 | 2018-09-05 14:25:07 +0800 | [diff] [blame] | 39 | |
| 40 | jmpi csky_start_secondary |
| 41 | END(_start_smp_secondary) |
| 42 | #endif |