From owner-freebsd-hackers@freebsd.org Thu Jul 18 14:57:19 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 22659AA5C3 for ; Thu, 18 Jul 2019 14:57:19 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: from mail-yw1-xc2a.google.com (mail-yw1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) (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 C96FC8C0AD for ; Thu, 18 Jul 2019 14:57:17 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: by mail-yw1-xc2a.google.com with SMTP id x67so10940799ywd.3 for ; Thu, 18 Jul 2019 07:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixsystems-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=WOwKaio7tm3JoNR0pd9/Adr5TgMUqbd8rzAICbot5nY=; b=itKx6K64gR2W/6IeCMbJbde/ceedeqiB6rs3czrugQSqzhCcTT5IsLCYC8JT3plx9Q cU5gDhDZ9Z6MS+6V9Xnhkx/Y80o88ITvimo2fsmZd13i2fQf/bWBZIiDjwGhKWwrv9GW bBE/QtEM5U9GioUgBKZjDsLl/+f5Zqlovu2dgHdlMDOKAIm9jNbVac6uIt95RU0jjZhx N9sb2V7d6Y3Zdjwq4sacFnqz64Ukc2GEjczdQKKjNfmTjpbnRQKC/SCILEiqv/iuNCtq QzZi2ooFS4M8Jf+esm4a0lEmLMZU6U9CnWBMtUl7sveRbK03egrtvcs75Kovt4LOX0b7 BkzQ== 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; bh=WOwKaio7tm3JoNR0pd9/Adr5TgMUqbd8rzAICbot5nY=; b=O+bUZety9ETa4w0cOrYRf3yUVmLxxEmUklC7Az20bDaQf/VsrQET2u0QKahNYOaAXS NM5jwCjjoGhdt5wVYP/Ry89tDlLTw1Kfq7+Ya03G9nPukuX6ortSAggM/L2nvt/jucXz zK91c3VyyNb4b2FL4CUffhePO9utfHXqsdCFMxXvcCM9GpuxddNyXdSAFvlxp23paczB 1h0vamXOr+U6g9Z4chQvImk0CD3GuO/Fka8OSGvB+vgXAWLUWGZ2310gAmsP9jxgdp3J ZFGGQPfFd0/a7D7+5fI2krHnMwZ/ohvZbsz1ZCdJIFFpbpjXMiWZCG3yw5YGscC9bhML 8ePw== X-Gm-Message-State: APjAAAWbx+L/pmv+R+vFUDzTjqkOOFtBOgteFVzcpMbC2tkTJStB1gL3 SKebXhSWp0nAA5j7of4wli0eURMqvOMIaVzdDtdHYdJM0BI= X-Google-Smtp-Source: APXvYqzcBpna6npCAP972Fy/Z8OOwIVie6jdfD6S45iNLEIDXBP2CIXIADzsNnoyi//8QYkQ0VxV/foTypDmx1kxINM= X-Received: by 2002:a81:4947:: with SMTP id w68mr29518941ywa.399.1563461836930; Thu, 18 Jul 2019 07:57:16 -0700 (PDT) MIME-Version: 1.0 References: <721ab68d-cde4-41bb-c105-d15cf07903fa@FreeBSD.org> In-Reply-To: From: Ryan Moeller Date: Thu, 18 Jul 2019 10:57:06 -0400 Message-ID: Subject: Re: Resetting console on boot To: "freebsd-hackers@freebsd.org" X-Rspamd-Queue-Id: C96FC8C0AD X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ixsystems-com.20150623.gappssmtp.com header.s=20150623 header.b=itKx6K64; dmarc=pass (policy=none) header.from=ixsystems.com; spf=pass (mx1.freebsd.org: domain of ryan@ixsystems.com designates 2607:f8b0:4864:20::c2a as permitted sender) smtp.mailfrom=ryan@ixsystems.com X-Spamd-Result: default: False [-6.79 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[ixsystems-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-2.82)[ip: (-8.45), ipnet: 2607:f8b0::/32(-3.15), asn: 15169(-2.44), country: US(-0.05)]; DKIM_TRACE(0.00)[ixsystems-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: ALT3.ASPMX.L.GOOGLE.com]; RCVD_IN_DNSWL_NONE(0.00)[a.2.c.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.96)[-0.959,0]; TO_DN_EQ_ADDR_ALL(0.00)[]; DMARC_POLICY_ALLOW(-0.50)[ixsystems.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; 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: Thu, 18 Jul 2019 14:57:19 -0000 Apparently this also could be wanted with vidconsole, as some IPMI console redirection to com1 and serial over lan redirects from the vidconsole. I just discovered this while testing Lev's patches. -Ryan On Tue, Jul 16, 2019 at 11:08 AM Warner Losh wrote: > > > 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 > -- Ryan Moeller iXsystems, Inc. OS Developer Email: ryan@iXsystems.com