mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-15 09:19:16 +00:00
Syscalls working as expected
This commit is contained in:
@ -44,20 +44,6 @@ namespace GlobalDescriptorTable
|
||||
.Flags = {.Raw = 0x0},
|
||||
.BaseHigh = 0x0},
|
||||
|
||||
// user code
|
||||
{.Length = 0x0,
|
||||
.BaseLow = 0x0,
|
||||
.BaseMiddle = 0x0,
|
||||
.Access = {.A = 0,
|
||||
.RW = 1,
|
||||
.DC = 0,
|
||||
.E = 1,
|
||||
.S = 1,
|
||||
.DPL = 3,
|
||||
.P = 1},
|
||||
.Flags = {.Unknown = 0x0, .L = 1},
|
||||
.BaseHigh = 0x0},
|
||||
|
||||
// user data
|
||||
{.Length = 0x0,
|
||||
.BaseLow = 0x0,
|
||||
@ -72,6 +58,20 @@ namespace GlobalDescriptorTable
|
||||
.Flags = {.Raw = 0x0},
|
||||
.BaseHigh = 0x0},
|
||||
|
||||
// user code
|
||||
{.Length = 0x0,
|
||||
.BaseLow = 0x0,
|
||||
.BaseMiddle = 0x0,
|
||||
.Access = {.A = 0,
|
||||
.RW = 1,
|
||||
.DC = 0,
|
||||
.E = 1,
|
||||
.S = 1,
|
||||
.DPL = 3,
|
||||
.P = 1},
|
||||
.Flags = {.Unknown = 0x0, .L = 1},
|
||||
.BaseHigh = 0x0},
|
||||
|
||||
// tss
|
||||
{}};
|
||||
|
||||
|
@ -55,16 +55,10 @@ namespace InterruptDescriptorTable
|
||||
"pushq %r13\n"
|
||||
"pushq %r14\n"
|
||||
"pushq %r15\n"
|
||||
// push ds segment
|
||||
"movq %ds, %rax\n"
|
||||
"pushq %rax\n"
|
||||
|
||||
"movq %rsp, %rdi\n"
|
||||
"call ExceptionHandler\n"
|
||||
|
||||
// pop ds segment
|
||||
"popq %rax\n"
|
||||
|
||||
// pop all registers
|
||||
"popq %r15\n"
|
||||
"popq %r14\n"
|
||||
@ -104,16 +98,10 @@ namespace InterruptDescriptorTable
|
||||
"pushq %r13\n"
|
||||
"pushq %r14\n"
|
||||
"pushq %r15\n"
|
||||
// push ds segment
|
||||
"movq %ds, %rax\n"
|
||||
"pushq %rax\n"
|
||||
|
||||
"movq %rsp, %rdi\n"
|
||||
"call MainInterruptHandler\n"
|
||||
|
||||
// pop ds segment
|
||||
"popq %rax\n"
|
||||
|
||||
"popq %r15\n"
|
||||
"popq %r14\n"
|
||||
"popq %r13\n"
|
||||
|
@ -117,8 +117,8 @@ namespace GlobalDescriptorTable
|
||||
GlobalDescriptorTableEntry Null;
|
||||
GlobalDescriptorTableEntry Code;
|
||||
GlobalDescriptorTableEntry Data;
|
||||
GlobalDescriptorTableEntry UserCode;
|
||||
GlobalDescriptorTableEntry UserData;
|
||||
GlobalDescriptorTableEntry UserCode;
|
||||
TaskStateSegmentEntry TaskStateSegment;
|
||||
} __attribute__((packed)) GlobalDescriptorTableEntries;
|
||||
|
||||
|
Reference in New Issue
Block a user