From b07a4e89564889bdde5a35afdf3973edbf36f374 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Mon, 29 Apr 2019 23:51:25 +0200 Subject: [PATCH 1/2] minor enhancements --- kaleid/kernel/cpu/idt.c | 2 ++ kaleid/kernel/io/keyb.c | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/kaleid/kernel/cpu/idt.c b/kaleid/kernel/cpu/idt.c index 5141104..4f3ca1e 100644 --- a/kaleid/kernel/cpu/idt.c +++ b/kaleid/kernel/cpu/idt.c @@ -218,6 +218,7 @@ void IsrHandler(ISRFrame_t *regs) } bprintf(BStdOut, "[ISR 0x%x] %s\n", regs->intNo, "Unknown ISR Exception"); + BStdOut->flusher(BStdOut); IoSendEOItoPIC(regs->intNo); /* KeStartPanic("[ISR 0x%x] Unknown ISR Exception Abort\n" */ /* " Error code : 0x%x\n" */ @@ -266,5 +267,6 @@ void IdtExceptionHandler(ISRFrame_t *regs) ); } else { bprintf(BStdOut, "[ISR 0x%x] %s\n", regs->intNo, exceptionMsg); + BStdOut->flusher(BStdOut); } } diff --git a/kaleid/kernel/io/keyb.c b/kaleid/kernel/io/keyb.c index d631e0b..02cc24e 100644 --- a/kaleid/kernel/io/keyb.c +++ b/kaleid/kernel/io/keyb.c @@ -32,7 +32,8 @@ void KeybPrint(char code) { if (code) { bprintf(BStdOut, "%c", ScanCodes[(int)code]); - BFlushBuf(BStdOut); + //bprintf(BStdOut, "%x ", code); + BStdOut->flusher(BStdOut); } } @@ -48,6 +49,9 @@ void ScanCodesInit(void) ScanCodes[0x09] = '8'; ScanCodes[0x0A] = '9'; ScanCodes[0x0B] = '0'; + ScanCodes[0x0C] = ' '; + ScanCodes[0x0D] = '+'; + ScanCodes[0x0E] = ' '; ScanCodes[0x10] = 'a'; ScanCodes[0x11] = 'z'; @@ -59,6 +63,8 @@ void ScanCodesInit(void) ScanCodes[0x17] = 'i'; ScanCodes[0x18] = 'o'; ScanCodes[0x19] = 'p'; + ScanCodes[0x1A] = '^'; + ScanCodes[0x1B] = '$'; ScanCodes[0x1E] = 'q'; ScanCodes[0x1F] = 's'; @@ -69,6 +75,9 @@ void ScanCodesInit(void) ScanCodes[0x24] = 'j'; ScanCodes[0x25] = 'k'; ScanCodes[0x26] = 'l'; + ScanCodes[0x27] = 'm'; + ScanCodes[0x28] = 'u'; + ScanCodes[0x29] = '*'; ScanCodes[0x2C] = 'w'; ScanCodes[0x2D] = 'x'; @@ -76,7 +85,10 @@ void ScanCodesInit(void) ScanCodes[0x2F] = 'v'; ScanCodes[0x30] = 'b'; ScanCodes[0x31] = 'n'; - ScanCodes[0x32] = 'm'; + ScanCodes[0x32] = ','; + ScanCodes[0x33] = ';'; + ScanCodes[0x34] = ':'; + ScanCodes[0x35] = '!'; ScanCodes[0x1C] = '\n'; ScanCodes[0x39] = ' '; From ba94035200d63b1c2568ffbba425bafcd9aea93a Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Mon, 29 Apr 2019 23:52:53 +0200 Subject: [PATCH 2/2] minor enhancements --- kaleid/kernel/cpu/idt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kaleid/kernel/cpu/idt.c b/kaleid/kernel/cpu/idt.c index 4f3ca1e..37a7548 100644 --- a/kaleid/kernel/cpu/idt.c +++ b/kaleid/kernel/cpu/idt.c @@ -155,8 +155,8 @@ static void EnablePIC(void) IoWriteByteOnPort(0xa0, 0x11); // Set ICW2 (IRQ base offsets) - IoWriteByteOnPort(0x21, 0x20); //0x20 is the first free interrupt - IoWriteByteOnPort(0xa1, 0x28); + IoWriteByteOnPort(0x21, 0x20); //0x20 is the first free interrupt for IRQ0 + IoWriteByteOnPort(0xa1, 0x28); // PIC2 is offseted to 0x28 // Set ICW3 IoWriteByteOnPort(0x21, 0x4);