summaryrefslogtreecommitdiffstats
path: root/arch/csky/abiv1
diff options
context:
space:
mode:
authorGuo Ren <ren_guo@c-sky.com>2019-04-12 19:08:34 +0800
committerGuo Ren <ren_guo@c-sky.com>2019-04-22 13:44:57 +0800
commit205353fa06cc5dbfe1949de013ba905bb151c702 (patch)
treea51d0bfb604e0794aa6a1665794e5fa98e3bdd1d /arch/csky/abiv1
parentb4bf274198bd415e66af0b54a2e181c59fd43ba4 (diff)
downloadlinux-205353fa06cc5dbfe1949de013ba905bb151c702.tar.bz2
csky: Support vmlinux bootup with MMU off
Modify SETUP_MMU macro to fit on both MMU-on or MMU-off enviornment and vmlinux could bootup from MMU off enviornment for some cases. Unify the style of _start and _start_smp_secondary in head.S to make head.S looks more concise and easy to understand. Signed-off-by: Guo Ren <ren_guo@c-sky.com> Cc: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/csky/abiv1')
-rw-r--r--arch/csky/abiv1/inc/abi/entry.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/arch/csky/abiv1/inc/abi/entry.h b/arch/csky/abiv1/inc/abi/entry.h
index 18e2023bf165..7ab78bd0f3b1 100644
--- a/arch/csky/abiv1/inc/abi/entry.h
+++ b/arch/csky/abiv1/inc/abi/entry.h
@@ -143,7 +143,12 @@
cpwcr \rx, cpcr8
.endm
-.macro SETUP_MMU rx
+.macro SETUP_MMU
+ /* Init psr and enable ee */
+ lrw r6, DEFAULT_PSR_VALUE
+ mtcr r6, psr
+ psrset ee
+
/* Select MMU as co-processor */
cpseti cp15
@@ -152,17 +157,17 @@
* 31 - 29 | 28 - 4 | 3 | 2 | 1 | 0
* BA Reserved C D V
*/
- cprcr \rx, cpcr30
- lsri \rx, 28
- lsli \rx, 28
- addi \rx, 0xe
- cpwcr \rx, cpcr30
-
- lsri \rx, 28
- addi \rx, 2
- lsli \rx, 28
- addi \rx, 0xe
- cpwcr \rx, cpcr31
+ cprcr r6, cpcr30
+ lsri r6, 28
+ lsli r6, 28
+ addi r6, 0xe
+ cpwcr r6, cpcr30
+
+ lsri r6, 28
+ addi r6, 2
+ lsli r6, 28
+ addi r6, 0xe
+ cpwcr r6, cpcr31
.endm
.macro ANDI_R3 rx, imm