I have added a offset to the beginning of my kernel code. I have added this whole offset to the GDTR base address and the far jump to protected mode.
Do I also have to add this offset to the loading in of the GDTR?
ex: lgdt [GDTR + offset]
GDT HELP
-
drizzt
Re:GDT HELP
No if you have added the [org old_org+offset] directive to the beginning of your code...
-
drizzt
Re:GDT HELP
If your previous beginning address was for example 0x10000 and you add an offset 0x600, you write:
[org 0x10000+0x600]
In this case you do not have to specify GDTR + offset
[org 0x10000+0x600]
In this case you do not have to specify GDTR + offset