From 2dadbfc899df4179ca70c4ea04f74a5e190c2ae7 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Fri, 26 Sep 2025 13:17:41 -0400 Subject: fix usermode interrupts. add ability to define custom interrupt handlers --- device/initrd.c | 1 + device/portio_uart.c | 2 ++ 2 files changed, 3 insertions(+) (limited to 'device') diff --git a/device/initrd.c b/device/initrd.c index b57687c..e9b3533 100644 --- a/device/initrd.c +++ b/device/initrd.c @@ -5,6 +5,7 @@ #include "device/initrd.h" #include "boot.h" #include "object.h" +#include "api/init.h" #include "init.h" #include "bootargs.h" #include "print.h" diff --git a/device/portio_uart.c b/device/portio_uart.c index 9cc76f8..b049257 100644 --- a/device/portio_uart.c +++ b/device/portio_uart.c @@ -1,5 +1,6 @@ #ifdef ENABLE_PORTIO_UART #include "init.h" +#include "api/init.h" #include "device/portio_uart.h" #include "device/portio.h" @@ -59,6 +60,7 @@ void portio_uart_write(uint64_t dev, const char *s, int n) { for(int i = 0; i < n; i++) { + while((port_inb(dev + 5) & 0x20) == 0); port_outb(dev, s[i]); } } -- cgit v1.2.1