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.
JamesM
Member
Posts: 2935 Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:
Post
by JamesM » Tue Nov 27, 2007 4:17 am
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.
Steve the Pirate
Member
Posts: 152 Joined: Fri Dec 15, 2006 7:01 am
Location: Brisbane, Australia
Contact:
Post
by Steve the Pirate » Tue Nov 27, 2007 4:44 am
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...