From 71336bf445831c2269e11bbce543ec5815dd1c34 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 5 Aug 2013 17:27:35 +0200 Subject: arm: Fix ISR level context initialization --- cpukit/score/cpu/arm/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpukit/score/cpu/arm/cpu.c') diff --git a/cpukit/score/cpu/arm/cpu.c b/cpukit/score/cpu/arm/cpu.c index 70021365ad..1c1fe5d3de 100644 --- a/cpukit/score/cpu/arm/cpu.c +++ b/cpukit/score/cpu/arm/cpu.c @@ -76,7 +76,8 @@ void _CPU_Context_Initialize( { the_context->register_sp = (uint32_t) stack_area_begin + stack_area_size; the_context->register_lr = (uint32_t) entry_point; - the_context->register_cpsr = new_level | arm_cpu_mode; + the_context->register_cpsr = ( ( new_level != 0 ) ? ARM_PSR_I : 0 ) + | arm_cpu_mode; } /* Preprocessor magic for stringification of x */ -- cgit v1.2.3