Enabling page in qemu cause trifault, but not in real hw

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
clementttttttttt
Member
Member
Posts: 70
Joined: Tue Jul 14, 2020 4:01 am
Libera.chat IRC: clementttttttttt

Enabling page in qemu cause trifault, but not in real hw

Post by clementttttttttt »

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.
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Enabling page in qemu cause trifault, but not in real hw

Post by iansjack »

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.
clementttttttttt
Member
Member
Posts: 70
Joined: Tue Jul 14, 2020 4:01 am
Libera.chat IRC: clementttttttttt

Re: Enabling page in qemu cause trifault, but not in real hw

Post by clementttttttttt »

Changed all alignments to 0x1000, still no luck.
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Enabling page in qemu cause trifault, but not in real hw

Post by iansjack »

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.
clementttttttttt
Member
Member
Posts: 70
Joined: Tue Jul 14, 2020 4:01 am
Libera.chat IRC: clementttttttttt

Re: Enabling page in qemu cause trifault, but not in real hw

Post by clementttttttttt »

oh nevermind, it's just a typo in the map page function, i accidentally made it map 50 pages instead of 5 pages
Post Reply