]> xenbits.xensource.com Git - seabios.git/commitdiff
vgabios: Minor vgabios fixes.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 12 Feb 2012 16:50:52 +0000 (11:50 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 12 Feb 2012 16:50:52 +0000 (11:50 -0500)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgasrc/clext.c
vgasrc/vgabios.c
vgasrc/vgabios.h

index 7d1a604d45fc117acd132ff7460eb54a43414d8d..e5dce3561e1d9224968e955bb9a79187cc5f078b 100644 (file)
@@ -533,8 +533,8 @@ clext_1012a0(struct bregs *regs)
 {
     struct vgamode_s *table_g = clext_find_mode(regs->al & 0x7f);
     regs->ah = (table_g ? 1 : 0);
-    regs->si = 0xffff;
-    regs->di = regs->ds = regs->es = regs->bx = (u32)a0h_callback;
+    regs->bx = (u32)a0h_callback;
+    regs->ds = regs->si = regs->es = regs->di = 0xffff;
 }
 
 static void
index dc5d7e9510bcdb94df8dec7cadc47ea6a831ca6f..bca2e9a9592563e99a43459a6d28918ec3ae8739 100644 (file)
@@ -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
 #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
index d32e1b04c6166a6350200c8efa90dc2647b245ae..13e5cce158e660d18b9c4c559e56d1b68a58e3ba 100644 (file)
@@ -73,6 +73,10 @@ extern u8 vgafont16[];
 extern u8 vgafont14alt[];
 extern u8 vgafont16alt[];
 
+// Debug settings
+#define DEBUG_VGA_POST 1
+#define DEBUG_VGA_10 3
+
 // vgabios.c
 extern int VgaBDF;
 extern int HaveRunInit;