PAGING CR0 CR3 and CR4 problem

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
Thunder

PAGING CR0 CR3 and CR4 problem

Post by Thunder »

Hi,

I'm trying to make paging on my OS,
First:
When I'm trying to configure in CR4 PGE, PAE and PSE Bochs just say that I cannot write to CR4, when I'm Trying to enable paging in CR0 bit 31 Bochs puts: >>PANIC<< prefetch: running in bogus memory

Whats wrong??? Help ???
Tim

Re:PAGING CR0 CR3 and CR4 problem

Post by Tim »

Problem 1: Bochs doesn't support those CR4 bits.

Problem 2: You have some problem in the code that enables paging.
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 CR0 CR3 and CR4 problem

Post by Pype.Clicker »

just a stupid question: did you set up a page directory in CR3 before you enable paging ? if not, your mapping will be quite random and there are little chance that the instruction pointer will refer a valid memory page (remember that BOCHS says "running in bogus memory" everytime you try to execute on some page that has never been written before ...)
Thunder

Re:PAGING CR0 CR3 and CR4 problem

Post by Thunder »

I have everything made, and it works...thanks for help ;)

Yes it is...in CR4 cannot write in Bochs
Post Reply