Subversion Repositories HelenOS-historic

Rev

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

Rev 576 Rev 958
Line 37... Line 37...
37
/*
37
/*
38
 * This is the PIC driver.
38
 * This is the PIC driver.
39
 * Programmable Interrupt Controller for UP systems.
39
 * Programmable Interrupt Controller for UP systems.
40
 */
40
 */
41
 
41
 
42
static void pic_spurious(int n, void *stack);
42
static void pic_spurious(int n, istate_t *istate);
43
 
43
 
44
void i8259_init(void)
44
void i8259_init(void)
45
{
45
{
46
    /* ICW1: this is ICW1, ICW4 to follow */
46
    /* ICW1: this is ICW1, ICW4 to follow */
47
    outb(PIC_PIC0PORT1, PIC_ICW1 | PIC_NEEDICW4);
47
    outb(PIC_PIC0PORT1, PIC_ICW1 | PIC_NEEDICW4);
Line 68... Line 68...
68
    outb(PIC_PIC1PORT2, 1);
68
    outb(PIC_PIC1PORT2, 1);
69
 
69
 
70
    /*
70
    /*
71
     * Register interrupt handler for the PIC spurious interrupt.
71
     * Register interrupt handler for the PIC spurious interrupt.
72
     */
72
     */
73
    exc_register(VECTOR_PIC_SPUR, "pic_spurious", pic_spurious);   
73
    exc_register(VECTOR_PIC_SPUR, "pic_spurious", (iroutine) pic_spurious);
74
 
74
 
75
    /*
75
    /*
76
     * Set the enable/disable IRQs handlers.
76
     * Set the enable/disable IRQs handlers.
77
     * Set the End-of-Interrupt handler.
77
     * Set the End-of-Interrupt handler.
78
     */
78
     */
Line 116... Line 116...
116
{
116
{
117
    outb(0x20,0x20);
117
    outb(0x20,0x20);
118
    outb(0xa0,0x20);
118
    outb(0xa0,0x20);
119
}
119
}
120
 
120
 
121
void pic_spurious(int n, void *stack)
121
void pic_spurious(int n, istate_t *istate)
122
{
122
{
123
    printf("cpu%d: PIC spurious interrupt\n", CPU->id);
123
    printf("cpu%d: PIC spurious interrupt\n", CPU->id);
124
}
124
}