Page 1 of 1

what is your multiboot grb2 framebuffer_addr??

Posted: Fri Mar 20, 2020 6:16 pm
by wellwell
my framebuffer_addr is 0xfd000000, to my surprise, my qemu only has 2Gb memory. How does it visited this strange address??

Re: what is your multiboot grb2 framebuffer_addr??

Posted: Fri Mar 20, 2020 7:09 pm
by iansjack
Your graphics card (or emulated card) also contains RAM.

Re: what is your multiboot grb2 framebuffer_addr??

Posted: Fri Mar 20, 2020 9:36 pm
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??

Re: what is your multiboot grb2 framebuffer_addr??

Posted: Sat Mar 21, 2020 4:45 am
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