selector base addrs

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.
Post Reply
shad

selector base addrs

Post 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
Whatever5k

Re:selector base addrs

Post 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.
shad

Re:selector base addrs

Post by shad »

Thanks. Should i put the tss in the gdt before or after i jump to the kernel?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:selector base addrs

Post 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 ...
Post Reply