From owner-svn-src-all@freebsd.org Wed Jun 17 08:08:58 2020 Return-Path: Delivered-To: svn-src-all@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 7B2DF3471F7; Wed, 17 Jun 2020 08:08:58 +0000 (UTC) (envelope-from tsoome@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49myQ22dM5z4SWr; Wed, 17 Jun 2020 08:08:58 +0000 (UTC) (envelope-from tsoome@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 50B521D338; Wed, 17 Jun 2020 08:08:58 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05H88wqh084588; Wed, 17 Jun 2020 08:08:58 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05H88wnK084587; Wed, 17 Jun 2020 08:08:58 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202006170808.05H88wnK084587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 17 Jun 2020 08:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362259 - head/stand/i386/libi386 X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/i386/libi386 X-SVN-Commit-Revision: 362259 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 08:08:58 -0000 Author: tsoome Date: Wed Jun 17 08:08:57 2020 New Revision: 362259 URL: https://svnweb.freebsd.org/changeset/base/362259 Log: loader: vidc_init should also erase the screen Inject \e[J to erase the initial loader screen. We have two options, find where out cursor is and use BIOS scroll for data from boot2 or erase the display and start from origin. Erasing the screen is easier and we also get the screen buffer initialized. Sponsored by: Netflix, Klara Inc. Modified: head/stand/i386/libi386/vidconsole.c Modified: head/stand/i386/libi386/vidconsole.c ============================================================================== --- head/stand/i386/libi386/vidconsole.c Wed Jun 17 07:41:28 2020 (r362258) +++ head/stand/i386/libi386/vidconsole.c Wed Jun 17 08:08:57 2020 (r362259) @@ -709,11 +709,8 @@ vidc_init(int arg) env_setenv("teken.bg_color", EV_VOLATILE, env, vidc_set_colors, env_nounset); - for (int row = 0; row < tp.tp_row; row++) - for (int col = 0; col < tp.tp_col; col++) { - buffer[col + row * tp.tp_col].c = ' '; - buffer[col + row * tp.tp_col].a = *a; - } + /* Erase display, this will also fill our screen buffer. */ + teken_input(&teken, "\e[J", 3); for (int i = 0; i < 10 && vidc_ischar(); i++) (void) vidc_getchar();