cleaned up some log messages, polished up the kb driver a bit, etc

This commit is contained in:
2025-06-03 20:51:25 -04:00
parent 01076e24b8
commit e471564f89
6 changed files with 138 additions and 21 deletions

View File

@ -56,7 +56,7 @@ void pic_disable(void)
outb(PIC1_DATA, 0xFF);
outb(PIC2_DATA, 0xFF);
#ifdef __TESTING__
kinfo("Disabled the PIC");
kinfo("Masked off the PIC");
#endif
}
@ -72,10 +72,14 @@ void IRQ_set_mask(uint8_t IRQline) // Masked IRQlines are ignored by the PIC, ma
IRQline -= 8;
}
printf("%x %x\n", port, IRQline);
value = inb(port) | (1 << IRQline);
outb(port, value);
#ifdef __TESTING__
kinfo("Masked IRQ line");
printf("IRQ line: %d\n", IRQline);
#endif
}
void IRQ_clear_mask(uint8_t IRQline)
@ -92,6 +96,10 @@ void IRQ_clear_mask(uint8_t IRQline)
value = inb(port) & ~(1 << IRQline);
outb(port, value);
#ifdef __TESTING__
kinfo("Cleared mask from IRQ line");
printf("IRQ line: %d\n", IRQline);
#endif
}
static uint16_t __pic_get_irq_reg(int ocw3)