Page 2 of 2
Re: 64 bit long mode cr0 issue
Posted: Sat Mar 25, 2017 11:16 am
by Bipman
Hi
I set the Bochs ram to 2GB and it crashes
The log output is now working OK on the shared file. I'll get the memory probably tomorrow as my wife is giving me daggers! Thanks for all your help so far.
Bipman
Re: 64 bit long mode cr0 issue
Posted: Sat Mar 25, 2017 12:21 pm
by LtG
Bochs guest or host RAM to 2GiB?
One thing I did notice, though I don't remember if there were any alignment requirements is that your GDTR is 000094b9, might want to keep that aligned..
In the Vbox trace I didn't see anything useful, all it says is #TF, but not a reason why.. but I'm not an expert on Vbox, so..
So my recommendation is still to try Bochs, just reduce to 1GiB usage if that helps and remove the extra three GiB pages so you can see if you still have the issue and then go back to VBox.
Also, the IDT would at least let you know the primary exception and possible error code/address. That along with dumping the PML4+PDPT both from guest physical address (0x20000 and 0x21000) as well as VBox's interpretation where it "pretty" prints it, just in case there's some obvious issue.
You could also try using fixed PML4+PDPT by hardcoding those within your code (adding necessary padding bytes to make each 4kiB) and then just loading into CR3, instead of generating dynamically..
Re: 64 bit long mode cr0 issue
Posted: Sun Mar 26, 2017 12:49 pm
by Bipman
OK, I'll give them all a go thanks.
Bipman
Re: 64 bit long mode cr0 issue
Posted: Mon Mar 27, 2017 2:52 am
by Bipman
I got it working with a tutorial that used 2MB pages (Rust OS). I'll now try and go 1GB pages if I can so thanks to all who answered as it moved me forward.
Bipman