Page 1 of 1

Can't write memory

Posted: Sat Jan 24, 2004 4:44 pm
by xalator
The bootloader for my OS is setting up paging, but when I want to write to a page that isn't writeable bochs crashes with this message:
"exception(): 3rd (14) exception with no resolution, shutdown status is 00h, resetting".
Shouldn't I, as the kernel, be able to overwrite memory everywhere?

Re:Can't write memory

Posted: Sat Jan 24, 2004 4:57 pm
by nullify
xalator wrote:Shouldn't I, as the kernel, be able to overwrite memory everywhere?
Well yeah, you can overwrite nearly all *physical* memory you want. But if you have paging enabled, you need to map the corresponding virtual memory in before your kernel has something to write to at that address.

Re:Can't write memory

Posted: Sun Jan 25, 2004 3:57 pm
by Pype.Clicker
xalator wrote: Shouldn't I, as the kernel, be able to overwrite memory everywhere?
it basically depends on whether you have turned on the "WP" bit or not (i thing it's in CR0 aswell ...)
However, if the page is not present, you cannot access it, regardless of whether you're in supervisor or user mode ...