feat(pit): init pit
This commit is contained in:
parent
8762f55b24
commit
661d54463a
2
k/k.c
2
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)
|
||||
|
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user