paging problems

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
northfuse

paging problems

Post by northfuse »

okay, paging is up and working. Invaild page addresses trigger a pagefault, but i'm unable to access mapped memory! I map a virtual address to a physical address, mark it as rw and present, and write to it. But, when I read it, it says that it equals '-1' no matter what. please help!
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:paging problems

Post by Brendan »

Hi,
northfuse wrote: okay, paging is up and working. Invaild page addresses trigger a pagefault, but i'm unable to access mapped memory! I map a virtual address to a physical address, mark it as rw and present, and write to it. But, when I read it, it says that it equals '-1' no matter what. please help!
This sounds like you've put the wrong physical addresses into the page table entries. For e.g. if you tell the CPU to read from physical address 0xC0000000 and there isn't that much memory present it can read 0xFFFFFFFF (especially under Bochs, real computer can be more complex).

Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
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:paging problems

Post by Pype.Clicker »

might you have shifted your physical address once too much ?
Post Reply