Mapping video card memory for access via Intel compatible x86 processor

8
Thinking about Intel x86 compatible computers, regardless of 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 (B8000h linear), A000: 0000 (A0000h linear) etc, and through them can write characters or pixels on the screen.

However, thinking only of pixels, the address A0000h maps a very small region of the video memory (128k), a far cry from the capacity of the current video cards.

In addition, using only the basic routines provided by the VGA and SVGA standard, you can not change the resolution for eg 1366 x 768 (at least I could not identify how).

The question is, assuming I'm already running 32- or 64-bit protected mode, in ring0, how to map a region of video memory so the processor can access it, and how to set up the video card for resolutions greater than 800 x 600?

Regarding memory mapping, should this be done in some GDT entry?

I know that Linux is open source, but the code is great, and I do not 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.

    
asked by anonymous 28.04.2014 / 23:18

1 answer

1

To use the memory of the card are not these addresses, this process involves direct access to the video card through "hardware interrupts", you would call in your assembly:

int 0x00 ; o número passado é um código interno para uma função de hardware

This command, for example, would pass data from RAM to Video Card or vice versa, or call internal commands from it.

"I honestly do not know how this process works specifically because of the manufacturer's drivers, libraries like DirectX, DXGI and OpenGL do all the work."

    
16.05.2014 / 20:48