OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 18, 2024 10:44 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Getting GRUB video pointer
PostPosted: Fri Apr 28, 2017 10:16 am 
Offline
Member
Member
User avatar

Joined: Fri Jan 27, 2017 12:15 pm
Posts: 149
Location: Belgium
I know that I should have done this a LONG time ago, but I kind of forgot to do it when I implemented the graphics for my OS. I only realized that I had hard coded the graphics pointer when I tried running my OS in QEMU, instead of VirtualBox.
I'm passing flags to multiboot GRUB so that it can change the graphics mode before switching to pmode.
So, how exactly do I get the video pointer?

_________________
AQUA OS: https://obiwac.wordpress.com/aqua-os/


Top
 Profile  
 
 Post subject: Re: Getting GRUB video pointer
PostPosted: Fri Apr 28, 2017 10:51 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
The multiboot specifications tell you where to find the information.

https://www.gnu.org/software/grub/manua ... cification


Top
 Profile  
 
 Post subject: Re: Getting GRUB video pointer
PostPosted: Fri Apr 28, 2017 11:31 am 
Offline
Member
Member
User avatar

Joined: Fri Apr 03, 2015 9:41 am
Posts: 492
You need to get a Multiboot structure that GRUB passes, video info is included in it along with a ton of other very useful info.

_________________
Developing U365.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing

OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.


Top
 Profile  
 
 Post subject: Re: Getting GRUB video pointer
PostPosted: Fri Apr 28, 2017 11:40 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 21, 2011 9:47 pm
Posts: 286
Location: Tustin, CA USA
iansjack wrote:
The multiboot specifications tell you where to find the information.

https://www.gnu.org/software/grub/manua ... cification


I actually found the source to be more valuable. https://github.com/coreos/grub/blob/mas ... ultiboot.h

it contains some undocumented extensions which I found to be implemented in my grub2 loader.

_________________
Adam

The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal

"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber


Top
 Profile  
 
 Post subject: Re: Getting GRUB video pointer
PostPosted: Sat Apr 29, 2017 9:52 am 
Offline
Member
Member
User avatar

Joined: Fri Jan 27, 2017 12:15 pm
Posts: 149
Location: Belgium
Ok thanks! It be working now!

_________________
AQUA OS: https://obiwac.wordpress.com/aqua-os/


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], Google [Bot] and 93 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