Changes in kernel/arch/amd64/include/interrupt.h [c0e9f3f:598f90e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/interrupt.h
rc0e9f3f r598f90e 37 37 38 38 #include <typedefs.h> 39 #include <arch/istate.h> 39 40 #include <arch/pm.h> 40 #include <trace.h>41 41 42 42 #define IVT_ITEMS IDT_ITEMS … … 71 71 #define VECTOR_DEBUG_IPI (IVT_FREEBASE + 2) 72 72 73 /** This is passed to interrupt handlers */74 typedef struct istate {75 uint64_t rax;76 uint64_t rbx;77 uint64_t rcx;78 uint64_t rdx;79 uint64_t rsi;80 uint64_t rdi;81 uint64_t rbp;82 uint64_t r8;83 uint64_t r9;84 uint64_t r10;85 uint64_t r11;86 uint64_t r12;87 uint64_t r13;88 uint64_t r14;89 uint64_t r15;90 uint64_t alignment; /* align rbp_frame on multiple of 16 */91 uint64_t rbp_frame; /* imitation of frame pointer linkage */92 uint64_t rip_frame; /* imitation of return address linkage */93 uint64_t error_word; /* real or fake error word */94 uint64_t rip;95 uint64_t cs;96 uint64_t rflags;97 uint64_t rsp; /* only if istate_t is from uspace */98 uint64_t ss; /* only if istate_t is from uspace */99 } istate_t;100 101 /** Return true if exception happened while in userspace */102 NO_TRACE static inline int istate_from_uspace(istate_t *istate)103 {104 return !(istate->rip & 0x8000000000000000);105 }106 107 NO_TRACE static inline void istate_set_retaddr(istate_t *istate,108 uintptr_t retaddr)109 {110 istate->rip = retaddr;111 }112 113 NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)114 {115 return istate->rip;116 }117 118 NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)119 {120 return istate->rbp;121 }122 123 73 extern void (* disable_irqs_function)(uint16_t); 124 74 extern void (* enable_irqs_function)(uint16_t);
Note:
See TracChangeset
for help on using the changeset viewer.