Changeset 60898b6 in mainline for kernel/arch/ia32/include/interrupt.h


Ignore:
Timestamp:
2010-11-05T16:17:48Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
08042bd
Parents:
a63ff7d (diff), a66e2993 (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/ia32/include/interrupt.h

    ra63ff7d r60898b6  
    3737
    3838#include <typedefs.h>
     39#include <arch/istate.h>
    3940#include <arch/pm.h>
    40 #include <trace.h>
    4141
    4242#define IVT_ITEMS  IDT_ITEMS
     
    7171#define VECTOR_DEBUG_IPI          (IVT_FREEBASE + 2)
    7272
    73 typedef struct istate {
    74         /*
    75          * The strange order of the GPRs is given by the requirement to use the
    76          * istate structure for both regular interrupts and exceptions as well
    77          * as for syscall handlers which use this order as an optimization.
    78          */
    79         uint32_t edx;
    80         uint32_t ecx;
    81         uint32_t ebx;
    82         uint32_t esi;
    83         uint32_t edi;
    84         uint32_t ebp;
    85         uint32_t eax;
    86        
    87         uint32_t ebp_frame;  /* imitation of frame pointer linkage */
    88         uint32_t eip_frame;  /* imitation of return address linkage */
    89        
    90         uint32_t gs;
    91         uint32_t fs;
    92         uint32_t es;
    93         uint32_t ds;
    94        
    95         uint32_t error_word;  /* real or fake error word */
    96         uint32_t eip;
    97         uint32_t cs;
    98         uint32_t eflags;
    99         uint32_t esp;         /* only if istate_t is from uspace */
    100         uint32_t ss;          /* only if istate_t is from uspace */
    101 } istate_t;
    102 
    103 /** Return true if exception happened while in userspace */
    104 NO_TRACE static inline int istate_from_uspace(istate_t *istate)
    105 {
    106         return !(istate->eip & 0x80000000);
    107 }
    108 
    109 NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
    110     uintptr_t retaddr)
    111 {
    112         istate->eip = retaddr;
    113 }
    114 
    115 NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)
    116 {
    117         return istate->eip;
    118 }
    119 
    120 NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)
    121 {
    122         return istate->ebp;
    123 }
    124 
    12573extern void (* disable_irqs_function)(uint16_t);
    12674extern void (* enable_irqs_function)(uint16_t);
Note: See TracChangeset for help on using the changeset viewer.