Problem loading the GDT

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.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

SOLVED

This code is incorrect. It was a typo on the website but is not so in the code available for download:

Code: Select all

gdt_entries[num].limit_low   = (limit & 0xFFFF); 
   gdt_entries[num].granularity = (limit >> 16) & 0xFF; 

   gdt_entries[num].granularity |= gran & 0xF0;
Should be:

Code: Select all

gdt_entries[num].limit_low   = (limit & 0xFFFF); 
   gdt_entries[num].granularity = (limit >> 16) & 0x0F; 

   gdt_entries[num].granularity |= gran & 0xF0;
It is now updated on the website.
User avatar
Steve the Pirate
Member
Member
Posts: 152
Joined: Fri Dec 15, 2006 7:01 am
Location: Brisbane, Australia
Contact:

Post by Steve the Pirate »

I'm using your floppy image - so it could be something to do either with the compiler/linker (I'm using g++ 4.1) or maybe the version of GRUB.

I'm going to try your kernel binary on my CD and vice versa.

EDIT: You solved it before I posted...
My Site | My Blog
Symmetry - My operating system.
Post Reply