Working on issue #76 : TSS
This commit is contained in:
parent
c857d51239
commit
ea95dce749
|
@ -98,7 +98,7 @@ void IoDoStarWars(void)
|
||||||
{440, 200}, {110, 200}, {110, 200}, {110, 200}
|
{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++) {
|
for (uint i = 0; i < 40; i++) {
|
||||||
//IoDoTone(score[i].tone, score[i].time);
|
//IoDoTone(score[i].tone, score[i].time);
|
||||||
|
|
|
@ -132,7 +132,7 @@ void KeSetupIDT(void)
|
||||||
KeSetIDTGate(0x09, (ulong)isr9, codeSeg, 0x8E, 0);
|
KeSetIDTGate(0x09, (ulong)isr9, codeSeg, 0x8E, 0);
|
||||||
KeSetIDTGate(0x0A, (ulong)isr10, codeSeg, 0x8E, 0);
|
KeSetIDTGate(0x0A, (ulong)isr10, codeSeg, 0x8E, 0);
|
||||||
KeSetIDTGate(0x0B, (ulong)isr11, 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(0x0D, (ulong)isr13, codeSeg, 0x8E, 0);
|
||||||
KeSetIDTGate(0x0E, (ulong)isr14, codeSeg, 0x8E, 0);
|
KeSetIDTGate(0x0E, (ulong)isr14, codeSeg, 0x8E, 0);
|
||||||
KeSetIDTGate(0x0F, (ulong)isr15, codeSeg, 0x8E, 0); // INTEL RESERVED
|
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
|
KeSetIDTGate(0x1F, (ulong)isr31, codeSeg, 0x8E, 0); // INTEL RESERVED
|
||||||
|
|
||||||
// Set IDT IRQs Gates
|
// 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(0x21, (ulong)isr33, codeSeg, 0x8E, 0);
|
||||||
KeSetIDTGate(0x22, (ulong)isr34, codeSeg, 0x8E, 0);
|
KeSetIDTGate(0x22, (ulong)isr34, codeSeg, 0x8E, 0);
|
||||||
KeSetIDTGate(0x23, (ulong)isr35, codeSeg, 0x8E, 0);
|
KeSetIDTGate(0x23, (ulong)isr35, codeSeg, 0x8E, 0);
|
||||||
|
|
|
@ -53,7 +53,8 @@ void MmInitGdt(void)
|
||||||
tssDesc.veryHighBase = ((ulong)&tss >> 32) & 0xFFFFFFFF;
|
tssDesc.veryHighBase = ((ulong)&tss >> 32) & 0xFFFFFFFF;
|
||||||
tssDesc.lowLimit = sizeof(tss);
|
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);
|
tss.iomap_base = sizeof(tss);
|
||||||
|
|
||||||
memmove(&gdt[2], &tssDesc, sizeof(TssDescriptor_t));
|
memmove(&gdt[2], &tssDesc, sizeof(TssDescriptor_t));
|
||||||
|
|
Loading…
Reference in New Issue