From ea95dce7492279d69b3ca05c980a6aefda4ed64d Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Tue, 31 Dec 2019 00:19:46 +0100 Subject: [PATCH] Working on issue #76 : TSS --- kaleid/kernel/io/spkr.c | 2 +- kaleid/kernel/ke/idt.c | 4 ++-- kaleid/kernel/mm/gdt.c | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/kaleid/kernel/io/spkr.c b/kaleid/kernel/io/spkr.c index 697a7a9..74488e9 100644 --- a/kaleid/kernel/io/spkr.c +++ b/kaleid/kernel/io/spkr.c @@ -98,7 +98,7 @@ void IoDoStarWars(void) {440, 200}, {110, 200}, {110, 200}, {110, 200} }; - //bprintf(BStdOut, "\n"); + bprintf(BStdOut, "Address of the score : %p\n", &score[37]); for (uint i = 0; i < 40; i++) { //IoDoTone(score[i].tone, score[i].time); diff --git a/kaleid/kernel/ke/idt.c b/kaleid/kernel/ke/idt.c index d5dc7e2..5829914 100644 --- a/kaleid/kernel/ke/idt.c +++ b/kaleid/kernel/ke/idt.c @@ -132,7 +132,7 @@ void KeSetupIDT(void) KeSetIDTGate(0x09, (ulong)isr9, codeSeg, 0x8E, 0); KeSetIDTGate(0x0A, (ulong)isr10, codeSeg, 0x8E, 0); KeSetIDTGate(0x0B, (ulong)isr11, codeSeg, 0x8E, 0); - KeSetIDTGate(0x0C, (ulong)isr12, codeSeg, 0x8E, 1); + KeSetIDTGate(0x0C, (ulong)isr12, codeSeg, 0x8E, 0); KeSetIDTGate(0x0D, (ulong)isr13, codeSeg, 0x8E, 0); KeSetIDTGate(0x0E, (ulong)isr14, codeSeg, 0x8E, 0); KeSetIDTGate(0x0F, (ulong)isr15, codeSeg, 0x8E, 0); // INTEL RESERVED @@ -154,7 +154,7 @@ void KeSetupIDT(void) KeSetIDTGate(0x1F, (ulong)isr31, codeSeg, 0x8E, 0); // INTEL RESERVED // Set IDT IRQs Gates - KeSetIDTGate(0x20, (ulong)isr32, codeSeg, 0x8E, 0); + KeSetIDTGate(0x20, (ulong)isr32, codeSeg, 0x8E, 2); KeSetIDTGate(0x21, (ulong)isr33, codeSeg, 0x8E, 0); KeSetIDTGate(0x22, (ulong)isr34, codeSeg, 0x8E, 0); KeSetIDTGate(0x23, (ulong)isr35, codeSeg, 0x8E, 0); diff --git a/kaleid/kernel/mm/gdt.c b/kaleid/kernel/mm/gdt.c index eb3c4e3..2cc0477 100644 --- a/kaleid/kernel/mm/gdt.c +++ b/kaleid/kernel/mm/gdt.c @@ -53,7 +53,8 @@ void MmInitGdt(void) tssDesc.veryHighBase = ((ulong)&tss >> 32) & 0xFFFFFFFF; tssDesc.lowLimit = sizeof(tss); - tss.ist1 = 0x0007FFFF; // RESCUE STACK, GARANTIED FREE FOR USE BY OSDEV.ORG + tss.ist1 = 0x0007FFFF; // ISR RESCUE STACK, GARANTIED FREE FOR USE BY OSDEV.ORG + tss.ist2 = 0x00EFFFFF; // ISR STACK, GARANTIED FREE FOR USE BY OSDEV.ORG tss.iomap_base = sizeof(tss); memmove(&gdt[2], &tssDesc, sizeof(TssDescriptor_t));