Module Name: src
Committed By: jmcneill
Date: Mon Aug 24 11:33:49 UTC 2009
Modified Files:
src/sys/arch/x86/include: vga_post.h
src/sys/arch/x86/x86: vga_post.c
Log Message:
Add vga_post_set_vbe for setting video mode.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x86/include/vga_post.h
cvs rdiff -u -r1.12 -r1.13 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/include/vga_post.h
diff -u src/sys/arch/x86/include/vga_post.h:1.2 src/sys/arch/x86/include/vga_post.h:1.3
--- src/sys/arch/x86/include/vga_post.h:1.2 Sat Mar 29 17:40:22 2008
+++ src/sys/arch/x86/include/vga_post.h Mon Aug 24 11:33:49 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: vga_post.h,v 1.2 2008/03/29 17:40:22 jmcneill Exp $ */
+/* $NetBSD: vga_post.h,v 1.3 2009/08/24 11:33:49 jmcneill Exp $ */
/*-
* Copyright (c) 2007 Joerg Sonnenberger <[email protected]>.
@@ -38,5 +38,6 @@
struct vga_post *vga_post_init(int, int, int);
void vga_post_free(struct vga_post *);
void vga_post_call(struct vga_post *);
+void vga_post_set_vbe(struct vga_post *, uint16_t);
#endif
#endif
Index: src/sys/arch/x86/x86/vga_post.c
diff -u src/sys/arch/x86/x86/vga_post.c:1.12 src/sys/arch/x86/x86/vga_post.c:1.13
--- src/sys/arch/x86/x86/vga_post.c:1.12 Sun Mar 15 21:32:36 2009
+++ src/sys/arch/x86/x86/vga_post.c Mon Aug 24 11:33:49 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: vga_post.c,v 1.12 2009/03/15 21:32:36 cegger Exp $ */
+/* $NetBSD: vga_post.c,v 1.13 2009/08/24 11:33:49 jmcneill Exp $ */
/*-
* Copyright (c) 2007 Joerg Sonnenberger <[email protected]>.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga_post.c,v 1.12 2009/03/15 21:32:36 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga_post.c,v 1.13 2009/08/24 11:33:49 jmcneill Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -227,6 +227,14 @@
}
void
+vga_post_set_vbe(struct vga_post *sc, uint16_t vbemode)
+{
+ sc->emu.x86.R_EBX = vbemode | 0x4000;
+ sc->emu.x86.R_EAX = 0x4f02;
+ X86EMU_exec_intr(&sc->emu, 0x10);
+}
+
+void
vga_post_free(struct vga_post *sc)
{
uvm_pglistfree(&sc->ram_backing);