initvesa: don't trust the BIOS when it says tty is supported
authorH. Peter Anvin <hpa@zytor.com>
Wed, 13 Sep 2006 04:01:46 +0000 (21:01 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 13 Sep 2006 04:01:46 +0000 (21:01 -0700)
For too many BIOSes, tty output in VESA modes doesn't work in any
useful sense, even if it is claimed.

com32/lib/sys/vesa/initvesa.c

index 8d7ab47..c42a7b3 100644 (file)
@@ -184,7 +184,13 @@ static int vesacon_set_mode(void)
 
   /* Tell syslinux we changed video mode */
   rm.eax.w[0] = 0x0017;                /* Report video mode change */
-  rm.ebx.w[0] = (mi->mode_attr & 4) ? 0x0007 : 0x000F;
+  /* In theory this should be:
+
+     rm.ebx.w[0] = (mi->mode_attr & 4) ? 0x0007 : 0x000f;
+
+     However, that would assume all systems that claim to handle text
+     output in VESA modes actually do that... */
+  rm.ebx.w[0] = 0x000f;
   rm.ecx.w[0] = VIDEO_X_SIZE;
   rm.edx.w[0] = VIDEO_Y_SIZE;
   __intcall(0x22, &rm, NULL);