aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-08-05 11:48:20 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-08-05 11:48:20 -0400
commitc682ffe671a0044fa218c1352c19894922e53890 (patch)
treef9c54b97629dcaabbf0b12c267b8d609bd416126 /vgasrc
parent2f2ec113beac2b9b1614a25a0992b03bf599eac5 (diff)
downloadseabios-c682ffe671a0044fa218c1352c19894922e53890.tar.gz
seabios-c682ffe671a0044fa218c1352c19894922e53890.tar.xz
seabios-c682ffe671a0044fa218c1352c19894922e53890.zip
vgautil: Move generic definitions from stdvga.h to vgautil.h
Don't use stdvga.h for function definitions of code in stdvgamodes.c and stdvgaio.c. Move them to vgautil.h. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc')
-rw-r--r--vgasrc/bochsvga.c2
-rw-r--r--vgasrc/stdvga.c1
-rw-r--r--vgasrc/stdvga.h32
-rw-r--r--vgasrc/stdvgaio.c3
-rw-r--r--vgasrc/vgahw.h1
-rw-r--r--vgasrc/vgautil.h31
6 files changed, 37 insertions, 33 deletions
diff --git a/vgasrc/bochsvga.c b/vgasrc/bochsvga.c
index 5658031..ec5d101 100644
--- a/vgasrc/bochsvga.c
+++ b/vgasrc/bochsvga.c
@@ -13,7 +13,7 @@
#include "hw/pci_regs.h" // PCI_BASE_ADDRESS_0
#include "output.h" // dprintf
#include "std/vbe.h" // VBE_CAPABILITY_8BIT_DAC
-#include "stdvga.h" // VGAREG_SEQU_ADDRESS
+#include "stdvga.h" // stdvga_get_linelength
#include "vgabios.h" // SET_VGA
#include "vgautil.h" // VBE_total_memory
#include "x86.h" // outw
diff --git a/vgasrc/stdvga.c b/vgasrc/stdvga.c
index 00a0fc5..886deca 100644
--- a/vgasrc/stdvga.c
+++ b/vgasrc/stdvga.c
@@ -10,6 +10,7 @@
#include "stdvga.h" // stdvga_setup
#include "string.h" // memset_far
#include "vgabios.h" // struct vgamode_s
+#include "vgautil.h" // stdvga_attr_write
#include "x86.h" // outb
diff --git a/vgasrc/stdvga.h b/vgasrc/stdvga.h
index 39753b4..4184c60 100644
--- a/vgasrc/stdvga.h
+++ b/vgasrc/stdvga.h
@@ -44,37 +44,6 @@
#define SEG_CTEXT 0xB800
#define SEG_MTEXT 0xB000
-// stdvgamodes.c
-struct vgamode_s *stdvga_find_mode(int mode);
-void stdvga_list_modes(u16 seg, u16 *dest, u16 *last);
-void stdvga_build_video_param(void);
-void stdvga_override_crtc(int mode, u8 *crtc);
-int stdvga_set_mode(struct vgamode_s *vmode_g, int flags);
-void stdvga_set_packed_palette(void);
-
-// stdvgaio.c
-u8 stdvga_pelmask_read(void);
-void stdvga_pelmask_write(u8 val);
-u8 stdvga_misc_read(void);
-void stdvga_misc_write(u8 value);
-void stdvga_misc_mask(u8 off, u8 on);
-u8 stdvga_sequ_read(u8 index);
-void stdvga_sequ_write(u8 index, u8 value);
-void stdvga_sequ_mask(u8 index, u8 off, u8 on);
-u8 stdvga_grdc_read(u8 index);
-void stdvga_grdc_write(u8 index, u8 value);
-void stdvga_grdc_mask(u8 index, u8 off, u8 on);
-u8 stdvga_crtc_read(u16 crtc_addr, u8 index);
-void stdvga_crtc_write(u16 crtc_addr, u8 index, u8 value);
-void stdvga_crtc_mask(u16 crtc_addr, u8 index, u8 off, u8 on);
-u8 stdvga_attr_read(u8 index);
-void stdvga_attr_write(u8 index, u8 value);
-void stdvga_attr_mask(u8 index, u8 off, u8 on);
-u8 stdvga_attrindex_read(void);
-void stdvga_attrindex_write(u8 value);
-void stdvga_dac_read(u16 seg, u8 *data_far, u8 start, int count);
-void stdvga_dac_write(u16 seg, u8 *data_far, u8 start, int count);
-
// stdvga.c
void stdvga_set_border_color(u8 color);
void stdvga_set_overscan_border_color(u8 color);
@@ -91,6 +60,7 @@ void stdvga_planar4_plane(int plane);
void stdvga_load_font(u16 seg, void *src_far, u16 count
, u16 start, u8 destflags, u8 fontsize);
u16 stdvga_get_crtc(void);
+struct vgamode_s;
int stdvga_vram_ratio(struct vgamode_s *vmode_g);
void stdvga_set_cursor_shape(u16 cursor_type);
void stdvga_set_cursor_pos(int address);
diff --git a/vgasrc/stdvgaio.c b/vgasrc/stdvgaio.c
index d6138c2..77fcecd 100644
--- a/vgasrc/stdvgaio.c
+++ b/vgasrc/stdvgaio.c
@@ -5,7 +5,8 @@
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "farptr.h" // GET_FARVAR
-#include "stdvga.h" // stdvga_pelmask_read
+#include "stdvga.h" // VGAREG_PEL_MASK
+#include "vgautil.h" // stdvga_pelmask_read
#include "x86.h" // inb
u8
diff --git a/vgasrc/vgahw.h b/vgasrc/vgahw.h
index 39f818a..3d9ae39 100644
--- a/vgasrc/vgahw.h
+++ b/vgasrc/vgahw.h
@@ -9,6 +9,7 @@
#include "bochsvga.h" // bochsvga_set_mode
#include "stdvga.h" // stdvga_set_mode
#include "geodevga.h" // geodevga_setup
+#include "vgautil.h" // stdvga_list_modes
static inline struct vgamode_s *vgahw_find_mode(int mode) {
if (CONFIG_VGA_CIRRUS)
diff --git a/vgasrc/vgautil.h b/vgasrc/vgautil.h
index 9e4debb..90fa54d 100644
--- a/vgasrc/vgautil.h
+++ b/vgasrc/vgautil.h
@@ -4,6 +4,37 @@
#include "types.h" // u8
+// stdvgaio.c
+u8 stdvga_pelmask_read(void);
+void stdvga_pelmask_write(u8 val);
+u8 stdvga_misc_read(void);
+void stdvga_misc_write(u8 value);
+void stdvga_misc_mask(u8 off, u8 on);
+u8 stdvga_sequ_read(u8 index);
+void stdvga_sequ_write(u8 index, u8 value);
+void stdvga_sequ_mask(u8 index, u8 off, u8 on);
+u8 stdvga_grdc_read(u8 index);
+void stdvga_grdc_write(u8 index, u8 value);
+void stdvga_grdc_mask(u8 index, u8 off, u8 on);
+u8 stdvga_crtc_read(u16 crtc_addr, u8 index);
+void stdvga_crtc_write(u16 crtc_addr, u8 index, u8 value);
+void stdvga_crtc_mask(u16 crtc_addr, u8 index, u8 off, u8 on);
+u8 stdvga_attr_read(u8 index);
+void stdvga_attr_write(u8 index, u8 value);
+void stdvga_attr_mask(u8 index, u8 off, u8 on);
+u8 stdvga_attrindex_read(void);
+void stdvga_attrindex_write(u8 value);
+void stdvga_dac_read(u16 seg, u8 *data_far, u8 start, int count);
+void stdvga_dac_write(u16 seg, u8 *data_far, u8 start, int count);
+
+// stdvgamodes.c
+struct vgamode_s *stdvga_find_mode(int mode);
+void stdvga_list_modes(u16 seg, u16 *dest, u16 *last);
+void stdvga_build_video_param(void);
+void stdvga_override_crtc(int mode, u8 *crtc);
+int stdvga_set_mode(struct vgamode_s *vmode_g, int flags);
+void stdvga_set_packed_palette(void);
+
// swcursor.c
struct bregs;
void swcursor_pre_handle10(struct bregs *regs);