Page 1 of 1

selector base addrs

Posted: Fri Apr 11, 2003 7:44 am
by shad
When the kernel is loaded from the bootsector what should i have the gdt selector base addresses as, 0 or 0x100000 (0x100000 is where it is loaded.) The data selector being 0 seems to work, but the code i havnt tried yet, but calls and jumps are getting messed up with the 7c00h base addr

Re:selector base addrs

Posted: Fri Apr 11, 2003 8:02 am
by Whatever5k
Keep the base 0 for simplicity - 1mb base would be far more complicating and I cannot see the advantage of it: you probably want to access memory below 1mb, too.
So, base 0 is most likely your choice.

Re:selector base addrs

Posted: Mon Apr 14, 2003 11:59 am
by shad
Thanks. Should i put the tss in the gdt before or after i jump to the kernel?

Re:selector base addrs

Posted: Tue Apr 15, 2003 8:49 am
by Pype.Clicker
You needn't a TSS until you have a task switch or a user-level process interrupted. So i would say leave the TSS build up to the kernel. It has nothing to do with the bootloader itself ...