-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ring 3 Execution & GDT Refactoring #177
Comments
Wait... we may already have GDT segments for user mode...
px_gdt_set_gate(0, 0, 0, 0); // Null segment
px_gdt_set_gate(1, 0, 0x000FFFFF, GDT_CODE_PL0); // Kernel code segment
px_gdt_set_gate(2, 0, 0x000FFFFF, GDT_DATA_PL0); // Kernel data segment
px_gdt_set_gate(3, 0, 0x000FFFFF, GDT_CODE_PL3); // User mode code segment
px_gdt_set_gate(4, 0, 0x000FFFFF, GDT_DATA_PL3); // User mode data segment So... maybe we just need to implement the jump? Regardless, we should restructure the GDT code to use bitfields instead of magic values. |
We also need to decide now how we want to perform syscalls. If we want to use Intel's
|
Also, unless I'm missing something, I think Panix just straight up doesn't setup the TSS at all, which is problematic to say the least. |
Wiki Page - Ring 3
Wiki Page - GDT
Alright, so our GDT code is a disaster. We need to work the GDT struct to use bitfields so that we don't have to have magic values like
0x00F0FF00
floating around ingdt.cpp
.The wiki page "Getting to Ring 3" shows the following as an example of a bitfield GDT struct that we could base our design off of.
The text was updated successfully, but these errors were encountered: