OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Apr 20, 2024 5:08 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: 64 bit long mode cr0 issue
PostPosted: Sat Mar 25, 2017 11:16 am 
Offline
Member
Member

Joined: Wed Mar 15, 2017 9:22 am
Posts: 40
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


Top
 Profile  
 
 Post subject: Re: 64 bit long mode cr0 issue
PostPosted: Sat Mar 25, 2017 12:21 pm 
Offline
Member
Member

Joined: Thu Aug 13, 2015 4:57 pm
Posts: 384
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..


Top
 Profile  
 
 Post subject: Re: 64 bit long mode cr0 issue
PostPosted: Sun Mar 26, 2017 12:49 pm 
Offline
Member
Member

Joined: Wed Mar 15, 2017 9:22 am
Posts: 40
OK, I'll give them all a go thanks.

Bipman


Top
 Profile  
 
 Post subject: Re: 64 bit long mode cr0 issue
PostPosted: Mon Mar 27, 2017 2:52 am 
Offline
Member
Member

Joined: Wed Mar 15, 2017 9:22 am
Posts: 40
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], CuteMath and 36 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