From owner-freebsd-hackers@freebsd.org Tue Jul 16 15:08:21 2019 Return-Path: Delivered-To: freebsd-hackers@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 40131B1D5E for ; Tue, 16 Jul 2019 15:08:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4AF4D88FD6 for ; Tue, 16 Jul 2019 15:08:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x733.google.com with SMTP id 201so14825496qkm.9 for ; Tue, 16 Jul 2019 08:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KrYwM5M7s3rGSrIeyA/oyqe7uQq7X0AlbsKpOamJ/Xo=; b=oLykKSIt9Nj+f05Ot8nztsW3rkHKmE2TZTKQzCn5m2nxRelOdjE8o33CrYr5ML+Y/S kvQFtFKabXll3Mlqn4pSjY6z4DyuMgclGHwPo+wTIeLOGKRDT5ZFjRh7n8IS2T0G2Tz8 GJByMmFItcNrabkOFCpYF3UZ5YtaXwoUqiifDixvVg1N0ncW7UT6sVwFwQI8og2p+IdV CcQd+aXMJEXyKKlpfViwDIzK8BEI1FP68tWFjytJPaY6Xq8aIGZYMXyAkeHLwZ2P7Yfl 9hEs8sMTABIeniaGFoN+YKkZQf/r6Wuqkisdyb1LF8OPYiSn+tUttSeqzLJffDA3coLg 7nJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KrYwM5M7s3rGSrIeyA/oyqe7uQq7X0AlbsKpOamJ/Xo=; b=K6lVw58a6u5UMtH0qfa0IS9i7G4oNq9Y6MYvnylrYr4CmsUZckMIRdyuGZQR+teqzj rDvQWL+MussiCewiBhMPe/W9WK8V6JOahE00iyBVkGDQiCs89c5YOwxC5glSv3lrgEF7 z+ZfvRYcw1LMGi85HgopGpPmBZ9e7AQpncZnqBLA4kE2Vz8bRuK+GVFm7u98GDGTLIFZ RvApF95NIM2KdrOG69W7iKQKGUOC4W8Xk+AbKa5cPvWxmDftG9hfB3ZgWpskBIO4S/dU J4CF8Yj61R2YRvuUXSfmYBeDf5PXFXWbrTBaudK6rz0JgDyFQ/iFqkOSorsuyuanqDzo jUxw== X-Gm-Message-State: APjAAAVnpWpkOKFYH4kZ/ATSP4knNj7KCnUzWnAAp6bFNk00FXgB8Gwy zLoxwgib/OkyH0Sn7ekYUDYdUqHbYjQBzZa/pCY= X-Google-Smtp-Source: APXvYqxa3JL018pj+7YIzhfadKGM78GlYDpU89fM61lVoGSwx6zA+uBUZKWNWIkAdH2xklyCgQzGNFUX8nKrN0Zolg8= X-Received: by 2002:a05:620a:1017:: with SMTP id z23mr22512681qkj.60.1563289698260; Tue, 16 Jul 2019 08:08:18 -0700 (PDT) MIME-Version: 1.0 References: <721ab68d-cde4-41bb-c105-d15cf07903fa@FreeBSD.org> In-Reply-To: <721ab68d-cde4-41bb-c105-d15cf07903fa@FreeBSD.org> From: Warner Losh Date: Tue, 16 Jul 2019 09:08:06 -0600 Message-ID: Subject: Re: Resetting console on boot To: Lev Serebryakov Cc: Ryan Moeller , "freebsd-hackers@freebsd.org" X-Rspamd-Queue-Id: 4AF4D88FD6 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=oLykKSIt X-Spamd-Result: default: False [-5.62 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.96)[-0.958,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[3.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.65)[-0.645,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; IP_SCORE(-3.01)[ip: (-9.37), ipnet: 2607:f8b0::/32(-3.17), asn: 15169(-2.45), country: US(-0.06)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 15:08:21 -0000 On Tue, Jul 16, 2019 at 4:55 AM Lev Serebryakov wrote: > On 15.07.2019 23:29, Ryan Moeller wrote: > > > What do people think about having an early boot stage send some escape > > sequence to reset terminals to some sane default terminal settings? Often > > firmware or other causes will leave an unreadable font color or break > line > > feeds, and the terminal tends to stay that way until a shell clears and > > resets the screen. If a shell can do it, surely loader could do it (or > even > > earlier, if it is not too complex). To my knowledge it should be just a > > matter of printing some escape codes before starting the normal boot > menus > > when using a serial console. I believe this is already done when the > > console is set to vidconsole or efi. > > > > Thoughts? Suggestions? > > I've proposed this long ago for serial terminals: > > https://reviews.freebsd.org/D17102 > https://reviews.freebsd.org/D17103 > > I have hardware which sets "black on black" before passing control to OS. > That would work for the BIOS case, but not the UEFI case, which is where I see the biggest issues. Warner