[coreboot-gerrit] Patch set updated for coreboot: 16d4907 bochs: add support for native graphics

Ronald G. Minnich (rminnich@gmail.com) gerrit at coreboot.org
Wed Nov 20 19:51:05 CET 2013


Ronald G. Minnich (rminnich at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4258

-gerrit

commit 16d490792216bfe5c6d75e147763f6f00eb07510
Author: Ronald G. Minnich <rminnich at google.com>
Date:   Tue Nov 19 17:42:41 2013 -0800

    bochs: add support for native graphics
    
    This is an attempt to make native graphics work in the x86 qemu mainboards.
    
    It's basically right code-wise, and it builds, and we get no graphics in qemu.
    
    Change-Id: I66188f61e1bac7ad93c989cc10f3e0b55140e148
    Signed-off-by: Ronald G. Minnich <rminnich at google.com>
---
 src/drivers/emulation/qemu/bochs.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c
index 1fd7e28..4242285 100644
--- a/src/drivers/emulation/qemu/bochs.c
+++ b/src/drivers/emulation/qemu/bochs.c
@@ -1,4 +1,6 @@
+#include <stdint.h>
 #include <delay.h>
+#include <edid.h>
 #include <stdlib.h>
 #include <string.h>
 #include <arch/io.h>
@@ -81,6 +83,8 @@ static void bochs_init(device_t dev)
 	printk(BIOS_DEBUG, "QEMU VGA: framebuffer @ %x (pci bar %d)\n",
 	       addr, bar);
 
+	if (!addr)
+		return;
 	/* setup video mode */
 	bochs_write(VBE_DISPI_INDEX_ENABLE,	 0);
 	bochs_write(VBE_DISPI_INDEX_BANK,	 0);
@@ -95,8 +99,16 @@ static void bochs_init(device_t dev)
 		    VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED);
 
 	outb(0x20, 0x3c0); /* disable blanking */
+#if CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT
+	struct edid edid;
+	edid.ha = width;
+	edid.va = height;
+	edid.bpp = 32;
+	set_vbe_mode_info_valid(&edid, addr);
+#endif
 }
 
+#if !CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT
 int vbe_mode_info_valid(void);
 int vbe_mode_info_valid(void)
 {
@@ -123,6 +135,7 @@ void fill_lb_framebuffer(struct lb_framebuffer *framebuffer)
 	framebuffer->reserved_mask_pos = 24;
 	framebuffer->reserved_mask_size = 8;
 }
+#endif
 
 static struct device_operations qemu_graph_ops = {
 	.read_resources	  = pci_dev_read_resources,



More information about the coreboot-gerrit mailing list