Bochs translates page inconsistently?
Posted: Thu Dec 28, 2017 2:59 pm
Hi,
I've been debugging a peculiar bug in my kernel that so far has only appeared on Bochs.
Through printf-debugging I managed to narrow down what was going wrong to a certain memory location.
In the Bochs GUI debugger, I used the `page` command to see which physical address the memory is at.
I then did a linear memory dump with the virtual address, and a physical memory dump with the address from the `page` command.
Thinking they would be the same, I was surprised to find that while the physical dump gave the values I was expecting, the linear memory dump gave completely different values - as if the page address had been translated differently.
I'm worried this might be a bug in Bochs - although I could be wrong. I'm using version 2.6.0, compiled with instructions from http://wiki.osdev.org/Bochs#Compiling_Bochs_from_Source.
Does anyone know what might be happening?
I've been debugging a peculiar bug in my kernel that so far has only appeared on Bochs.
Through printf-debugging I managed to narrow down what was going wrong to a certain memory location.
In the Bochs GUI debugger, I used the `page` command to see which physical address the memory is at.
I then did a linear memory dump with the virtual address, and a physical memory dump with the address from the `page` command.
Thinking they would be the same, I was surprised to find that while the physical dump gave the values I was expecting, the linear memory dump gave completely different values - as if the page address had been translated differently.
I'm worried this might be a bug in Bochs - although I could be wrong. I'm using version 2.6.0, compiled with instructions from http://wiki.osdev.org/Bochs#Compiling_Bochs_from_Source.
Does anyone know what might be happening?