From 661d54463a860c16546fd5cd4c129b6555e3a2b8 Mon Sep 17 00:00:00 2001 From: Malo Lecomte Date: Sat, 17 Jul 2021 11:57:59 +0200 Subject: [PATCH] feat(pit): init pit --- k/k.c | 2 ++ k/pic/pic.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/k/k.c b/k/k.c index af3b618..1e8f316 100644 --- a/k/k.c +++ b/k/k.c @@ -27,6 +27,7 @@ #include "idt.h" #include "multiboot.h" #include "pic/pic.h" +#include "pic/pit.h" #include "serial.h" #include "stdio.h" @@ -36,6 +37,7 @@ static void k_init(void) init_gdt(); init_idt(); remap_pic(); + init_pit(); } void k_main(unsigned long magic, multiboot_info_t *info) diff --git a/k/pic/pic.c b/k/pic/pic.c index 13c8038..f964345 100644 --- a/k/pic/pic.c +++ b/k/pic/pic.c @@ -20,9 +20,8 @@ void remap_pic(void) outb(SLAVE_PORT_B, ICW4_INIT); // OCW1 - outb(MASTER_PORT_B, PIC_PIN_0 | PIC_PIN_2 | - PIC_PIN_3 | PIC_PIN_4 | PIC_PIN_5 | - PIC_PIN_6 | PIC_PIN_7); // masking PIT for now + outb(MASTER_PORT_B, PIC_PIN_2 | PIC_PIN_3 | PIC_PIN_4 | + PIC_PIN_5 | PIC_PIN_6 | PIC_PIN_7); asm volatile("sti"); }