src/sys/x86/x86/intr_machdep.c
/* Initialize the two 8259A's to a known-good shutdown state. */
Initialize the two 8259A's to a known-good shutdown state.
Initialize the two 8259A ' s to a known - good shutdown state .
void
atpic_reset(void)
{
	outb(IO_ICU1, ICW1_RESET | ICW1_IC4);
	outb(IO_ICU1 + ICU_IMR_OFFSET, IDT_IO_INTS);
	outb(IO_ICU1 + ICU_IMR_OFFSET, IRQ_MASK(ICU_SLAVEID));
	outb(IO_ICU1 + ICU_IMR_OFFSET, MASTER_MODE);
	outb(IO_ICU1 + ICU_IMR_OFFSET, 0xff);
	outb(IO_ICU1, OCW3_SEL | OCW3_RR);
	outb(IO_ICU2, ICW1_RESET | ICW1_IC4);
	outb(IO_ICU2 + ICU_IMR_OFFSET, IDT_IO_INTS + 8);
	outb(IO_ICU2 + ICU_IMR_OFFSET, ICU_SLAVEID);
	outb(IO_ICU2 + ICU_IMR_OFFSET, SLAVE_MODE);
	outb(IO_ICU2 + ICU_IMR_OFFSET, 0xff);
	outb(IO_ICU2, OCW3_SEL | OCW3_RR);
}
void atpic_reset ( void ) { outb ( IO_ICU1 , ICW1_RESET | ICW1_IC4 ) ; outb ( IO_ICU1 + ICU_IMR_OFFSET , IDT_IO_INTS ) ; outb ( IO_ICU1 + ICU_IMR_OFFSET , IRQ_MASK ( ICU_SLAVEID ) ) ; outb ( IO_ICU1 + ICU_IMR_OFFSET , MASTER_MODE ) ; outb ( IO_ICU1 + ICU_IMR_OFFSET , 0xff ) ; outb ( IO_ICU1 , OCW3_SEL | OCW3_RR ) ; outb ( IO_ICU2 , ICW1_RESET | ICW1_IC4 ) ; outb ( IO_ICU2 + ICU_IMR_OFFSET , IDT_IO_INTS + 8 ) ; outb ( IO_ICU2 + ICU_IMR_OFFSET , ICU_SLAVEID ) ; outb ( IO_ICU2 + ICU_IMR_OFFSET , SLAVE_MODE ) ; outb ( IO_ICU2 + ICU_IMR_OFFSET , 0xff ) ; outb ( IO_ICU2 , OCW3_SEL | OCW3_RR ) ; }
Initialize the two 8259A's to a known-good shutdown state.
Initialize the two 8259A ' s to a known - good shutdown state .