8
Thinking of Intel compatible x86 computers, without considering the facilities provided by modern operating systems, anyone who wants to draw/write something on the computer screen can access some known addresses, such as B800:0000 (linear B8000h), A000:0000 (linear A0000h) etc, and through them can write characters or pixels on the screen.
However, thinking only of pixels, the A0000h address maps a very small region of video memory (128k), far from the capacity of current graphics cards.
In addition, using only the basic routines provided by the VGA and SVGA standard, it is not possible to change the resolution to, for example, 1366 x 768 (at least I could not identify how).
The question is, suppose I’m already running in 32 or 64 bit protected mode, in the ring0, how to map a region of video memory so that the processor can access it, and how to set up the graphics card for resolutions greater than 800 x 600?
With respect to memory mapping, this should be done in some TEM input?
I know Linux is open source, but the code is big, and I don’t have much experience with it. If the answer involves the Linux source code, I would ask, please, to indicate the version, the file and the corresponding lines.
Using framebuffer would be an option for you?
– Pablo
Yes, it would be a valid solution, as long as I could map a large region of the graphics card’s memory. For example, for a 256MB card, it would be nice to be able to access these 256MB. Worst-case scenario, I’d at least like to be able to map enough memory to make a double buffer: at a resolution of 1366x768 @ 32bpp, I would map at least (1366 768 4) 2 bytes.
– carlosrafaelgn
I personally only wrote to the framebuffer so I can’t answer the question, but I found two interesting articles that might help: http://www.tldp.org/HOWTO/Framebuffer-HOWTO/ and https://www.kernel.org/doc/Documentation/fb/framebuffer.txt If you find an answer yourself you can answer your question (this is valid and encouraged by stackexchange).
– Pablo
Oops, thanks Pablo! I’ll analyze the links now :) I’m in other projects, and this direct access to framebuffer does not have high priority... If I can do something, you can let me answer ;)
– carlosrafaelgn