There is a line at the bottom of md_usermode which
says
assert(((curkstack-1) & 0xffff0000)==(((u_int32_t)&tf) & 0xffff0000));
Can someone give me a hint at what this is testing for?
It's trying to make sure that curkstack (the stack pointer that will
be loaded on entry to the kernel) is pointing onto the current
thread's stack. (The trapframe tf is placed on the current thread's
stack, because it's a local variable in md_usermode.)
This is because if curkstack is wrong (e.g., set to null) the system
will die horribly in the exception entry code.
Our code gets to this point with the values
curkstack: 0x80020008 &tf: 0x8001fee8
The assert assumes the stack is page-aligned, which it evidently isn't
any more in your system, so you can modify it accordingly (or just
remove it).
--
- David A. Holland | VINO project home page:
dholland(a)eecs.harvard.edu |
http://www.eecs.harvard.edu/vino