Page 3 of 3

Re: mapping reserved memory causes page faults

Posted: Wed Nov 18, 2020 1:23 pm
by sj95126
MichaelPetch wrote:However if I had to guess what was going on here is that your bootloader didn't set SS:SP to some place where the stack wouldn't be clobbered. In BOCHS the stack is originally set to start at 0x0000:0x0000 which means the first word pushed on the stack will be at 0x0000:0xfffe . That would be just below physical address 0x10000 as well. If you overwrite the stack while the disk interrupt is executing it will do weird and wonderful things.
I'm pretty sure I had relocated the stack, but that sounds like it might explain it.