feat(pit): init pit

This commit is contained in:
aliamelo committed 2021-07-17 11:57:59 +02:00
1 parent 8762f55b24
commit 661d54463a
2 files changed
+4 -3

No files matched your search

+2
View File
@@ -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)
+2 -3
View File
@@ -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");
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.