[uart] Add first pass UART driver and logger

First attempt at a UART driver. I'm not sure it's the most stable. Now
that userspace is handling displaying logs, also removed serial and log
output support from the kernel.
This commit is contained in:
Justin C. Miller
2022-01-15 18:07:25 -08:00
parent 44d3918e4f
commit c631ec5ef5
40 changed files with 354 additions and 482 deletions

View File

@@ -3,15 +3,17 @@
#include <string.h>
#include "console.h"
#include "debug.h"
#include "log.h"
#include "logger.h"
#include "syscall.h"
extern "C" {
void syscall_invalid(uint64_t call);
}
size_t __counter_syscall_enter = 0;
size_t __counter_syscall_sysret = 0;
/*[[[cog code generation
from definitions.context import Context
@@ -27,12 +29,7 @@ uintptr_t syscall_registry[num_syscalls] __attribute__((section(".syscall_regist
void
syscall_invalid(uint64_t call)
{
console *cons = console::get();
cons->set_color(9);
cons->printf("\nReceived unknown syscall: %02x\n", call);
cons->set_color();
_halt();
log::warn(logs::syscall, "Received unknown syscall: %02x\n", call);
}
void