arm: Add and use _ARM_Exception_default()

This commit is contained in:
Sebastian Huber
2013-01-04 14:22:10 +01:00
parent 8d68773761
commit 50f3c42be5
4 changed files with 31 additions and 4 deletions

View File

@@ -20,6 +20,7 @@ libscorecpu_a_SOURCES += arm_exc_interrupt.S
libscorecpu_a_SOURCES += arm_exc_handler_low.S
libscorecpu_a_SOURCES += arm_exc_handler_high.c
libscorecpu_a_SOURCES += arm-exception-frame-print.c
libscorecpu_a_SOURCES += arm-exception-default.c
libscorecpu_a_SOURCES += armv7m-context-initialize.c
libscorecpu_a_SOURCES += armv7m-context-restore.c
libscorecpu_a_SOURCES += armv7m-context-switch.c

View File

@@ -0,0 +1,25 @@
/*
* Copyright (c) 2013 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Obere Lagerstr. 30
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/score/cpu.h>
#include <rtems/fatal.h>
void _ARM_Exception_default( CPU_Exception_frame *frame )
{
rtems_fatal( RTEMS_FATAL_SOURCE_EXCEPTION, (rtems_fatal_code) frame );
}

View File

@@ -28,7 +28,7 @@
#ifdef ARM_MULTILIB_ARCH_V4
.extern rtems_fatal_error_occurred
.extern _ARM_Exception_default
.globl _ARMV4_Exception_data_abort_set_handler
.globl _ARMV4_Exception_data_abort
@@ -110,9 +110,8 @@ save_more_context:
/* Call high level handler */
ldr r2, [r6]
cmp r2, #0
ldreq r2, =rtems_fatal_error_occurred
movne r0, sp
moveq r0, #0xaa
ldreq r2, =_ARM_Exception_default
mov r0, sp
#ifndef __thumb__
mov lr, pc
mov pc, r2

View File

@@ -573,6 +573,8 @@ typedef CPU_Interrupt_frame CPU_Exception_frame;
void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
void _ARM_Exception_default( CPU_Exception_frame *frame );
#ifdef __cplusplus
}
#endif