Page 1 of 1

[n00b Question] Accessing framebuffer information on grub cl

Posted: Sat May 22, 2021 3:57 am
by finarfin
I'm wondering if there is a way to access framebuffer information from grub cli

I tried several commands and i can see there are some information using vbeinfo command, video info, etc
But what i need is the address of the framebuffer assigned. Is it possible? (it could be useful in case i need to debug the os on real hw)

Thanks

Re: [n00b Question] Accessing framebuffer information on gru

Posted: Wed May 26, 2021 6:42 am
by acccidiccc
sorry, my answer cannot answer all of your request. however if you are willing to use multiboot as you are using grub, it is possible to setup the graphics. so if you have a boot.S file, you need to push %ebx. it contains the address of the multiboot structure. this structure includes framebuffer information. make a struct multiboot_info, and put a pointer to it into the parameters of your main function e.g. kmain (multiboot_struct *multiptr)
more here https://www.gnu.org/software/grub/manua ... iboot.html