From: Laszlo Ersek Date: Thu, 14 Feb 2013 04:43:32 +0000 (+0100) Subject: Enable VGA output when setting Cirrus-specific mode X-Git-Tag: rel-1.7.3~83 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2eeafbf587b3c4b4f250a725dd74570fb4b361d2;p=seabios.git Enable VGA output when setting Cirrus-specific mode This patch does the same for Cirrus as David's following patch for bochs, originally posted under : Enable VGA output when settings bochs-specific mode When used from OVMF+CSM, we got no video output. It appears that we were never enabling the display output except when configuring a text mode. Which never happens, in the OVMF+CSM case. In my testing on RHEL-6.3 with OVMF -D CSM_ENABLE / CONFIG_CSM bios.bin / CONFIG_QEMU vgabios.bin, using Cirrus, VESA mode 0x115 is selected (Direct Color, 800x600x24). According to , cirrus_switch_mode() stdvga_attr_mask() currently keeps/sets the "Attribute Controller Graphics Enable" bit set in the "Attribute Mode Control Register". When invoked from OVMF+CSM, that is not enough however, so let's do the same as for Bochs: stdvga_attrindex_write(0x20); which corresponds to setting the "Palette Address Source" bit in the "Attribute Address Register": "This bit is set to 0 to load color values to the registers in the internal palette. It is set to 1 for normal operation of the attribute controller. [...]" clext_set_mode() stdvga_set_mode() -- for regular modes stdvga_attrindex_write() -- existing call cirrus_switch_mode() -- for Cirrus modes stdvga_attrindex_write() -- call added by this patch Signed-off-by: Laszlo Ersek Signed-off-by: David Woodhouse --- diff --git a/vgasrc/clext.c b/vgasrc/clext.c index dd45df3..d02b880 100644 --- a/vgasrc/clext.c +++ b/vgasrc/clext.c @@ -433,6 +433,7 @@ cirrus_switch_mode(struct cirrus_mode_s *table) else if (memmodel != MM_TEXT) on = 0x01; stdvga_attr_mask(0x10, 0x01, on); + stdvga_attrindex_write(0x20); } static void