aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-01-21 01:14:12 -0500
committerKevin O'Connor <kevin@koconnor.net>2013-02-05 20:00:29 -0500
commitd83c87bb20a8ac5faf80ead44ff8dc793bf25a84 (patch)
tree507ec4bf6d5885feb915f41807c18c3437ab7d3d /vgasrc
parent88ab34e2cfbed34a848be8ec45248cf291c37049 (diff)
downloadseabios-d83c87bb20a8ac5faf80ead44ff8dc793bf25a84.tar.gz
Normalize POST initialization function name suffixes.
The POST phase has to invoke many initialization functions, and these functions can have complex inter-dependencies. Try to categorize the functions into 4 classes: preinit - functions called very early in POST where function ordering is very important and the code has limited access to other interfaces. init - functions that initialize internal interfaces and standard external interfaces. This code is generally not dependent on particular hardware and typically does not communicate directly with any hardware devices. setup - functions which access hardware or are dependent on particular hardware or platform devices. prepboot - functions that finalize internal interfaces and that prepare for the boot phase. This patch attempts to normalize the suffixes - functions that used _init(), _setup(), _finalize(), or similar that did not follow the above pattern were renamed. Other than function name changes, there should be no code impact to this patch. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc')
-rw-r--r--vgasrc/bochsvga.c4
-rw-r--r--vgasrc/bochsvga.h2
-rw-r--r--vgasrc/clext.c6
-rw-r--r--vgasrc/clext.h2
-rw-r--r--vgasrc/geodevga.c10
-rw-r--r--vgasrc/geodevga.h2
-rw-r--r--vgasrc/stdvga.c4
-rw-r--r--vgasrc/stdvga.h2
-rw-r--r--vgasrc/vgabios.c4
-rw-r--r--vgasrc/vgahw.h12
10 files changed, 24 insertions, 24 deletions
diff --git a/vgasrc/bochsvga.c b/vgasrc/bochsvga.c
index 938dba07..bb5a64d9 100644
--- a/vgasrc/bochsvga.c
+++ b/vgasrc/bochsvga.c
@@ -329,9 +329,9 @@ bochsvga_set_mode(struct vgamode_s *vmode_g, int flags)
****************************************************************/
int
-bochsvga_init(void)
+bochsvga_setup(void)
{
- int ret = stdvga_init();
+ int ret = stdvga_setup();
if (ret)
return ret;
diff --git a/vgasrc/bochsvga.h b/vgasrc/bochsvga.h
index 1c982034..87fb6ea8 100644
--- a/vgasrc/bochsvga.h
+++ b/vgasrc/bochsvga.h
@@ -66,6 +66,6 @@ int bochsvga_size_state(int states);
int bochsvga_save_state(u16 seg, void *data, int states);
int bochsvga_restore_state(u16 seg, void *data, int states);
int bochsvga_set_mode(struct vgamode_s *vmode_g, int flags);
-int bochsvga_init(void);
+int bochsvga_setup(void);
#endif // bochsvga.h
diff --git a/vgasrc/clext.c b/vgasrc/clext.c
index fc5459ac..dd45df3c 100644
--- a/vgasrc/clext.c
+++ b/vgasrc/clext.c
@@ -5,7 +5,7 @@
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "clext.h" // clext_init
+#include "clext.h" // clext_setup
#include "vgabios.h" // VBE_VENDOR_STRING
#include "biosvar.h" // GET_GLOBAL
#include "util.h" // dprintf
@@ -603,9 +603,9 @@ cirrus_get_memsize(void)
}
int
-clext_init(void)
+clext_setup(void)
{
- int ret = stdvga_init();
+ int ret = stdvga_setup();
if (ret)
return ret;
diff --git a/vgasrc/clext.h b/vgasrc/clext.h
index 78dba01d..efc98b9c 100644
--- a/vgasrc/clext.h
+++ b/vgasrc/clext.h
@@ -17,6 +17,6 @@ int clext_restore_state(u16 seg, void *data, int states);
int clext_set_mode(struct vgamode_s *vmode_g, int flags);
struct bregs;
void clext_1012(struct bregs *regs);
-int clext_init(void);
+int clext_setup(void);
#endif // clext.h
diff --git a/vgasrc/geodevga.c b/vgasrc/geodevga.c
index 5b42e00e..c2dabf5e 100644
--- a/vgasrc/geodevga.c
+++ b/vgasrc/geodevga.c
@@ -6,7 +6,7 @@
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "geodevga.h" // geodevga_init
+#include "geodevga.h" // geodevga_setup
#include "farptr.h" // SET_FARVAR
#include "biosvar.h" // GET_BDA
#include "vgabios.h" // VGAREG_*
@@ -369,16 +369,16 @@ static u8 geode_crtc_13[] VAR16 = {
0x9b, 0x8d, 0x8f, 0x28, 0x40, 0x98, 0xb9, 0xa3,
0xff };
-int geodevga_init(void)
+int geodevga_setup(void)
{
- int ret = stdvga_init();
+ int ret = stdvga_setup();
if (ret)
return ret;
- dprintf(1,"GEODEVGA_INIT\n");
+ dprintf(1,"GEODEVGA_SETUP\n");
if ((ret=legacyio_check())) {
- dprintf(1,"GEODEVGA_INIT legacyio_check=0x%x\n",ret);
+ dprintf(1,"GEODEVGA_SETUP legacyio_check=0x%x\n",ret);
}
// Updated timings from geode datasheets, table 6-53 in particular
diff --git a/vgasrc/geodevga.h b/vgasrc/geodevga.h
index 5993b23b..180bd05c 100644
--- a/vgasrc/geodevga.h
+++ b/vgasrc/geodevga.h
@@ -84,6 +84,6 @@
/* Mask */
#define DC_CFG_MSK 0xf000a6
-int geodevga_init();
+int geodevga_setup();
#endif
diff --git a/vgasrc/stdvga.c b/vgasrc/stdvga.c
index ae6c0be3..a29d6d47 100644
--- a/vgasrc/stdvga.c
+++ b/vgasrc/stdvga.c
@@ -6,7 +6,7 @@
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "vgabios.h" // struct vgamode_s
-#include "stdvga.h" // stdvga_init
+#include "stdvga.h" // stdvga_setup
#include "ioport.h" // outb
#include "farptr.h" // SET_FARVAR
#include "biosvar.h" // GET_GLOBAL
@@ -490,7 +490,7 @@ stdvga_enable_video_addressing(u8 disable)
}
int
-stdvga_init(void)
+stdvga_setup(void)
{
// switch to color mode and enable CPU access 480 lines
stdvga_misc_write(0xc3);
diff --git a/vgasrc/stdvga.h b/vgasrc/stdvga.h
index c9a9ba14..d712a32f 100644
--- a/vgasrc/stdvga.h
+++ b/vgasrc/stdvga.h
@@ -107,6 +107,6 @@ int stdvga_size_state(int states);
int stdvga_save_state(u16 seg, void *data, int states);
int stdvga_restore_state(u16 seg, void *data, int states);
void stdvga_enable_video_addressing(u8 disable);
-int stdvga_init(void);
+int stdvga_setup(void);
#endif // stdvga.h
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index afaf018b..3e26e324 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -1281,7 +1281,7 @@ int HaveRunInit VAR16;
void VISIBLE16
vga_post(struct bregs *regs)
{
- debug_serial_setup();
+ debug_serial_preinit();
dprintf(1, "Start SeaVGABIOS (version %s)\n", VERSION);
debug_enter(regs, DEBUG_VGA_POST);
@@ -1294,7 +1294,7 @@ vga_post(struct bregs *regs)
SET_VGA(VgaBDF, bdf);
}
- int ret = vgahw_init();
+ int ret = vgahw_setup();
if (ret) {
dprintf(1, "Failed to initialize VGA hardware. Exiting.\n");
return;
diff --git a/vgasrc/vgahw.h b/vgasrc/vgahw.h
index 044cd32c..f69a5ac5 100644
--- a/vgasrc/vgahw.h
+++ b/vgasrc/vgahw.h
@@ -7,7 +7,7 @@
#include "clext.h" // clext_set_mode
#include "bochsvga.h" // bochsvga_set_mode
#include "stdvga.h" // stdvga_set_mode
-#include "geodevga.h" // geodevga_init
+#include "geodevga.h" // geodevga_setup
static inline struct vgamode_s *vgahw_find_mode(int mode) {
if (CONFIG_VGA_CIRRUS)
@@ -34,14 +34,14 @@ static inline void vgahw_list_modes(u16 seg, u16 *dest, u16 *last) {
stdvga_list_modes(seg, dest, last);
}
-static inline int vgahw_init(void) {
+static inline int vgahw_setup(void) {
if (CONFIG_VGA_CIRRUS)
- return clext_init();
+ return clext_setup();
if (CONFIG_VGA_BOCHS)
- return bochsvga_init();
+ return bochsvga_setup();
if (CONFIG_VGA_GEODEGX2 || CONFIG_VGA_GEODELX)
- return geodevga_init();
- return stdvga_init();
+ return geodevga_setup();
+ return stdvga_setup();
}
static inline int vgahw_get_window(struct vgamode_s *vmode_g, int window) {