Page 1 of 1

Getting GRUB video pointer

Posted: Fri Apr 28, 2017 10:16 am
by obiwac
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?

Re: Getting GRUB video pointer

Posted: Fri Apr 28, 2017 10:51 am
by iansjack
The multiboot specifications tell you where to find the information.

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

Re: Getting GRUB video pointer

Posted: Fri Apr 28, 2017 11:31 am
by osdever
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.

Re: Getting GRUB video pointer

Posted: Fri Apr 28, 2017 11:40 pm
by eryjus
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.

Re: Getting GRUB video pointer

Posted: Sat Apr 29, 2017 9:52 am
by obiwac
Ok thanks! It be working now!