OSDev.org

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

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: [solved] Need help: Hang/crash on boot in Bochs but not Q...
PostPosted: Tue Aug 21, 2018 1:33 am 
Offline
User avatar

Joined: Thu Jul 19, 2018 9:40 pm
Posts: 24
I recently came back to my small kernel development project intending to fix a separate issue, only to find out that it won't boot in Bochs, yet works as I thought it would in QEMU.

In order to verify Bochs' result, I tried Virtualbox as well, and got the same result, proving it wasn't an issue with Bochs, and is instead an issue with my code.

I had a similar issue earlier, and my stack creation was at fault, but I've tried all kinds of ways of defining the stack and I still can't get it to work, so I am starting to think that it isn't the stack.
On boot, it prints the intended text, but without the background color that I'd set. It then flickers while doing nothing else.
Looking at Bochs, it continually does:
Code:
(0) [0x000000100031] 0010:0000000000100031 (unk. ctxt): jmp .-2 (0x00100031)      ; ebfe


I've stripped out everything including my IDT code, PIC code, etc, giving a much smaller system with the same problem. I have provided it in tar.xz format here: https://nofile.io/f/defpYtSKwsF/minimal_death.tar.xz

If anyone could help me out, I'd be very pleased, thank you.


Last edited by Ender on Fri Aug 31, 2018 5:52 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Need help: Hang/crash on boot in Bochs and VBox but not
PostPosted: Tue Aug 21, 2018 6:52 am 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 671
The text is blinking because BOCHs is one of the few environments where the blinking bit in the attribute (simulated) is honored. You use attribute 0x8F to clear the screen. BOCHS interprets the background color of 0x8 as being black but with blinking text. 0x8F is white on black with blinking text. If you want white on black use 0x0F.


Top
 Profile  
 
 Post subject: Re: Need help: Hang/crash on boot in Bochs and VBox but not
PostPosted: Tue Aug 21, 2018 7:45 am 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
I remember having the same issue while writing my VGA driver.
MichaelPetch is right about the blinking bit. Bochs does a good job of emulating that.
Take a look at this Reddit post, it contains everything you need to know: https://www.reddit.com/r/osdev/comments/70fcig/blinking_text/

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Top
 Profile  
 
 Post subject: Re: Need help: Hang/crash on boot in Bochs and VBox but not
PostPosted: Tue Aug 21, 2018 1:45 pm 
Offline
User avatar

Joined: Thu Jul 19, 2018 9:40 pm
Posts: 24
MichaelPetch wrote:
The text is blinking because BOCHs is one of the few environments where the blinking bit in the attribute (simulated) is honored. You use attribute 0x8F to clear the screen. BOCHS interprets the background color of 0x8 as being black but with blinking text. 0x8F is white on black with blinking text. If you want white on black use 0x0F.


Ah, thank you, I hadn't thought of that. Seems like I was looking for more strange issues where there is none.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: 8infy and 59 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