summaryrefslogtreecommitdiffstats
path: root/device/portio_uart.c
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2025-09-26 13:17:41 -0400
committerJon Santmyer <jon@jonsantmyer.com>2025-09-26 13:17:41 -0400
commit2dadbfc899df4179ca70c4ea04f74a5e190c2ae7 (patch)
treeb166aaa9af42406cd07fbaf150f93aefeb2fbe33 /device/portio_uart.c
parentddc4fbc15223e362896a9f42beca73f05f48e664 (diff)
downloadjove-kernel-2dadbfc899df4179ca70c4ea04f74a5e190c2ae7.tar.gz
jove-kernel-2dadbfc899df4179ca70c4ea04f74a5e190c2ae7.tar.bz2
jove-kernel-2dadbfc899df4179ca70c4ea04f74a5e190c2ae7.zip
fix usermode interrupts. add ability to define custom interrupt handlersmain
Diffstat (limited to 'device/portio_uart.c')
-rw-r--r--device/portio_uart.c2
1 files changed, 2 insertions, 0 deletions
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]);
}
}