Ignore:
Timestamp:
2011-04-13T14:45:41Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
88634420
Parents:
cefb126 (diff), 17279ead (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 mainline changes.

File:
1 edited

Legend:

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

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