kmain: put pic mask things into separate function

This commit is contained in:
2025-03-21 18:06:51 +03:00
parent 49d6231325
commit eb098b77fe
+9 -3
View File
@@ -9,6 +9,13 @@
#include <stdint.h>
void apply_pic_masks()
{
//0x21 is master pic, 0xa1 is slave pic
outb(0x21,0xfc);//0b11111100 (bit 0 is PIT, bit 1 is keyboard and so on)
outb(0xa1,0xff);
}
void kmain()
{
terminal_initialize();
@@ -16,9 +23,8 @@ void kmain()
isr_install();
pic_remap(0x20, 0x28);
pit_init();
//only enable keyboard IRQs
outb(0x21,0xfc);
outb(0xa1,0xff);
apply_pic_masks();
printf("Kernel init sequence completed\n");