The Pedigree Project  0.1
boot/ppc/Vga.h
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef MACHINE_X86_VGA_H
21 #define MACHINE_X86_VGA_H
22 
23 #define VGA_BASE 0x3C0
24 #define VGA_AC_INDEX 0x0
25 #define VGA_AC_WRITE 0x0
26 #define VGA_AC_READ 0x1
27 #define VGA_MISC_WRITE 0x2
28 #define VGA_SEQ_INDEX 0x4
29 #define VGA_SEQ_DATA 0x5
30 #define VGA_DAC_READ_INDEX 0x7
31 #define VGA_DAC_WRITE_INDEX 0x8
32 #define VGA_DAC_DATA 0x9
33 #define VGA_MISC_READ 0xC
34 #define VGA_GC_INDEX 0xE
35 #define VGA_GC_DATA 0xF
36 /* COLOR emulation MONO emulation */
37 #define VGA_CRTC_INDEX 0x14 /* 0x3B4 */
38 #define VGA_CRTC_DATA 0x15 /* 0x3B5 */
39 #define VGA_INSTAT_READ 0x1A
40 
41 #define VGA_NUM_SEQ_REGS 5
42 #define VGA_NUM_CRTC_REGS 25
43 #define VGA_NUM_GC_REGS 9
44 #define VGA_NUM_AC_REGS 21
45 #define VGA_NUM_REGS \
46  (1 + VGA_NUM_SEQ_REGS + VGA_NUM_CRTC_REGS + VGA_NUM_GC_REGS + \
47  VGA_NUM_AC_REGS)
48 
49 void vga_init();
50 
51 #endif