t-kernel team mailing list archive
-
t-kernel team
-
Mailing list archive
-
Message #00077
[PATCH] monitor: monhdr, enter monitor
From: Du Huanpeng <u74147@xxxxxxxxx>
Signed-off-by: Du Huanpeng <u74147@xxxxxxxxx>
---
tkernel_source/monitor/hwdepend/arm/cpu/monhdr.S | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tkernel_source/monitor/hwdepend/arm/cpu/monhdr.S b/tkernel_source/monitor/hwdepend/arm/cpu/monhdr.S
index a4d93b0..09a6004 100755
--- a/tkernel_source/monitor/hwdepend/arm/cpu/monhdr.S
+++ b/tkernel_source/monitor/hwdepend/arm/cpu/monhdr.S
@@ -71,19 +71,19 @@ _defaultHdr:
@ check mode, r4, 5, 6, 7
push {r4, r5, r6, r7, lr}
mrs r7, cpsr
- push {r7}
and r6, r7, #0x1F
cmp r6, #0x10 @ usr: Normal program execution mode
beq 100f
- bic r7, #0x1F
- orr r7, #0x13 @ svc: A protected mode for the operating system
- msr cpsr, r7
+ cmp r6, #0x13
+ bicne r7, #0x1F
+ orrne r7, #0x13 @ svc: A protected mode for the operating system
+ msrne cpsr, r7
- bl entMonitor
+ bl entMonitor @ don't switch modes in 'entMonitor'
- pop {r7}
+ mrs r7, spsr
msr cpsr, r7
100:
pop {r4, r5, r6, r7, pc}
--
1.9.1
References