Any easy way to check if my GDT works?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
j4cobgarby
Member
Member
Posts: 64
Joined: Fri Jan 26, 2018 11:43 am

Any easy way to check if my GDT works?

Post by j4cobgarby »

As far as I can tell, I've set up a GDT, and it seems that the logical thing to do now is to set up an IDT.
How can I check if my GDT does in fact work? My kernel does run, without any obvious errors.
I need to know if it works before implementing an IDT, right? Do I just have to trust that it does?
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: Any easy way to check if my GDT works?

Post by Korona »

You can check the segment limits etc. in bochs or some other debugger. But other than that, your GDT works if your kernel does not raise random general protection exceptions or triple fault.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
Post Reply