Can't write memory

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
xalator

Can't write memory

Post 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?
nullify

Re:Can't write memory

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Can't write memory

Post 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 ...
Post Reply