From b905869a35f062a4e5072f10bec3a2ba3db0e365 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Wed, 30 Jul 2025 14:32:01 -0400 Subject: working userland with some invoke syscalls --- include/device/portio_uart.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 include/device/portio_uart.h (limited to 'include/device/portio_uart.h') diff --git a/include/device/portio_uart.h b/include/device/portio_uart.h new file mode 100644 index 0000000..1b521a1 --- /dev/null +++ b/include/device/portio_uart.h @@ -0,0 +1,27 @@ +#ifndef _JOVE_DEVICE_PORTIO_UART +#define _JOVE_DEVICE_PORTIO_UART 1 + +#include + +#define PORTIO_UART_COM1 0x3F8 + +#define PORTIO_UART_COM_THR(COM) COM +#define PORTIO_UART_COM_RBR(COM) COM +#define PORTIO_UART_COM_DLAB_DLL(COM) COM +#define PORTIO_UART_COM_IER(COM) (COM + 1) +#define PORTIO_UART_COM_DLAB_DLH(COM) (COM + 1) +#define PORTIO_UART_COM_IIR(COM) (COM + 2) +#define PORTIO_UART_COM_FCR(COM) (COM + 2) +#define PORTIO_UART_COM_LCR(COM) (COM + 3) +#define PORTIO_UART_COM_MCR(COM) (COM + 4) +#define PORTIO_UART_COM_LSR(COM) (COM + 5) +#define PORTIO_UART_COM_MSR(COM) (COM + 6) +#define PORTIO_UART_COM_SR(COM) (COM + 7) + +void +portio_uart_setup(void); + +void +portio_uart_write(uint64_t dev, const char *s, int n); + +#endif -- cgit v1.2.1