[coreboot-gerrit] New patch to review for coreboot: 03bb028 nehalem native gfx init: Adjust state to be compatible with OPROM.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Tue May 19 09:48:32 CEST 2015


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10239

-gerrit

commit 03bb028a433976b6a5d77c64ac3b67d22a43e8c3
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Tue May 19 09:45:22 2015 +0200

    nehalem native gfx init: Adjust state to be compatible with OPROM.
    
    My main payload is GRUB and I load SeaBIOS as secondary payload when for some
    reason I want to boot windows. In this scenario SeaBIOS runs VGA oprom
    (SeaVGABIOS is not good enough with intel gfx). VGA oprom expects either
    completely uninited gfx or some special state in gmbus and software scratch
    registers. Provide this state.
    
    The only alternative without this patch for such usecase is to use oprom and
    I'd like to avoid doing so when going my main boot path to GNU/Linux.
    
    Change-Id: Ic157a6a580d7a5048ac28155e0d6b3433bbd1f2c
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 src/northbridge/intel/nehalem/gma.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/northbridge/intel/nehalem/gma.c b/src/northbridge/intel/nehalem/gma.c
index 9fc4bd4..7d24bd5 100644
--- a/src/northbridge/intel/nehalem/gma.c
+++ b/src/northbridge/intel/nehalem/gma.c
@@ -700,6 +700,7 @@ static void intel_gma_init(const struct northbridge_intel_nehalem_config *info,
 	power_port(mmio);
 
 	intel_gmbus_read_edid(mmio + PCH_GMBUS0, 3, 0x50, edid_data, 128);
+	intel_gmbus_stop(mmio + PCH_GMBUS0);
 	decode_edid(edid_data,
 		    sizeof(edid_data), &edid);
 
@@ -721,9 +722,8 @@ static void intel_gma_init(const struct northbridge_intel_nehalem_config *info,
 
 	target_frequency = info->gfx.lvds_dual_channel ? edid.pixel_clock
 		: (2 * edid.pixel_clock);
-#if !IS_ENABLED(CONFIG_FRAMEBUFFER_KEEP_VESA_MODE)
 	vga_textmode_init();
-#else
+#if IS_ENABLED(CONFIG_FRAMEBUFFER_KEEP_VESA_MODE)
 	vga_sr_write(1, 1);
 	vga_sr_write(0x2, 0xf);
 	vga_sr_write(0x3, 0x0);
@@ -982,6 +982,11 @@ static void intel_gma_init(const struct northbridge_intel_nehalem_config *info,
 	write32(mmio + DEIIR, 0xffffffff);
 	write32(mmio + SDEIIR, 0xffffffff);
 
+	/* Doesn't change any hw behaviour but vga oprom expects it there. */
+	write32(mmio + 0x0004f040, 0x01000008);
+	write32(mmio + 0x0004f04c, 0x7f7f0000);
+	write32(mmio + 0x0004f054, 0x0000020d);
+
 #if IS_ENABLED(CONFIG_FRAMEBUFFER_KEEP_VESA_MODE)
 	memset ((void *) lfb, 0, edid.x_resolution * edid.y_resolution * 4);
 	set_vbe_mode_info_valid(&edid, lfb);



More information about the coreboot-gerrit mailing list