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.
I probably didn't explain myself very well, when I say virtual address what I mean is have you got a GDT and page tables set up that will allow access to 0xFFFFFFFF because that address would be 4GB, so unless you have 4GB of ram it will fail, and even then I doubt it would work.
You need to set esp to point to an area of physical memory, where is your stack defined in your boot.asm?
Hang on, let me have a look at your code see if I can suggest anything.
Yes, but you need to decide where your stack is going. For example in my case, I use _end (which is a symbol created by gcc) to work out the end of my kernel, then I set aside a few pages after this and set esp to end of this region, this way I know that it will not get clobbered and that it also isn't off somewhere strange (which you really don't want because of inexplicable bugs later.)
Basically, try not to use a "guessed" value for esp, it probably won't work at all, if it does, it will be unreliable.
you realise setting your stack to 0xffff , it should be aligned on 4 byte boundary, so 0x10000 or 0xfffc, etc. since your pushing dwords in pmode, cpu is optimised for dword alignment.
if you need to put kernel stack somewhere.. have some data space in your kernel just for kernel stack, and point your esp to that...
while my kernel is setting up, my esp situated at 512kb mark.