From e8c6577617bffa4402c07c7aa20e3c24f03c1c20 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 6 Sep 2020 00:48:07 -0400 Subject: program loading, others big kernel additions: paging, elf loading, separate kernel and user page allocation it now properly loads and runs sd0:bin/init.elf still need to determine which disk was booted from, and start the init on that disk --- src/kernel/serial.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/kernel/serial.c') diff --git a/src/kernel/serial.c b/src/kernel/serial.c index 9ca8315..c492e1e 100644 --- a/src/kernel/serial.c +++ b/src/kernel/serial.c @@ -52,9 +52,7 @@ static const uint16_t ports[] = { CP_1, CP_2, CP_3, CP_4 }; -static bool error[] = { - false, false, false, false -}; +static bool error[4]; void reset_error(enum serial_port n) { error[n] = false; @@ -62,6 +60,7 @@ void reset_error(enum serial_port n) { void init_serial() { for (enum serial_port i = COM1; i <= COM4; ++i) { + error[i] = false; outb(ports[i] | CP_INT, 0); outb(ports[i] | CP_LINE, CL_BAUD); outb(ports[i] | CP_DIVLOW, 0x03);//38400 -- cgit v1.2.3