OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 9:52 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Enabling page in qemu cause trifault, but not in real hw
PostPosted: Tue Mar 30, 2021 4:34 am 
Offline
Member
Member

Joined: Tue Jul 14, 2020 4:01 am
Posts: 70
For some reason, my operating system suddenly started to triple fault on the enable page code in qemu, but not in bochs or on my own computer, and google didn't really helped, as usual. Everything looks fine to me, page directory table is aligned to 0x20 and page directory is aligned to 0x1000(I'm using PAE and 2MIB pages).


Last edited by clementttttttttt on Tue Mar 30, 2021 6:34 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Enabling page in qemu cause trifault, but not in real hw
PostPosted: Tue Mar 30, 2021 5:44 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
clementttttttttt wrote:
page table is aligned to 0x20 and page directory is aligned to 0x1000(I'm using PAE).

Not quite sure what you mean here. All tables in the page-table hierarchy should be page (0x1000) aligned.


Top
 Profile  
 
 Post subject: Re: Enabling page in qemu cause trifault, but not in real hw
PostPosted: Tue Mar 30, 2021 6:32 am 
Offline
Member
Member

Joined: Tue Jul 14, 2020 4:01 am
Posts: 70
Changed all alignments to 0x1000, still no luck.


Top
 Profile  
 
 Post subject: Re: Enabling page in qemu cause trifault, but not in real hw
PostPosted: Tue Mar 30, 2021 6:40 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Then I'd suggest that you use gdb to debug it. Set a break point where you think the triple fault is happening and see what is going wrong. You can use "info memory" in the emu monitor to see if the page mapping is reasonable.


Top
 Profile  
 
 Post subject: Re: Enabling page in qemu cause trifault, but not in real hw
PostPosted: Wed Mar 31, 2021 1:00 am 
Offline
Member
Member

Joined: Tue Jul 14, 2020 4:01 am
Posts: 70
oh nevermind, it's just a typo in the map page function, i accidentally made it map 50 pages instead of 5 pages


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 172 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