Page Fault by MM of JamesM

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
PHPnerd
Member
Member
Posts: 34
Joined: Mon Nov 05, 2007 11:15 am
Location: The Netherlands
Contact:

Page Fault by MM of JamesM

Post by PHPnerd »

Hi,

i used the code of JamesM tutorials to make a memory manager. After creating the heap, the memory manager doesnt work anymore.
The fault occurs with initializing paging, by creating kernel hep -> place_ordered_array();

A screenshot is attached.

The code is the same as in his tutorials.

Can someone help me?

PHPnerd
Attachments
Screenshot
Screenshot
blound
Member
Member
Posts: 70
Joined: Sat Dec 01, 2007 1:36 pm

Re: Page Fault by MM of JamesM

Post by blound »

if you want help you should post whatever logs QEMU can give you ( similar to boch's register dump, memory contents, plus disasm of the code thats breaking, also if qemu has something like 'info tab' in bochs you should break right before the fault and use it to print your virtual -> physical lookups )

pasting just generic prints and a fault is not going to let people help you much
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Page Fault by MM of JamesM

Post by JamesM »

The page fault is caused by an instruction fetch from 0x1215512. That's around 18MB into the address space - your kernel is loaded at 1MB.

Do you really think you should be fetching instructions from that location? Stack corruption is the obvious problem that springs to mind.
PHPnerd
Member
Member
Posts: 34
Joined: Mon Nov 05, 2007 11:15 am
Location: The Netherlands
Contact:

Re: Page Fault by MM of JamesM

Post by PHPnerd »

I've fixed it. I only forgot +0x1000 :P
Now my memory manager works fine


thnx :)

PHPnerd
Jinix
Post Reply