XenevaOS
Loading...
Searching...
No Matches
vga.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: MIT */
2
3#ifndef __LINUX_VIDEO_VGA_H
4#define __LINUX_VIDEO_VGA_H
5
6/*
7 * DCL <video/vga.h> -- the four VGA register constants bochs.c names, in
8 * upstream's spelling (include/video/vga.h:43-76 in linux-7.2.6).
9 *
10 * mainline's header is the full VGA register map plus vga_r/vga_w/vga_io_r
11 * inline accessors for vgacon. The vendored bochs driver uses none of that:
12 * its VGA touch is bochs_hw_blank()'s three-port sequence -- write the misc
13 * output register, read input status 1 to clear the attribute flip-flop,
14 * then write the attribute register. The offsets below are those three
15 * registers and the one bit the sequence sets; everything else the header
16 * carries is console code this tree does not build.
17 *
18 * The values are the register *port numbers* on an x86 VGA device. bochs
19 * reaches them either through the qemu stdvga's register window (its MMIO
20 * BAR offset 0x400+ holds them, which is the path this target takes) or
21 * through x86 port I/O (the arm that cannot run here; see <asm/io.h>).
22 */
23
24#define VGA_ATT_W 0x3C0 /* Attribute Controller Data Write Register */
25#define VGA_MIS_W 0x3C2 /* Misc Output Write Register */
26#define VGA_IS1_RC 0x3DA /* Input Status Register 1 - color emulation */
27#define VGA_MIS_COLOR 0x01
28
29#endif /* __LINUX_VIDEO_VGA_H */