forked from Imagelibrary/rtems
arm: Add and use _ARM_Exception_default()
This commit is contained in:
@@ -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_low.S
|
||||||
libscorecpu_a_SOURCES += arm_exc_handler_high.c
|
libscorecpu_a_SOURCES += arm_exc_handler_high.c
|
||||||
libscorecpu_a_SOURCES += arm-exception-frame-print.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-initialize.c
|
||||||
libscorecpu_a_SOURCES += armv7m-context-restore.c
|
libscorecpu_a_SOURCES += armv7m-context-restore.c
|
||||||
libscorecpu_a_SOURCES += armv7m-context-switch.c
|
libscorecpu_a_SOURCES += armv7m-context-switch.c
|
||||||
|
|||||||
25
cpukit/score/cpu/arm/arm-exception-default.c
Normal file
25
cpukit/score/cpu/arm/arm-exception-default.c
Normal 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 );
|
||||||
|
}
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#ifdef ARM_MULTILIB_ARCH_V4
|
#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_set_handler
|
||||||
.globl _ARMV4_Exception_data_abort
|
.globl _ARMV4_Exception_data_abort
|
||||||
@@ -110,9 +110,8 @@ save_more_context:
|
|||||||
/* Call high level handler */
|
/* Call high level handler */
|
||||||
ldr r2, [r6]
|
ldr r2, [r6]
|
||||||
cmp r2, #0
|
cmp r2, #0
|
||||||
ldreq r2, =rtems_fatal_error_occurred
|
ldreq r2, =_ARM_Exception_default
|
||||||
movne r0, sp
|
mov r0, sp
|
||||||
moveq r0, #0xaa
|
|
||||||
#ifndef __thumb__
|
#ifndef __thumb__
|
||||||
mov lr, pc
|
mov lr, pc
|
||||||
mov pc, r2
|
mov pc, r2
|
||||||
|
|||||||
@@ -573,6 +573,8 @@ typedef CPU_Interrupt_frame CPU_Exception_frame;
|
|||||||
|
|
||||||
void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
|
void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
|
||||||
|
|
||||||
|
void _ARM_Exception_default( CPU_Exception_frame *frame );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user