xv6

port of xv6 to x86-64
git clone http://frotz.net/git/xv6.git
Log | Files | Refs | README | LICENSE

traps.h (1548B)


      1 // x86 trap and interrupt constants.
      2 
      3 // Processor-defined:
      4 #define T_DIVIDE         0      // divide error
      5 #define T_DEBUG          1      // debug exception
      6 #define T_NMI            2      // non-maskable interrupt
      7 #define T_BRKPT          3      // breakpoint
      8 #define T_OFLOW          4      // overflow
      9 #define T_BOUND          5      // bounds check
     10 #define T_ILLOP          6      // illegal opcode
     11 #define T_DEVICE         7      // device not available
     12 #define T_DBLFLT         8      // double fault
     13 // #define T_COPROC      9      // reserved (not used since 486)
     14 #define T_TSS           10      // invalid task switch segment
     15 #define T_SEGNP         11      // segment not present
     16 #define T_STACK         12      // stack exception
     17 #define T_GPFLT         13      // general protection fault
     18 #define T_PGFLT         14      // page fault
     19 // #define T_RES        15      // reserved
     20 #define T_FPERR         16      // floating point error
     21 #define T_ALIGN         17      // aligment check
     22 #define T_MCHK          18      // machine check
     23 #define T_SIMDERR       19      // SIMD floating point error
     24 
     25 // These are arbitrarily chosen, but with care not to overlap
     26 // processor defined exceptions or interrupt vectors.
     27 #define T_SYSCALL       64      // system call
     28 #define T_DEFAULT      500      // catchall
     29 
     30 #define T_IRQ0          32      // IRQ 0 corresponds to int T_IRQ
     31 
     32 #define IRQ_TIMER        0
     33 #define IRQ_KBD          1
     34 #define IRQ_COM1         4
     35 #define IRQ_IDE         14
     36 #define IRQ_ERROR       19
     37 #define IRQ_SPURIOUS    31
     38