System information
4 Graphic Card Implementation
As a reminder, the video plane contains ASCII characters while running an alphanumeric
(text) video mode (section 4.1.2 explains the alphanumeric mode). The host computer can
change the offset of the viewable part of the video plane. Changing the start of the actual
video content avoids the copy of the video content, if the cursor is located at the last line
and the text on the screen has to be scrolled to the top. The device file /dev/charm/vga/text
takes this into account and provides always the actual and valid content of the video plane.
Furthermore, this device file merges the plane 0 containing the ASCII characters and plane
1 containing the attribute values together. The least significant byte of a word provides the
character and the most significant byte provides the related attribute value while reading the
text mode device file. An ioctl request to the device file /dev/charm/vga/control provides
following information:
• Current video mode, screen resolution and color depth.
• A region which marks only the new content of the video plane. This information
reduces the CPU and bandwidth costs for a screen update.
• Sets the value for the VGA register of the beam retrace (section 4.2.1 gives more
information about the beam retrace).
• Provides a flag which gives information about the change of the video mode.
The device file /dev/charm/vga/control is mainly used by the VNC server. But the driver
also creates files in the process file system (/proc). It is a virtual file system that resides in
the kernel’s memory. The VGA process files provides information about the running video
mode. Table 4.4 shows a list of the system files inside the VGA driver subdirectory.
Device File Description
/proc/charm/vga/mode Informs about the actual video mode
/proc/charm/vga/stats Returns statistical values
Table 4.4: Process file system entry of the VGA driver.
Basically, the video planes, the color palette and the video mode are used for the video
screen construction. In contrast, the other VGA system files mentioned above provides
debugging information.
Another import task of the VGA driver is the preparation of data for the requesting host
computer. A read access to a VGA card is not even a simple return of stored video data.
According to the VGA protocol the most of the requesting data have to be generate. Figure
4.14 illustrates the process of a read request against the CHARM. For data generation, the
video planes and the registers have to be taken into account. More information about the
VGA read process can be found at [56].
The Read Buffer is located in the SDRAM. The PCI target control unit reads out this
buffer and provides the data to the host computer. This process is discussed in section
4.2.2.
58