aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc/vgabios.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2012-02-12 11:50:52 -0500
committerKevin O'Connor <kevin@koconnor.net>2012-02-12 11:50:52 -0500
commit4c85a263af84add8f1dfa9672e6b33a34dbcf348 (patch)
treea6079864112b345861f6162b69d83d13ea7c61f7 /vgasrc/vgabios.c
parent815411307e86f4fbdf96e2c988689361fd060cc7 (diff)
downloadseabios-4c85a263af84add8f1dfa9672e6b33a34dbcf348.tar.gz
vgabios: Minor vgabios fixes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/vgabios.c')
-rw-r--r--vgasrc/vgabios.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index dc5d7e95..bca2e9a9 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -1,16 +1,10 @@
// VGA bios implementation
//
-// Copyright (C) 2009 Kevin O'Connor <kevin@koconnor.net>
+// Copyright (C) 2009-2012 Kevin O'Connor <kevin@koconnor.net>
// Copyright (C) 2001-2008 the LGPL VGABios developers Team
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
-
-// TODO:
-// * review correctness of converted asm by comparing with RBIL
-//
-// * convert vbe/clext code
-
#include "bregs.h" // struct bregs
#include "biosvar.h" // GET_BDA
#include "util.h" // memset
@@ -24,10 +18,6 @@
#include "pci.h" // pci_config_readw
#include "pci_regs.h" // PCI_VENDOR_ID
-// XXX
-#define DEBUG_VGA_POST 1
-#define DEBUG_VGA_10 3
-
// Standard Video Save Pointer Table
struct VideoSavePointer_s {
struct segoff_s videoparam;
@@ -46,7 +36,7 @@ struct VideoParam_s video_param_table[29] VAR16;
/****************************************************************
* PCI Data
****************************************************************/
-#if CONFIG_VGA_PCI == 1
+
struct pci_data rom_pci_data VAR16VISIBLE = {
.signature = PCI_ROM_SIGNATURE,
.vendor = CONFIG_VGA_VID,
@@ -57,7 +47,7 @@ struct pci_data rom_pci_data VAR16VISIBLE = {
.type = PCIROM_CODETYPE_X86,
.indicator = 0x80,
};
-#endif
+
/****************************************************************
* Helper functions
@@ -170,7 +160,7 @@ set_active_page(u8 page)
if (!vmode_g)
return;
- // Get pos curs pos for the right page
+ // Get cursor pos for the given page
struct cursorpos cp = get_cursor_pos(page);
// Calculate memory address of start of page
@@ -875,7 +865,7 @@ handle_101130(struct bregs *regs)
regs->cx = GET_BDA(char_height) & 0xff;
// Set Highest char row
- regs->dx = GET_BDA(video_rows);
+ regs->dl = GET_BDA(video_rows);
}
static void
@@ -1274,8 +1264,6 @@ vga_post(struct bregs *regs)
extern void entry_10(void);
SET_IVT(0x10, SEGOFF(get_global_seg(), (u32)entry_10));
- // XXX - clear screen and display info
-
SET_VGA(HaveRunInit, 1);
// Fixup checksum