page fault on real machine
Posted: Wed Apr 29, 2009 1:50 pm
Hi,
i have one very strange problem.i did not notice it until today,when i rebooted my machine and tried my code 'in real' (i'm using bochs, here everything works fine).shortly after the kernel is loaded, cpu is interrupted by page fault.using qemu ( here is the situation the same) i discovered, that page fault is raised when call instruction is executed (not just random call instruction in code, just this one.). esp is high enough, ss is set properly, and the hole thing is below code and data, so there cant be any lack of stack space, right?plus - after page fault is in cr2 address around 0x7800000 (this is exactly the same value as value in eax, strange..)how could this possibly happen if there is simply no code which would access this high memory..?when i use 0xff call (address given in register) the value in esi is changed and points somewhere insanily high in memory - then page fault occurs.
once again - in bochs runs everything well, it is crashing 'only' on real machine and qemu..
can anyone please explain me what i'm doing wrong?btw sorry for my terrible english and thanks for any answer.
i have one very strange problem.i did not notice it until today,when i rebooted my machine and tried my code 'in real' (i'm using bochs, here everything works fine).shortly after the kernel is loaded, cpu is interrupted by page fault.using qemu ( here is the situation the same) i discovered, that page fault is raised when call instruction is executed (not just random call instruction in code, just this one.). esp is high enough, ss is set properly, and the hole thing is below code and data, so there cant be any lack of stack space, right?plus - after page fault is in cr2 address around 0x7800000 (this is exactly the same value as value in eax, strange..)how could this possibly happen if there is simply no code which would access this high memory..?when i use 0xff call (address given in register) the value in esi is changed and points somewhere insanily high in memory - then page fault occurs.
once again - in bochs runs everything well, it is crashing 'only' on real machine and qemu..
can anyone please explain me what i'm doing wrong?btw sorry for my terrible english and thanks for any answer.