Subversion Repositories HelenOS

Rev

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

Rev 1939 Rev 1956
Line 43... Line 43...
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
 
55
 
56
/* this one must have four least significant bits set to ones */
56
/* this one must have four least significant bits set to ones */
57
#define VECTOR_APIC_SPUR    (IVT_ITEMS-1)
57
#define VECTOR_APIC_SPUR    (IVT_ITEMS - 1)
58
 
58
 
59
#if (((VECTOR_APIC_SPUR + 1)%16) || VECTOR_APIC_SPUR >= IVT_ITEMS)
59
#if (((VECTOR_APIC_SPUR + 1) % 16) || VECTOR_APIC_SPUR >= IVT_ITEMS)
60
#error Wrong definition of VECTOR_APIC_SPUR
60
#error Wrong definition of VECTOR_APIC_SPUR
61
#endif
61
#endif
62
 
62
 
63
#define VECTOR_DEBUG            1
63
#define VECTOR_DEBUG                1
64
#define VECTOR_PIC_SPUR     (IVT_IRQBASE+IRQ_PIC_SPUR)
-
 
65
#define VECTOR_CLK      (IVT_IRQBASE+IRQ_CLK)
64
#define VECTOR_CLK                  (IVT_IRQBASE + IRQ_CLK)
66
#define VECTOR_KBD      (IVT_IRQBASE+IRQ_KBD)
65
#define VECTOR_PIC_SPUR             (IVT_IRQBASE + IRQ_PIC_SPUR)
67
 
-
 
68
#define VECTOR_SYSCALL          (IVT_FREEBASE+0)
66
#define VECTOR_SYSCALL              IVT_FREEBASE
69
#define VECTOR_TLB_SHOOTDOWN_IPI    (IVT_FREEBASE+1)
67
#define VECTOR_TLB_SHOOTDOWN_IPI    (IVT_FREEBASE + 1)
70
#define VECTOR_DEBUG_IPI                (IVT_FREEBASE+2)
68
#define VECTOR_DEBUG_IPI            (IVT_FREEBASE + 2)
71
 
69
 
72
struct istate {
70
struct istate {
73
    uint32_t eax;
71
    uint32_t eax;
74
    uint32_t ecx;
72
    uint32_t ecx;
75
    uint32_t edx;
73
    uint32_t edx;
Line 108... Line 106...
108
 
106
 
109
extern void (* disable_irqs_function)(uint16_t irqmask);
107
extern void (* disable_irqs_function)(uint16_t irqmask);
110
extern void (* enable_irqs_function)(uint16_t irqmask);
108
extern void (* enable_irqs_function)(uint16_t irqmask);
111
extern void (* eoi_function)(void);
109
extern void (* eoi_function)(void);
112
 
110
 
113
extern void PRINT_INFO_ERRCODE(istate_t *istate);
111
extern void decode_istate(istate_t *istate);
114
extern void null_interrupt(int n, istate_t *istate);
112
extern void interrupt_init(void);
115
extern void gp_fault(int n, istate_t *istate);
-
 
116
extern void nm_fault(int n, istate_t *istate);
-
 
117
extern void ss_fault(int n, istate_t *istate);
-
 
118
extern void simd_fp_exception(int n, istate_t *istate);
-
 
119
extern void syscall(int n, istate_t *istate);
-
 
120
extern void tlb_shootdown_ipi(int n, istate_t *istate);
-
 
121
 
-
 
122
extern void trap_virtual_enable_irqs(uint16_t irqmask);
113
extern void trap_virtual_enable_irqs(uint16_t irqmask);
123
extern void trap_virtual_disable_irqs(uint16_t irqmask);
114
extern void trap_virtual_disable_irqs(uint16_t irqmask);
124
extern void trap_virtual_eoi(void);
-
 
125
 
115
 
126
#endif
116
#endif
127
 
117
 
128
/** @}
118
/** @}
129
 */
119
 */