summaryrefslogtreecommitdiff
path: root/src/northbridge/via/cx700
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-05-11 15:39:20 +0000
committerStefan Reinauer <stepan@openbios.org>2010-05-11 15:39:20 +0000
commit841af5e01e3e6b017a4f0ab7800fdf14baffd93f (patch)
treecf28c9ebadfa364972344949846a9a56531b3ffb /src/northbridge/via/cx700
parent48beb8276989f35f5510fbdc101cd2a222a3d21e (diff)
Change real mode API to allow passing intXX number or entry point and
some register values from C. This theoretically fixes non-vga option roms, but it also allows to use the same assembler code for option roms and vsm. It will also make using the bootsplash without yabel a lot easier. Factor out and improve BDA setup, do some rom segment setup for those option roms that need it. Don't call the coreboot exception handler if an exception occurs in real mode. It's only partly usable, but mainly the Kontron 986LCD-M (and other i945GM boards) choke on an exception #6 (invalid opcode). This particular issue is not introduced by the changes in this patch but has been around for quite a while at least. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5543 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/via/cx700')
-rw-r--r--src/northbridge/via/cx700/cx700_vga.c14
-rw-r--r--src/northbridge/via/cx700/northbridge.h4
2 files changed, 13 insertions, 5 deletions
diff --git a/src/northbridge/via/cx700/cx700_vga.c b/src/northbridge/via/cx700/cx700_vga.c
index 2999907616..2da428c32f 100644
--- a/src/northbridge/via/cx700/cx700_vga.c
+++ b/src/northbridge/via/cx700/cx700_vga.c
@@ -144,6 +144,17 @@ static void write_protect_vgabios(void)
}
#endif
+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)
{
u8 reg8;
@@ -166,9 +177,6 @@ static void vga_init(device_t dev)
if (pci_read_config32(dev, PCI_ROM_ADDRESS) != 0xc0000) return;
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();
/* It's not clear if these need to be programmed before or after
diff --git a/src/northbridge/via/cx700/northbridge.h b/src/northbridge/via/cx700/northbridge.h
index 193ba1fa48..4ae9ce5937 100644
--- a/src/northbridge/via/cx700/northbridge.h
+++ b/src/northbridge/via/cx700/northbridge.h
@@ -21,6 +21,6 @@
#define NORTHBRIDGE_VIA_CX700_H
extern unsigned int cx700_scan_root_bus(device_t root, unsigned int max);
-extern void (*vga_enable_console)(void) __attribute__((regparm(0)));
-
+extern void (*realmode_interrupt)(u32 intno, u32 eax, u32 ebx, u32 ecx, u32 edx,
+ u32 esi, u32 edi) __attribute__((regparm(0)));
#endif /* NORTHBRIDGE_VIA_CX700_H */