aboutsummaryrefslogtreecommitdiff
path: root/src/bootsplash.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2010-07-26 23:25:39 -0400
committerKevin O'Connor <kevin@koconnor.net>2010-07-26 23:25:39 -0400
commit2641186e7650d1dbe9249f57fe005581f31da402 (patch)
treec6da148d55f6ee2c7da2353344eab2e34ee515c8 /src/bootsplash.c
parent6dc76f466141c64fc67133ca27680743c2462be5 (diff)
downloadseabios-hppa-2641186e7650d1dbe9249f57fe005581f31da402.zip
seabios-hppa-2641186e7650d1dbe9249f57fe005581f31da402.tar.gz
seabios-hppa-2641186e7650d1dbe9249f57fe005581f31da402.tar.bz2
Add call16_int10 helper to bootsplash.c.
Diffstat (limited to 'src/bootsplash.c')
-rw-r--r--src/bootsplash.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/bootsplash.c b/src/bootsplash.c
index e2156f2..b96e066 100644
--- a/src/bootsplash.c
+++ b/src/bootsplash.c
@@ -73,9 +73,21 @@ struct vesa_mode_info
* Helper functions
****************************************************************/
+// Call int10 vga handler.
+static void
+call16_int10(struct bregs *br)
+{
+ br->flags = F_IF;
+ start_preempt();
+ call16_int(0x10, br);
+ finish_preempt();
+}
+
+
/****************************************************************
* VGA text / graphics console
****************************************************************/
+
static void enable_vga_text_console(void)
{
dprintf(1, "Turning on vga text mode console\n");
@@ -83,11 +95,8 @@ static void enable_vga_text_console(void)
/* Enable VGA text mode */
memset(&br, 0, sizeof(br));
- br.flags = F_IF;
br.ax = 0x0003;
- start_preempt();
- call16_int(0x10, &br);
- finish_preempt();
+ call16_int10(&br);
// Write to screen.
printf("Starting SeaBIOS (version %s)\n\n", VERSION);
@@ -126,13 +135,10 @@ void enable_vga_console(void)
struct bregs br;
memset(&br, 0, sizeof(br));
- br.flags = F_IF;
br.ax = 0x4f00;
br.di = FLATPTR_TO_OFFSET(vesa_info);
br.es = FLATPTR_TO_SEG(vesa_info);
- start_preempt();
- call16_int(0x10, &br);
- finish_preempt();
+ call16_int10(&br);
if (strcmp("VESA", (char *)vesa_info) != 0) {
dprintf(1,"No VBE2 found.\n");
@@ -150,14 +156,11 @@ void enable_vga_console(void)
* framebuffer start address
*/
memset(&br, 0, sizeof(br));
- br.flags = F_IF;
br.ax = 0x4f01;
br.cx = (1 << 14) | CONFIG_BOOTSPLASH_VESA_MODE;
br.di = FLATPTR_TO_OFFSET(mode_info);
br.es = FLATPTR_TO_SEG(mode_info);
- start_preempt();
- call16_int(0x10, &br);
- finish_preempt();
+ call16_int10(&br);
if (br.ax != 0x4f) {
dprintf(1, "get_mode failed.\n");
goto gotext;
@@ -166,12 +169,9 @@ void enable_vga_console(void)
/* Switch to graphics mode */
memset(&br, 0, sizeof(br));
- br.flags = F_IF;
br.ax = 0x4f02;
br.bx = (1 << 14) | CONFIG_BOOTSPLASH_VESA_MODE;
- start_preempt();
- call16_int(0x10, &br);
- finish_preempt();
+ call16_int10(&br);
if (br.ax != 0x4f) {
dprintf(1, "set_mode failed.\n");
goto gotext;