Subversion Repositories HelenOS

Rev

Rev 2089 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2089 Rev 2612
Line 39... Line 39...
39
#include <arch/pm.h>
39
#include <arch/pm.h>
40
 
40
 
41
#define IVT_ITEMS       IDT_ITEMS
41
#define IVT_ITEMS       IDT_ITEMS
42
#define IVT_FIRST       0
42
#define IVT_FIRST       0
43
 
43
 
44
#define EXC_COUNT   32
44
#define EXC_COUNT       32
45
#define IRQ_COUNT   16
45
#define IRQ_COUNT       16
46
 
46
 
47
#define IVT_EXCBASE     0
47
#define IVT_EXCBASE     0
48
#define IVT_IRQBASE     (IVT_EXCBASE + EXC_COUNT)
48
#define IVT_IRQBASE     (IVT_EXCBASE + EXC_COUNT)
49
#define IVT_FREEBASE    (IVT_IRQBASE + IRQ_COUNT)
49
#define IVT_FREEBASE        (IVT_IRQBASE + IRQ_COUNT)
50
 
50
 
51
#define IRQ_CLK         0
51
#define IRQ_CLK         0
52
#define IRQ_KBD         1
52
#define IRQ_KBD         1
53
#define IRQ_PIC1        2
53
#define IRQ_PIC1        2
54
#define IRQ_PIC_SPUR    7
54
#define IRQ_PIC_SPUR        7
55
#define IRQ_MOUSE       12
55
#define IRQ_MOUSE       12
56
 
56
 
57
/* this one must have four least significant bits set to ones */
57
/* this one must have four least significant bits set to ones */
58
#define VECTOR_APIC_SPUR    (IVT_ITEMS - 1)
58
#define VECTOR_APIC_SPUR    (IVT_ITEMS - 1)
59
 
59
 
60
#if (((VECTOR_APIC_SPUR + 1) % 16) || VECTOR_APIC_SPUR >= IVT_ITEMS)
60
#if (((VECTOR_APIC_SPUR + 1) % 16) || VECTOR_APIC_SPUR >= IVT_ITEMS)
61
#error Wrong definition of VECTOR_APIC_SPUR
61
#error Wrong definition of VECTOR_APIC_SPUR
62
#endif
62
#endif
63
 
63
 
64
#define VECTOR_DEBUG                1
64
#define VECTOR_DEBUG            1
65
#define VECTOR_CLK                  (IVT_IRQBASE + IRQ_CLK)
65
#define VECTOR_CLK          (IVT_IRQBASE + IRQ_CLK)
66
#define VECTOR_PIC_SPUR             (IVT_IRQBASE + IRQ_PIC_SPUR)
66
#define VECTOR_PIC_SPUR         (IVT_IRQBASE + IRQ_PIC_SPUR)
67
#define VECTOR_SYSCALL              IVT_FREEBASE
67
#define VECTOR_SYSCALL          IVT_FREEBASE
68
#define VECTOR_TLB_SHOOTDOWN_IPI    (IVT_FREEBASE + 1)
68
#define VECTOR_TLB_SHOOTDOWN_IPI    (IVT_FREEBASE + 1)
69
#define VECTOR_DEBUG_IPI            (IVT_FREEBASE + 2)
69
#define VECTOR_DEBUG_IPI        (IVT_FREEBASE + 2)
70
 
70
 
71
/** This is passed to interrupt handlers */
71
/** This is passed to interrupt handlers */
72
typedef struct {
72
typedef struct {
73
    uint64_t rax;
73
    uint64_t rax;
74
    uint64_t rbx;
74
    uint64_t rbx;