OSDev.org

The Place to Start for Operating System Developers
It is currently Sun May 05, 2024 10:37 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: paging explained
PostPosted: Tue Jun 17, 2003 11:00 pm 
hello folkes.

after some research i found that instantly after enabling the paging bit in cr0, cpu tries to access the adress which is the phys adress of my kernel. that is bad because i want to have the kernel at virt adress elsewhere.

instantly after Cr0 = Cr0 | 0x80000000 i get a GPF, even if the next instruction is HLT (interrupts disabled).

do you have any ideas?

Thanx in advance,
Adrian.


Top
  
 
 Post subject: RE:paging explained
PostPosted: Tue Jun 17, 2003 11:00 pm 
Have you read the section on paging in the Intel manual? You need to make sure that:
- you have a valid page directory pointer in CR3 (must be page aligned)
- you have a valid mapping for the location where you're currently running (i.e. you need a valid page table entry for EIP)


Top
  
 
 Post subject: RE:paging explained
PostPosted: Wed Jun 18, 2003 11:00 pm 
PGD is page aligned.

How can I map the kern to virt addr other than the phys addr? Do I have to map the place where it's running even if I'm going to use another adress?

Thanx very much,
Adrian.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Amazonbot [bot] and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group