Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:53

0001 /*
0002  * vectors.h Exception frame related contant and API.
0003  *
0004  *  This include file describe the data structure and the functions implemented
0005  *  by rtems to handle exceptions.
0006  *
0007  *
0008  *  MPC5xx port sponsored by Defence Research and Development Canada - Suffield
0009  *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
0010  *
0011  *  Derived from libbsp/powerpc/mbx8xx/vectors/vectors.h:
0012  *
0013  *  CopyRight (C) 1999 valette@crf.canon.fr
0014  *
0015  *  The license and distribution terms for this file may be
0016  *  found in the file LICENSE in this distribution or at
0017  *  http://www.rtems.org/license/LICENSE.
0018  */
0019 #ifndef _LIBCPU_VECTORS_H
0020 #define _LIBCPU_VECTORS_H
0021 
0022 #include <bsp/vectors.h>
0023 
0024 /*
0025  * Size of hardware vector table.
0026  */
0027 #define NUM_EXCEPTIONS      0x20
0028 
0029 #ifndef ASM
0030 
0031 /*
0032  * default raw exception handlers
0033  */
0034 
0035 extern  void default_exception_vector_code_prolog(void);
0036 extern  int  default_exception_vector_code_prolog_size;
0037 extern  void initialize_exceptions(void);
0038 
0039 typedef void rtems_exception_handler_t (CPU_Exception_frame* excPtr);
0040 
0041 /*
0042  * Exception handler table.
0043  *
0044  * This table contains pointers to assembly-language exception handlers.
0045  * The common exception prologue in vectors.S looks up an entry in this
0046  * table and jumps to it.  No return address is saved, so the handlers in
0047  * this table must return directly to the interrupted code.
0048  *
0049  * On entry to an exception handler, R1 points to a new exception stack
0050  * frame in which R3, R4, and LR have been saved.  R4 holds the exception
0051  * number.
0052  */
0053 extern rtems_exception_handler_t* exception_handler_table[NUM_EXCEPTIONS];
0054 
0055 #endif /* ASM */
0056 
0057 #endif /* _LIBCPU_VECTORS_H */