Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/interrupt.h

    r598f90e r6d7f9bfe  
    3737#define KERN_sparc64_INTERRUPT_H_
    3838
    39 #include <typedefs.h>
    40 #include <arch/istate.h>
     39#include <arch/types.h>
     40#include <arch/regdef.h>
    4141
    42 #define IVT_ITEMS  15
    43 #define IVT_FIRST  1
     42#define IVT_ITEMS       15
     43#define IVT_FIRST       1
    4444
    4545/* This needs to be defined for inter-architecture API portability. */
    46 #define VECTOR_TLB_SHOOTDOWN_IPI  0
     46#define VECTOR_TLB_SHOOTDOWN_IPI        0
    4747
    4848enum {
    4949        IPI_TLB_SHOOTDOWN = VECTOR_TLB_SHOOTDOWN_IPI
    50 };
     50};             
     51
     52typedef struct istate {
     53        uint64_t        tnpc;
     54        uint64_t        tpc;
     55        uint64_t        tstate;
     56} istate_t;
     57
     58static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr)
     59{
     60        istate->tpc = retaddr;
     61}
     62
     63static inline int istate_from_uspace(istate_t *istate)
     64{
     65        return !(istate->tstate & TSTATE_PRIV_BIT);
     66}
     67
     68static inline unative_t istate_get_pc(istate_t *istate)
     69{
     70        return istate->tpc;
     71}
     72
     73static inline unative_t istate_get_fp(istate_t *istate)
     74{
     75        return 0;       /* TODO */
     76}
    5177
    5278#endif
Note: See TracChangeset for help on using the changeset viewer.