[n00b Question] Accessing framebuffer information on grub cl

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
finarfin
Member
Member
Posts: 106
Joined: Fri Feb 23, 2007 1:41 am
Location: Italy & Ireland
Contact:

[n00b Question] Accessing framebuffer information on grub cl

Post 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
Elen síla lúmenn' omentielvo
- DreamOS64 - My latest attempt with osdev: https://github.com/dreamos82/Dreamos64
- Osdev Notes - My notes about osdeving! https://github.com/dreamos82/Osdev-Notes
- My old Os Project: https://github.com/dreamos82/DreamOs
User avatar
acccidiccc
Member
Member
Posts: 38
Joined: Sun Mar 21, 2021 1:09 pm
Location: current location

Re: [n00b Question] Accessing framebuffer information on gru

Post 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
iustitiae iniustos iudicat
Post Reply