pl: add debug_read

This commit is contained in:
Loïc Grégoire
2026-06-27 16:29:55 -04:00
parent c10f5a6984
commit 020a6c7d60
2 changed files with 12 additions and 0 deletions
+7
View File
@@ -102,6 +102,13 @@ pub fn debug_write(c: u8) void {
com1_write(c);
}
pub fn debug_read() u8 {
while ((amd64.inb(com1 + 0x5) & 0x01) == 0) {
std.atomic.spinLoopHint();
}
return amd64.inb(com1);
}
pub fn arm_timer(deadline: r.Nanoseconds) void {
apic.arm_timer(deadline);
}