Changeset ba1d939 in rtems


Ignore:
Timestamp:
Oct 7, 2014, 10:20:43 PM (6 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
04bafb5
Parents:
8aec7f5
git-author:
Joel Sherrill <joel.sherrill@…> (10/07/14 22:20:43)
git-committer:
Joel Sherrill <joel.sherrill@…> (10/09/14 15:11:55)
Message:

arm/shared/abort/abort.c: Fix warnings and clean up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/shared/abort/abort.c

    r8aec7f5 rba1d939  
    22 *  ARM CPU Dependent Source
    33 *
     4 *  If you want a small footprint RTEMS, pls use simple_abort.c
     5 */
     6
     7/*
    48 *  COPYRIGHT (c) 2007 Ray Xu.
    59 *  mailto: Rayx at gmail dot com
     
    1014 *  Copyright (c) 2002 Advent Networks, Inc
    1115 *      Jay Monkman <jmonkman@adventnetworks.com>
    12  *
    13  *  If you want a small footprint RTEMS, pls use simple_abort.c
    1416 *
    1517 *  The license and distribution terms for this file may be
     
    4547#define GET_OFFSET(insn)     (insn & 0xfff)
    4648
    47 uint32_t        g_data_abort_cnt = 0;
     49/*
     50 * Prototypes
     51 */
     52void _print_full_context(uint32_t);
     53void do_data_abort(uint32_t, uint32_t, Context_Control *);
     54
     55uint32_t g_data_abort_cnt = 0;
    4856/*this is a big overhead for MCU only got 16K RAM*/
    49 uint32_t        g_data_abort_insn_list[1024];
     57uint32_t g_data_abort_insn_list[1024];
    5058
    5159
    5260char *_print_full_context_mode2txt[0x20]={
    53    [0x0]="user",  /* User */
    54         [0x1]="fiq",   /* FIQ - Fast Interrupt Request */
    55         [0x2]="irq",   /* IRQ - Interrupt Request */
    56         [0x3]="super", /* Supervisor */
    57         [0x7]="abort", /* Abort */
    58         [0xb]="undef", /* Undefined */
    59         [0xf]="system" /* System */
    60     };
    61 
     61  [0x0]="user",  /* User */
     62  [0x1]="fiq",   /* FIQ - Fast Interrupt Request */
     63  [0x2]="irq",   /* IRQ - Interrupt Request */
     64  [0x3]="super", /* Supervisor */
     65  [0x7]="abort", /* Abort */
     66  [0xb]="undef", /* Undefined */
     67  [0xf]="system" /* System */
     68};
    6269
    6370void _print_full_context(uint32_t spsr)
     
    8390                [cpsr] "=&r" (cpsr)
    8491              : [spsr] "r" (spsr)
    85               : "cc");
     92              : "cc");
    8693
    8794    printk("Previous sp=0x%08x lr=0x%08x and actual cpsr=%08x\n",
     
    103110 */
    104111
    105 void do_data_abort(uint32_t   insn, uint32_t   spsr,
    106                     Context_Control *ctx)
     112void do_data_abort(
     113  uint32_t insn,
     114  uint32_t spsr,
     115  Context_Control *ctx
     116)
    107117{
    108118    /* Clarify, which type is correct, CPU_Exception_frame or Context_Control */
     
    154164    /* disable interrupts, wait forever */
    155165    rtems_interrupt_disable(level);
     166    (void) level; /* avoid set but unused warning */
     167
    156168    while(1) {
    157169        continue;
    158170    }
    159     return;
    160171}
    161172
Note: See TracChangeset for help on using the changeset viewer.