CS Selector is Null

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
PlayOS

CS Selector is Null

Post by PlayOS »

Hi,

Does anyone know what things can cause bochs to return the error ''iret : return CS Selector null'.

I am assuming that it is a problem with my IDT, except that I only get this error if I set my stack (esp) to point to 0x100000 (1MB). I havent tried all addresses but I dont get the error if I set my stack (esp) to 0x600000 (6MB).

thanks
Whatever5k

Re:CS Selector is Null

Post by Whatever5k »

Could you please show us your code...?
When GRUB sais that the CS selector is null, I'd better believe it ;)
Perhaps, you haven't updatet your segment registers. Which bootloader are you using? To which address is your kernel loaded, etc. etc. etc.
PlayOS

Re:CS Selector is Null

Post by PlayOS »

[attachment deleted by admin]
Slasher

Re:CS Selector is Null

Post by Slasher »

hi,
you have to check if the stack is being overwritten by some code. I had a similar problem with my stack when i was implementing Stack based task switching. My stack started at 2mb and was crashing but when i moved it so 4mb, it worked fine. I know that i wasn't overwriting it cause my code was less than 10kb and started at 0x4000,still investigating it! Attach you code and it will be easier for us to help!
you might like to check this thread and see if it helps
http://www.mega-tokyo.com/forum/index.p ... eadid=1374
PlayOS

Re:CS Selector is Null

Post by PlayOS »

Code is attached above in my second post. :)
Post Reply