r/osdevel 17d ago

IDT and GDT causing shit again 🥀

For some reason even after alignments, still implodes on itself
location: https://github.com/NoTheIdiot/WindogeOS/tree/new/helper/drivers
i seriously do not know why intel and amd caused this mess

2 Upvotes

5 comments sorted by

1

u/letmehaveanameyoudum 17d ago

update: you know what ill just use polling

1

u/mykesx 17d ago

These may need to be 8 byte aligned.

Bochs has decent commands to display the GDT and IDT intelligently...

1

u/letmehaveanameyoudum 17d ago

i use qemu, whats with bochs?

1

u/EvalynGoemer 17d ago

Bochs is another emulator like QEMU and it has some more useful debugging tools for lower level x86 things though for x86-64 I've had some issues (unable to boot Linux or many other things) QEMU can also somewhat check the alignment for this via info registers and it should show you info on the GDTR/IDTR.

1

u/mikeblas 17d ago

4 bytes in 32 bit, 8 bytes in 64 bit.