Add support to run SMM handler in TSEG instead of ASEG
[coreboot.git] / src / include / pc80 / vga_io.h
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007 Luc Verhaegen <libv@skynet.be>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19  */
20
21 #ifndef VGA_IO_H
22 #define VGA_IO_H
23
24 /*
25  * All IO necessary to poke VGA registers.
26  */
27
28 /* VGA Enable */
29 unsigned char vga_enable_read(void);
30 void vga_enable_write(unsigned char value);
31 void vga_enable_mask(unsigned char value, unsigned char mask);
32
33 /* Miscellaneous register */
34 unsigned char vga_misc_read(void);
35 void vga_misc_write(unsigned char value);
36 void vga_misc_mask(unsigned char value, unsigned char mask);
37
38 /* Sequencer registers. */
39 unsigned char vga_sr_read(unsigned char index);
40 void vga_sr_write(unsigned char index, unsigned char value);
41 void vga_sr_mask(unsigned char index, unsigned char value, unsigned char mask);
42
43 /* CR registers. */
44 unsigned char vga_cr_read(unsigned char index);
45 void vga_cr_write(unsigned char index, unsigned char value);
46 void vga_cr_mask(unsigned char index, unsigned char value, unsigned char mask);
47
48 /* Attribute registers. */
49 unsigned char vga_ar_read(unsigned char index);
50 void vga_ar_write(unsigned char index, unsigned char value);
51 void vga_ar_mask(unsigned char index, unsigned char value, unsigned char mask);
52
53 /* Graphics registers. */
54 unsigned char vga_gr_read(unsigned char index);
55 void vga_gr_write(unsigned char index, unsigned char value);
56 void vga_gr_mask(unsigned char index, unsigned char value, unsigned char mask);
57
58 /* DAC functions. */
59 void vga_palette_enable(void);
60 void vga_palette_disable(void);
61 unsigned char vga_dac_mask_read(void);
62 void vga_dac_mask_write(unsigned char mask);
63 void vga_dac_read_address(unsigned char address);
64 void vga_dac_write_address(unsigned char address);
65 unsigned char vga_dac_data_read(void);
66 void vga_dac_data_write(unsigned char data);
67
68 #endif /* VGA_IO_H */