Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/include/exception.h

    r22a28a69 r7a0359b  
    2727 */
    2828
    29 /** @addtogroup mips32 
     29/** @addtogroup mips32
    3030 * @{
    3131 */
     
    3838#include <typedefs.h>
    3939#include <arch/cp0.h>
     40#include <trace.h>
    4041
    41 #define EXC_Int         0
    42 #define EXC_Mod         1
    43 #define EXC_TLBL        2
    44 #define EXC_TLBS        3
    45 #define EXC_AdEL        4
    46 #define EXC_AdES        5
    47 #define EXC_IBE         6
    48 #define EXC_DBE         7
    49 #define EXC_Sys         8
    50 #define EXC_Bp          9
    51 #define EXC_RI          10
    52 #define EXC_CpU         11
    53 #define EXC_Ov          12
    54 #define EXC_Tr          13
    55 #define EXC_VCEI        14
    56 #define EXC_FPE         15
    57 #define EXC_WATCH       23
    58 #define EXC_VCED        31
     42#define EXC_Int    0
     43#define EXC_Mod    1
     44#define EXC_TLBL   2
     45#define EXC_TLBS   3
     46#define EXC_AdEL   4
     47#define EXC_AdES   5
     48#define EXC_IBE    6
     49#define EXC_DBE    7
     50#define EXC_Sys    8
     51#define EXC_Bp     9
     52#define EXC_RI     10
     53#define EXC_CpU    11
     54#define EXC_Ov     12
     55#define EXC_Tr     13
     56#define EXC_VCEI   14
     57#define EXC_FPE    15
     58#define EXC_WATCH  23
     59#define EXC_VCED   31
    5960
    6061typedef struct istate {
     
    8283        uint32_t lo;
    8384        uint32_t hi;
    84 
    85         uint32_t status; /* cp0_status */
    86         uint32_t epc; /* cp0_epc */
    87         uint32_t k1; /* We use it as thread-local pointer */
     85       
     86        uint32_t status;  /* cp0_status */
     87        uint32_t epc;     /* cp0_epc */
     88        uint32_t k1;      /* We use it as thread-local pointer */
    8889} istate_t;
    8990
    90 static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr)
     91NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
     92    uintptr_t retaddr)
    9193{
    9294        istate->epc = retaddr;
     
    9496
    9597/** Return true if exception happened while in userspace */
    96 static inline int istate_from_uspace(istate_t *istate)
     98NO_TRACE static inline int istate_from_uspace(istate_t *istate)
    9799{
    98100        return istate->status & cp0_status_um_bit;
    99101}
    100 static inline unative_t istate_get_pc(istate_t *istate)
     102
     103NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)
    101104{
    102105        return istate->epc;
    103106}
    104 static inline unative_t istate_get_fp(istate_t *istate)
     107
     108NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)
    105109{
    106         return 0;       /* FIXME */
     110        /* FIXME */
     111       
     112        return 0;
    107113}
    108114
Note: See TracChangeset for help on using the changeset viewer.