From cb4ebffe888adf5c2064c1b2444747c424e75da9 Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Mon, 6 Nov 2017 10:37:51 +0000 Subject: [PATCH] Add comments --- arch/pic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/pic.c b/arch/pic.c index f0e5223..0de4e6c 100644 --- a/arch/pic.c +++ b/arch/pic.c @@ -13,15 +13,19 @@ void pic_remap(const unsigned char master_irq_start, const unsigned char slave_i { logger_info_from("pic", "Remap the IRQ table."); + // Start the initialization sequence outportb(PIC_MASTER_COMMAND, 0x11); outportb(PIC_SLAVE_COMMAND, 0x11); + // Set IRQ vectors outportb(PIC_MASTER_DATA, master_irq_start); outportb(PIC_SLAVE_DATA, slave_irq_start); + // Connect master and slave with each other outportb(PIC_MASTER_DATA, 0x04); outportb(PIC_SLAVE_DATA, 0x02); + // 8086/88 (MCS-80/85) mode outportb(PIC_MASTER_DATA, 0x01); outportb(PIC_SLAVE_DATA, 0x01);