﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	field_blocks	field_dependson	field_seealso
93	Exception stack frame should not be constructed by a C function on arm32	Jakub Jermář	Vineeth Pillai	"The idea of setting the kernel stack and saving registers to it from a C function, which can have a compiler generated prologue, does not look as a good idea:

{{{
inline static void setup_stack_and_save_regs()
{
        asm volatile (
                ""ldr r13, =exc_stack\n""
                ""stmfd r13!, {r0}\n""
                ""mrs r0, spsr\n""
                ""and r0, r0, #0x1f\n""
                ""cmp r0, #0x10\n""
                ""bne 1f\n""

}}}

It looks like that we have been lucky so far.

The following functionality of exception.c needs to be moved to a proper .S file and gotten rid of the C wrapper or called from a proper ABI environment:

setup_stack_and_save_regs()
load_regs()
switch_to_irq_servicing_mode()
CALL_EXC_DISPATCH()
PROCESS_EXCEPTION()
reset_exception_entry()
swi_exception_entry()
undef_instr_exception_entry()
fiq_exception_entry()
prefetch_abort_exception_entry()
data_abort_exception_entry()
irq_exception_entry()
swi_exception()
irq_exception()"	defect	closed	major	0.4.1	helenos/kernel/arm32	mainline	fixed	arm32				
