Page 2 of 2

Re: Chapter 23 Demo Release

Posted: Tue Dec 21, 2010 9:37 pm
by pathos
I'm just now getting a chance to dive into the demo, and I was getting the page fault too, anytime I tried to do anything after entering usermode. I have the virtual memory manager patch.

I solved it this way. The original code from the virtual memory manager initialization procedure was:

Code: Select all

  pt_entry_add_attrib(&page, I86_PTE_PRESENT);
  pt_entry_add_attrib(&page, I86_PTE_WRITABLE);
The code from the demo is:

Code: Select all

  pt_entry_add_attrib(&page, I86_PTE_PRESENT);
  pt_entry_add_attrib(&page, I86_PTE_USER);
So I commented out the writeable attribute and added the user one, and was getting the page fault. However, after changing it to...

Code: Select all

  pt_entry_add_attrib(&page, I86_PTE_PRESENT);
  pt_entry_add_attrib(&page, I86_PTE_WRITABLE);
  pt_entry_add_attrib(&page, I86_PTE_USER);
...all is well. Maybe someone else had the same problem, and this will help them.

Re: Chapter 23 Demo Release

Posted: Wed Dec 22, 2010 8:57 pm
by Insightsoft
my problem happened when I added some stuff to help me on debugging... the code became a little bigger than the original one; ...consequently, I think I found a bug on LOADER... (But now, I take a little break (Christmas), before trying to figure out what can be causing that problem)...

But the Kernel (chapter23) is up and running...

Re: Chapter 23 Demo Release

Posted: Mon Jan 03, 2011 1:56 am
by Mike
Hello,

Thanks for letting us know. This is indeed a bug - the WRITABLE bit on the PTEs must be set. This will be corrected once the new chapters are uploaded.

Re: Chapter 23 Demo Release

Posted: Mon Jul 25, 2011 8:16 pm
by Mezo
Thank you "pathos" :D
I had the same problem and you helped me. :D