Chapter 23 Demo Release

News discussions

Moderator:Moderators

pathos
Moderator
Posts:97
Joined:Thu Jan 10, 2008 6:43 pm
Location:USA
Re: Chapter 23 Demo Release

Post by pathos » Tue Dec 21, 2010 9:37 pm

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.

Insightsoft
Posts:63
Joined:Wed Jul 22, 2009 6:44 am

Re: Chapter 23 Demo Release

Post by Insightsoft » Wed Dec 22, 2010 8:57 pm

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...
_____________
Think it, build it, bit by bit...

User avatar
Mike
Site Admin
Posts:465
Joined:Sat Oct 20, 2007 7:58 pm
Contact:

Re: Chapter 23 Demo Release

Post by Mike » Mon Jan 03, 2011 1:56 am

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.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com

Mezo
Posts:7
Joined:Wed Oct 20, 2010 1:20 pm

Re: Chapter 23 Demo Release

Post by Mezo » Mon Jul 25, 2011 8:16 pm

Thank you "pathos" :D
I had the same problem and you helped me. :D

Post Reply