From dd9945bdc7d221e58c1212092d315e1f13b66f85 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 16 Dec 2013 23:19:01 +0100 Subject: qemu/videoinit: Set required fields in fake EDID x_resolution, y_resolution and bytes_per_line were not inited. Without them coreboot sweared that screen is 1108630x1142817 and payload tried to draw on such a big screen. Change-Id: I0d0277a20c7e1976c27af4a57651ab2be0f9c5d7 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/4535 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc Reviewed-by: Paul Menzel Reviewed-by: Ronald G. Minnich --- src/drivers/emulation/qemu/bochs.c | 3 +++ src/drivers/emulation/qemu/cirrus.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c index b4acfefcbc..1e7986cc62 100644 --- a/src/drivers/emulation/qemu/bochs.c +++ b/src/drivers/emulation/qemu/bochs.c @@ -106,6 +106,9 @@ static void bochs_init(device_t dev) /* setup coreboot framebuffer */ edid.ha = width; edid.va = height; + edid.x_resolution = width; + edid.y_resolution = height; + edid.bytes_per_line = width * 4; edid.bpp = 32; set_vbe_mode_info_valid(&edid, addr); } diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c index 9f79d31149..b4928fef32 100644 --- a/src/drivers/emulation/qemu/cirrus.c +++ b/src/drivers/emulation/qemu/cirrus.c @@ -330,6 +330,9 @@ static void cirrus_init(device_t dev) struct edid edid; edid.ha = width; edid.va = height; + edid.x_resolution = width; + edid.y_resolution = height; + edid.bytes_per_line = width * 4; edid.bpp = 32; set_vbe_mode_info_valid(&edid, addr); } -- cgit v1.2.3