Module Name: src Committed By: jmcneill Date: Sat Feb 12 19:13:30 UTC 2011
Modified Files: src/sys/arch/x86/x86: vga_post.c Log Message: Don't rely on vga_post_call being called before vga_post_set_vbe To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/x86/x86/vga_post.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/vga_post.c diff -u src/sys/arch/x86/x86/vga_post.c:1.17 src/sys/arch/x86/x86/vga_post.c:1.18 --- src/sys/arch/x86/x86/vga_post.c:1.17 Fri Nov 12 13:18:59 2010 +++ src/sys/arch/x86/x86/vga_post.c Sat Feb 12 19:13:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vga_post.c,v 1.17 2010/11/12 13:18:59 uebayasi Exp $ */ +/* $NetBSD: vga_post.c,v 1.18 2011/02/12 19:13:30 jmcneill Exp $ */ /*- * Copyright (c) 2007 Joerg Sonnenberger <jo...@netbsd.org>. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vga_post.c,v 1.17 2010/11/12 13:18:59 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga_post.c,v 1.18 2011/02/12 19:13:30 jmcneill Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -235,6 +235,19 @@ void vga_post_set_vbe(struct vga_post *sc, uint16_t vbemode) { + sc->emu.x86.R_EAX = sc->initial_eax; + sc->emu.x86.R_EDX = 0x00000080; + sc->emu.x86.R_DS = 0x0040; + sc->emu.x86.register_flags = 0x3200; + + memcpy((void *)sc->sys_image, sc->bios_data, PAGE_SIZE); + + /* stack is at the end of the first 64KB */ + sc->emu.x86.R_SS = 0; + sc->emu.x86.R_ESP = 0; + + x86emu_i8254_init(&sc->i8254, nanotime); + sc->emu.x86.R_EBX = vbemode | 0x4000; sc->emu.x86.R_EAX = 0x4f02; X86EMU_exec_intr(&sc->emu, 0x10);