Enabling page in qemu cause trifault, but not in real hw
-
- 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
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.
Re: Enabling page in qemu cause trifault, but not in real hw
Not quite sure what you mean here. All tables in the page-table hierarchy should be page (0x1000) aligned.clementttttttttt wrote:page table is aligned to 0x20 and page directory is aligned to 0x1000(I'm using PAE).
-
- 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
Changed all alignments to 0x1000, still no luck.
Re: Enabling page in qemu cause trifault, but not in real hw
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.
-
- 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
oh nevermind, it's just a typo in the map page function, i accidentally made it map 50 pages instead of 5 pages