x86_64: add temporary serial driver for printk

This commit is contained in:
2023-02-08 21:28:14 +00:00
parent 56578dda38
commit b0b557d919
3 changed files with 50 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
#include <arch/serial.h>
#include <socks/libc/string.h>
#include <socks/libc/ctype.h>
#include <arch/ports.h>
@@ -75,6 +76,8 @@ static void handle_ctrl(int c)
static void vgacon_putchar(int c)
{
serial_putchar(SERIAL_PORT_A, c);
if (iscntrl(c)) {
handle_ctrl(c);
return;