From owner-svn-src-head@freebsd.org Thu Nov 28 05:40:16 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 442A81C5526; Thu, 28 Nov 2019 05:40:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Nmgh0SQ9z45Vc; Thu, 28 Nov 2019 05:40:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3AA321231; Thu, 28 Nov 2019 05:40:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAS5eF7h036790; Thu, 28 Nov 2019 05:40:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAS5eFm3036789; Thu, 28 Nov 2019 05:40:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201911280540.xAS5eFm3036789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 28 Nov 2019 05:40:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355168 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 355168 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 05:40:16 -0000 Author: imp Date: Thu Nov 28 05:40:15 2019 New Revision: 355168 URL: https://svnweb.freebsd.org/changeset/base/355168 Log: Also turn of teken for RB_MULTIPLE RB_MULTIPLE without RB_SERIAL set is valid, and means 'Video first, then serial' to the kernel (so kernel messages go to both, but /etc/rc uses video console (this should be fixed, btw, but another day)). Check for RB_MULTIPLE as well as RB_SERIAL where we want to to serial things. This means we'll use the old code for emulation in these situations, which is likely best since we're outputing to both and the old code is ligher weight allowing both to keep up w/o weird scrolling things. Modified: head/stand/efi/libefi/efi_console.c Modified: head/stand/efi/libefi/efi_console.c ============================================================================== --- head/stand/efi/libefi/efi_console.c Thu Nov 28 05:40:10 2019 (r355167) +++ head/stand/efi/libefi/efi_console.c Thu Nov 28 05:40:15 2019 (r355168) @@ -824,9 +824,13 @@ efi_cons_update_mode(void) * terminal emulator for efi text mode to support the menu. * While teken is too expensive to be used on serial console, the * pre-teken emulator is light enough to be used on serial console. + * + * When doing multiple consoles (both serial and video), + * also just use the old emulator. RB_MULTIPLE also implies + * we're using a serial console. */ mode = parse_uefi_con_out(); - if ((mode & RB_SERIAL) == 0) { + if ((mode & (RB_SERIAL | RB_MULTIPLE)) == 0) { if (buffer != NULL) { if (tp.tp_row == rows && tp.tp_col == cols) return (true); @@ -998,7 +1002,11 @@ efi_cons_putchar(int c) { unsigned char ch = c; - if ((mode & RB_SERIAL) != 0) { + /* + * Don't use Teken when we're doing pure serial, or a multiple console + * with video "primary" because that's also serial. + */ + if ((mode & (RB_SERIAL | RB_MULTIPLE)) != 0) { input_byte(ch); return; }