OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 11:52 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: Debugging the OS with VirtualBox
PostPosted: Wed Mar 24, 2021 3:38 pm 
Offline
Member
Member
User avatar

Joined: Wed Feb 19, 2020 1:08 pm
Posts: 270
Location: Italy
Octocontrabass wrote:
Oh, how about that, interrupts are enabled. Did you forget to disable interrupts before switching to long mode? Some BIOS calls require interrupts to be enabled and will not disable them before returning to your code.

That explains a lot of things... I've added a CLI before entering long mode and now it works! The kernel successfully boots up and everything works. Thanks a lot!

_________________
Regards, Bonfra.


Top
 Profile  
 
 Post subject: Re: Debugging the OS with VirtualBox
PostPosted: Wed Mar 24, 2021 5:40 pm 
Offline
Member
Member

Joined: Tue Aug 11, 2020 12:14 pm
Posts: 151
Octocontrabass wrote:
sj95126 wrote:
This pattern (data cpl0, code cpl0, data cpl3, code cpl3) matches your 64-bit GDT but apparently it thinks you've set 16-bit segments.

I think it's just displaying them wrong. It shows the appropriate bits are set to put the CPU in 64-bit mode.

Sure enough, it's displaying them wrong. I made my kernel deliberately triple fault, and it shows my gdt entries as 16-bit as well. My gdt does not and never has contained anything but 64-bit entries, so it's definitely a bug.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Octocontrabass and 90 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