diff options
Diffstat (limited to 'ports/ARM7/chsysasm.s')
-rw-r--r-- | ports/ARM7/chsysasm.s | 67 |
1 files changed, 25 insertions, 42 deletions
diff --git a/ports/ARM7/chsysasm.s b/ports/ARM7/chsysasm.s index 8af9e4b4e..cb64ed7b0 100644 --- a/ports/ARM7/chsysasm.s +++ b/ports/ARM7/chsysasm.s @@ -44,35 +44,38 @@ .balign 16
.code 16
.thumb_func
-.global _lock
-_lock:
+.global _sys_disable_thumb
+_sys_disable_thumb:
mov r0, pc
bx r0
.code 32
- mrs r0, CPSR
msr CPSR_c, #MODE_SYS | I_BIT
bx lr
.balign 16
.code 16
.thumb_func
-.global _unlock
-_unlock:
- mov r1, pc
- bx r1
+.global _sys_enable_thumb
+_sys_enable_thumb:
+ mov r0, pc
+ bx r0
.code 32
- msr CPSR_c, r0
+ msr CPSR_c, #MODE_SYS
bx lr
.balign 16
.code 16
.thumb_func
-.global _enable
-_enable:
+.global _sys_disable_all_thumb
+_sys_disable_all_thumb:
mov r0, pc
bx r0
.code 32
- msr CPSR_c, #MODE_SYS
+ mrs r0, CPSR
+ orr r0, #I_BIT
+ msr CPSR_c, r0
+ orr r0, #F_BIT
+ msr CPSR_c, r0
bx lr
#endif
@@ -80,15 +83,15 @@ _enable: #ifdef THUMB_PRESENT
.code 16
.thumb_func
-.global chSysSwitchI_thumb
-chSysSwitchI_thumb:
+.global _sys_switch_thumb
+_sys_switch_thumb:
mov r2, pc
bx r2
- // Jumps into chSysSwitchI in ARM mode
+ // Jumps into _sys_switch_arm in ARM mode
#endif
.code 32
-.global chSysSwitchI_arm
-chSysSwitchI_arm:
+.global _sys_switch_arm
+_sys_switch_arm:
#ifdef CH_CURRP_REGISTER_CACHE
stmfd sp!, {r4, r5, r6, r8, r9, r10, r11, lr}
str sp, [r0, #16]
@@ -142,16 +145,16 @@ chSysSwitchI_arm: #ifdef THUMB_NO_INTERWORKING
.code 16
.thumb_func
-.globl IrqCommon
-IrqCommon:
+.globl _sys_irq_common
+_sys_irq_common:
bl chSchRescRequiredI
mov lr, pc
bx lr
.code 32
#else /* !THUMB_NO_INTERWORKING */
.code 32
-.globl IrqCommon
-IrqCommon:
+.globl _sys_irq_common
+_sys_irq_common:
bl chSchRescRequiredI
#endif /* !THUMB_NO_INTERWORKING */
cmp r0, #0 // Simply returns if a
@@ -197,8 +200,8 @@ IrqCommon: */
.balign 16
.code 32
-.globl threadstart
-threadstart:
+.globl _sys_thread_start
+_sys_thread_start:
msr CPSR_c, #MODE_SYS
#ifndef THUMB_NO_INTERWORKING
mov r0, r5
@@ -215,23 +218,3 @@ threadstart: jmpr4:
bx r4
#endif /* !THUMB_NO_INTERWORKING */
-
-/*
- * System stop code.
- */
-.code 16
-.p2align 2,,
-.thumb_func
-.weak _halt16
-.globl _halt16
-_halt16:
- mov r0, pc
- bx r0
-.code 32
-.weak _halt32
-.globl _halt32
-_halt32:
- mrs r0, CPSR
- orr r0, #I_BIT | F_BIT
- msr CPSR_c, r0
-.loop: b .loop
|