Thanks for the code. Also, this is from gdt.c, idt.c and stub.asm: in gdt.c extern void gdt_flush(); in idt.c extern void idt_load(); in stub.asm global _gdt_flush ; allows C code to link to this extern _gp ; says variable gp is in another file (gdt.c) _gdt_flush: ; define code for gdt_flush functio...
I'm trying to make my kernel an executable following the PE File Format, but I'm having some troubles. I'm using two methods to try to do this, one is using nasm, gcc, and ld, but that's not working out so well. I created a .bat file to make compiling and linking my kernel automatic: nasm stub.asm -...
The limit refers to a physical address. But if you look at the bit layout of the GDT you see that bit 55 (granularity) determines whether or not the segment limit is multiplied by 4K or not (granularity bit has to be set to 1 for that to happen). This makes your equation true because the limit is 1M...