forked from Imagelibrary/rtems
arm/shared/abort/abort.c: Fix warnings and clean up
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
/*
|
||||
* ARM CPU Dependent Source
|
||||
*
|
||||
* If you want a small footprint RTEMS, pls use simple_abort.c
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2007 Ray Xu.
|
||||
* mailto: Rayx at gmail dot com
|
||||
*
|
||||
@@ -10,8 +14,6 @@
|
||||
* Copyright (c) 2002 Advent Networks, Inc
|
||||
* Jay Monkman <jmonkman@adventnetworks.com>
|
||||
*
|
||||
* If you want a small footprint RTEMS, pls use simple_abort.c
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
@@ -44,6 +46,12 @@
|
||||
#define SET_REG(r, ctx, v) (((uint32_t *)ctx)[r] = v)
|
||||
#define GET_OFFSET(insn) (insn & 0xfff)
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
void _print_full_context(uint32_t);
|
||||
void do_data_abort(uint32_t, uint32_t, Context_Control *);
|
||||
|
||||
uint32_t g_data_abort_cnt = 0;
|
||||
/*this is a big overhead for MCU only got 16K RAM*/
|
||||
uint32_t g_data_abort_insn_list[1024];
|
||||
@@ -57,8 +65,7 @@ char *_print_full_context_mode2txt[0x20]={
|
||||
[0x7]="abort", /* Abort */
|
||||
[0xb]="undef", /* Undefined */
|
||||
[0xf]="system" /* System */
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void _print_full_context(uint32_t spsr)
|
||||
{
|
||||
@@ -102,8 +109,11 @@ void _print_full_context(uint32_t spsr)
|
||||
* All unhandled instructions cause the system to hang.
|
||||
*/
|
||||
|
||||
void do_data_abort(uint32_t insn, uint32_t spsr,
|
||||
Context_Control *ctx)
|
||||
void do_data_abort(
|
||||
uint32_t insn,
|
||||
uint32_t spsr,
|
||||
Context_Control *ctx
|
||||
)
|
||||
{
|
||||
/* Clarify, which type is correct, CPU_Exception_frame or Context_Control */
|
||||
uint8_t decode;
|
||||
@@ -153,9 +163,10 @@ void do_data_abort(uint32_t insn, uint32_t spsr,
|
||||
|
||||
/* disable interrupts, wait forever */
|
||||
rtems_interrupt_disable(level);
|
||||
(void) level; /* avoid set but unused warning */
|
||||
|
||||
while(1) {
|
||||
continue;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user