what is your multiboot grb2 framebuffer_addr??

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
wellwell
Posts: 8
Joined: Wed Jul 24, 2019 6:26 am

what is your multiboot grb2 framebuffer_addr??

Post by wellwell »

my framebuffer_addr is 0xfd000000, to my surprise, my qemu only has 2Gb memory. How does it visited this strange address??
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: what is your multiboot grb2 framebuffer_addr??

Post by iansjack »

Your graphics card (or emulated card) also contains RAM.
wellwell
Posts: 8
Joined: Wed Jul 24, 2019 6:26 am

Re: what is your multiboot grb2 framebuffer_addr??

Post by wellwell »

iansjack wrote:Your graphics card (or emulated card) also contains RAM.
many thanks,by the way how can i get the memory map of the graphic card??
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: what is your multiboot grb2 framebuffer_addr??

Post by bzt »

wellwell wrote:many thanks,by the way how can i get the memory map of the graphic card??
You can't. You might use a card specific register to map different regions of GPU RAM, so that you can access them using the memory bus. There are usually some sort of get-frame-buffer-address function which does that (GPU->CPU) and you can define buffer objects (CPU->GPU).

In short, when you set the resolution and query the framebuffer, then the GPU will allocate its own RAM, and map that at 0xfd0000000. That address looks like normal RAM, but it's not, it's MMIO which happens to be implemented by RAM too.

Cheers,
bzt
Post Reply