Interrupts in user mode

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.
User avatar
brain
Member
Member
Posts: 234
Joined: Thu Nov 05, 2009 5:04 pm
Location: UK
Contact:

Re: Interrupts in user mode

Post by brain »

yoshi65 wrote:Thanks, that brings me to my next thing I found. When the TSS is installed there is a 0x0 for the esp0 entry. How can I get the stack for the kernel to put it in there? (That is assuming that is what I need to do anyway)
You should know where your stack is, as it is defined within your code and placed at a known location. As for obtaining the actual value of ESP i would simply read it from the stack from within a function. You will know what offset to read into the stack based on how many parameters the function has.

This esp can then be placed in the TSS entry, along with the correct GDT selector value.
yoshi65
Posts: 11
Joined: Sun Mar 11, 2012 8:49 pm

Re: Interrupts in user mode

Post by yoshi65 »

Okay so it turns out that the esp0 was set correctly before but it still gives me an 13 error. I looked it up and it is for the FPU? I am completely stuck here. Any more suggestions?
Post Reply