Signed-off-by: Kevin O'Connor kevin@koconnor.net --- vgasrc/clext.c | 7 ++++--- vgasrc/clext.h | 9 +++++++++ vgasrc/vgabios.c | 5 +++-- vgasrc/vgabios.h | 4 ---- 4 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 vgasrc/clext.h
diff --git a/vgasrc/clext.c b/vgasrc/clext.c index 7774ba3..7071749 100644 --- a/vgasrc/clext.c +++ b/vgasrc/clext.c @@ -5,7 +5,8 @@ // // This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "vgabios.h" // cirrus_init +#include "clext.h" // clext_init +#include "vgabios.h" // VBE_VENDOR_STRING #include "biosvar.h" // GET_GLOBAL #include "util.h" // dprintf #include "bregs.h" // struct bregs @@ -392,7 +393,7 @@ cirrus_clear_vram(u16 param) }
int -cirrus_set_video_mode(u8 mode, u8 noclearmem) +clext_set_video_mode(u8 mode, u8 noclearmem) { dprintf(1, "cirrus mode %d\n", mode); SET_BDA(vbe_mode, 0); @@ -932,7 +933,7 @@ cirrus_vesa(struct bregs *regs) ****************************************************************/
void -cirrus_init(void) +clext_init(void) { dprintf(1, "cirrus init\n"); if (! cirrus_check()) diff --git a/vgasrc/clext.h b/vgasrc/clext.h new file mode 100644 index 0000000..7d486a3 --- /dev/null +++ b/vgasrc/clext.h @@ -0,0 +1,9 @@ +#ifndef __CLEXT_H +#define __CLEXT_H + +#include "types.h" // u8 + +int clext_set_video_mode(u8 mode, u8 noclearmem); +void clext_init(void); + +#endif // clext.h diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c index d7c559a..203a394 100644 --- a/vgasrc/vgabios.c +++ b/vgasrc/vgabios.c @@ -20,6 +20,7 @@ #include "stdvga.h" // stdvga_set_mode #include "geodelx.h" // geodelx_init #include "bochsvga.h" // bochsvga_init +#include "clext.h" // clext_init
// XXX #define DEBUG_VGA_POST 1 @@ -389,7 +390,7 @@ handle_1000(struct bregs *regs) regs->al = 0x30;
if (CONFIG_VGA_CIRRUS) { - int ret = cirrus_set_video_mode(mode, noclearmem); + int ret = clext_set_video_mode(mode, noclearmem); if (ret) return; } @@ -1213,7 +1214,7 @@ vga_post(struct bregs *regs) SET_IVT(0x10, SEGOFF(get_global_seg(), (u32)entry_10));
if (CONFIG_VGA_CIRRUS) - cirrus_init(); + clext_init();
// XXX - clear screen and display info
diff --git a/vgasrc/vgabios.h b/vgasrc/vgabios.h index 0371f8c..c973d5f 100644 --- a/vgasrc/vgabios.h +++ b/vgasrc/vgabios.h @@ -65,10 +65,6 @@ struct carattr vgafb_read_char(struct cursorpos cp); void vgafb_write_pixel(u8 color, u16 x, u16 y); u8 vgafb_read_pixel(u16 x, u16 y);
-// clext.c -int cirrus_set_video_mode(u8 mode, u8 noclearmem); -void cirrus_init(void); - // vbe.c #define VBE_OEM_STRING "SeaBIOS VBE(C) 2011" #define VBE_VENDOR_STRING "SeaBIOS Developers"