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@gmail.com> Reviewed-on: http://review.coreboot.org/10239 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
38cf94b250
commit
428130e839
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue