Change real mode API to allow passing intXX number or entry point and
[coreboot.git] / src / northbridge / via / vt8623 / vga.c
index 78ffe0aa9439c2f288322b0767f9d7fa6b0f3c22..eb780cafe7cdec13046ad7ff4afa1140274458af 100644 (file)
@@ -72,7 +72,8 @@ static int via_vt8623_int15_handler(struct eregs *regs)
        return res;
 }
 
-void write_protect_vgabios(void)
+#ifdef UNUSED_CODE
+static void write_protect_vgabios(void)
 {
        device_t dev;
 
@@ -86,6 +87,7 @@ void write_protect_vgabios(void)
        if (dev)
                pci_write_config8(dev, 0x61, 0xaa);
 }
+#endif
 
 static void vga_random_fixup(device_t dev)
 {
@@ -96,6 +98,17 @@ static void vga_random_fixup(device_t dev)
        pci_write_config32(dev,0x14,0xdc000000);
 }
 
+static void vga_enable_console(void)
+{
+       /* Call VGA BIOS int10 function 0x4f14 to enable main console
+        * Epia-M does not always autosense the main console so forcing
+        * it on is good.
+        */
+
+       /*                 int#,    EAX,    EBX,    ECX,    EDX,    ESI,    EDI */
+       realmode_interrupt(0x10, 0x4f1f, 0x8003, 0x0001, 0x0000, 0x0000, 0x0000);
+}
+
 static void vga_init(device_t dev)
 {
        vga_random_fixup(dev);
@@ -118,9 +131,6 @@ static void vga_init(device_t dev)
        pci_dev_init(dev);
 
        printk(BIOS_DEBUG, "Enable VGA console\n");
-       // this is how it should look:
-       //   call_bios_interrupt(0x10,0x4f1f,0x8003,1,0);
-       // this is how it looks:
        vga_enable_console();
 
 #ifdef MEASURE_VGA_INIT_TIME