N
N
Nikita Vorobyov2018-09-25 21:38:38
Iron
Nikita Vorobyov, 2018-09-25 21:38:38

OSdev how to flush gdt table, protected mode?

I am writing (trying), my kernel (if you like, then the OS), not so long ago I switched to protected mode. I am not advanced in this matter, not even an amateur, but rather a beginner, an experimenter. The problem is that I do interrupts in the OS (as you know, they do not work in protected mode). I need to load the table gdt, idt, remake, etc. Problem with gdt. As I understand it, the loader that I use (GRUB 2) loads its own global descriptor table, and in order for me to load my own, I need to reset the table that GRUB loaded, flush it. If you wish, someone can tell you how to flush correctly, and if it's not difficult for you, send an example.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2018-09-25
@Homa200

I do interrupts in the OS (as you know, they do not work in protected mode)

Seriously?
No need, just upload yours.
https://github.com/jcmvbkbc/multiboot-tests/blob/m...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question