Ignore:
Timestamp:
2010-11-22T15:39:53Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0eddb76, aae339e9
Parents:
9a1d8ab (diff), 8cd1aa5e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge development/ changes

File:
1 edited

Legend:

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

    r9a1d8ab r0b749a3  
    3737
    3838#include <typedefs.h>
    39 #include <verify.h>
    40 #include <trace.h>
     39#include <arch/istate.h>
    4140
    4241#define IVT_ITEMS  0
     
    4544#define VECTOR_TLB_SHOOTDOWN_IPI  0
    4645
    47 /*
    48  * On real hardware this stores the registers which
    49  * need to be preserved during interupts.
    50  */
    51 typedef struct istate {
    52         uintptr_t ip;
    53         uintptr_t fp;
    54         uint32_t stack[];
    55 } istate_t;
    56 
    57 NO_TRACE static inline int istate_from_uspace(istate_t *istate)
    58     REQUIRES_EXTENT_MUTABLE(istate)
    59 {
    60         /* On real hardware this checks whether the interrupted
    61            context originated from user space. */
    62        
    63         return !(istate->ip & 0x80000000);
    64 }
    65 
    66 NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
    67     uintptr_t retaddr)
    68     WRITES(&istate->ip)
    69 {
    70         /* On real hardware this sets the instruction pointer. */
    71        
    72         istate->ip = retaddr;
    73 }
    74 
    75 NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)
    76     REQUIRES_EXTENT_MUTABLE(istate)
    77 {
    78         /* On real hardware this returns the instruction pointer. */
    79        
    80         return istate->ip;
    81 }
    82 
    83 NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)
    84     REQUIRES_EXTENT_MUTABLE(istate)
    85 {
    86         /* On real hardware this returns the frame pointer. */
    87        
    88         return istate->fp;
    89 }
    90 
    9146#endif
    9247
Note: See TracChangeset for help on using the changeset viewer.