OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Apr 27, 2024 8:23 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: multiboot2 and EGA textmode
PostPosted: Tue Dec 26, 2023 3:19 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 21, 2019 7:34 am
Posts: 300
Hi. I'm trying to boot into EGA text mode (because it's more convenient for debugging now, but I'll switch to VGA in the future) using multiboot2, but GRUB loads me into VGA mode.
This is what my framebuffer tag looks like.
Code:
dw 5  ; type
dw 0  ; flags: it is not optional tag
dd 20 ; size
dd 80 ; width
dd 25 ; height
dd 0   ; depth: text mode

I know that this is just a recommendation and GRUB is not obliged to follow this tag, however, multiboot1 successfully loaded me in textmode, so I expect this from multiboot2 as well. I use qemu for emulation.
It looks like I'm missing something and I should specify the text mode somewhere, but where?


Top
 Profile  
 
 Post subject: Re: multiboot2 and EGA textmode
PostPosted: Tue Dec 26, 2023 3:36 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
mrjbom wrote:
GRUB loads me into VGA mode.

Which VGA mode? Or did you actually mean GRUB sets up a linear framebuffer?

The presence of a framebuffer tag implies framebuffer support. Try removing the framebuffer tag and using a flags tag to indicate EGA text mode support.


Top
 Profile  
 
 Post subject: Re: multiboot2 and EGA textmode
PostPosted: Tue Dec 26, 2023 3:55 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 21, 2019 7:34 am
Posts: 300
Octocontrabass wrote:
mrjbom wrote:
GRUB loads me into VGA mode.
Try removing the framebuffer tag and using a flags tag to indicate EGA text mode support.

In Flags tag, I set console_flags to 10b, bit 1 is set, which means that the OS supports EGA textmode, but the OS still does not load in text mode. If I now delete the framebuffer tag, then how can I specify the width and height in text mode?

I tried deleting the framebuffer tag and booted into text mode.
But how do I specify the parameters of the text mode?
The specification says that for the text mode, the fields in the framebuffer tag control the height and width of the text mode, but if the presence of this tag turns on the framebuffer mode, then how do I configure the text mode?


Top
 Profile  
 
 Post subject: Re: multiboot2 and EGA textmode
PostPosted: Tue Dec 26, 2023 7:36 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
I don't think GRUB can configure the text mode.

If you want to use text mode without removing the framebuffer tag, you can add "set gfxpayload=text" to your grub.cfg.


Top
 Profile  
 
 Post subject: Re: multiboot2 and EGA textmode
PostPosted: Wed Dec 27, 2023 6:26 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 21, 2019 7:34 am
Posts: 300
Octocontrabass wrote:
If you want to use text mode without removing the framebuffer tag, you can add "set gfxpayload=text" to your grub.cfg.

This is what I needed, thanks for the answer!


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], DotBot [Bot], eekee, SemrushBot [Bot] and 23 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