Subversion Repositories HelenOS-historic

Rev

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

Rev 1595 Rev 1609
Line 43... Line 43...
43
        : "r" (1000)
43
        : "r" (1000)
44
    );
44
    );
45
}
45
}
46
 
46
 
47
 
47
 
-
 
48
/** Handler of external interrupts */
-
 
49
static void exception_external(int n, istate_t *istate)
-
 
50
{
-
 
51
    int inum;
-
 
52
 
-
 
53
    while ((inum = pic_get_pending()) != -1) {
-
 
54
        exc_dispatch(inum + INT_OFFSET, istate);
-
 
55
        pic_ack_interrupt(inum);
-
 
56
    }
-
 
57
}
-
 
58
 
-
 
59
 
48
static void exception_decrementer(int n, istate_t *istate)
60
static void exception_decrementer(int n, istate_t *istate)
49
{
61
{
50
    clock();
62
    clock();
51
    start_decrementer();
63
    start_decrementer();
52
}
64
}
53
 
65
 
54
 
66
 
55
/* Initialize basic tables for exception dispatching */
67
/* Initialize basic tables for exception dispatching */
56
void interrupt_init(void)
68
void interrupt_init(void)
57
{
69
{
-
 
70
    exc_register(VECTOR_DATA_STORAGE, "data_storage", pht_refill);
-
 
71
    exc_register(VECTOR_INSTRUCTION_STORAGE, "instruction_storage", pht_refill);
-
 
72
    exc_register(VECTOR_EXTERNAL, "external", exception_external);
58
    exc_register(VECTOR_DECREMENTER, "timer", exception_decrementer);
73
    exc_register(VECTOR_DECREMENTER, "timer", exception_decrementer);
59
}
74
}
60
 
75
 
61
 
76
 
62
/* Reregister irq to be IPC-ready */
-
 
63
void irq_ipc_bind_arch(__native irq)
77
static void ipc_int(int n, istate_t *istate)
64
{
78
{
65
    panic("not implemented\n");
79
    ipc_irq_send_notif(n - INT_OFFSET);
66
    /* TODO */
-
 
67
}
80
}
68
 
81
 
69
/** Handler of externul interrupts */
-
 
70
void extint_handler(int n, istate_t *istate)
-
 
71
{
-
 
72
    int inum;
-
 
73
 
82
 
74
    while ((inum = pic_get_pending()) != -1) {
83
/* Reregister irq to be IPC-ready */
75
        exc_dispatch(inum+INT_OFFSET, istate);
84
void irq_ipc_bind_arch(__native irq)
76
        pic_ack_interrupt(inum);
-
 
77
    }
85
{
-
 
86
    int_register(irq, "ipc_int", ipc_int);
78
}
87
}