Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 2023 04:42:48 GMT
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ec671f498043 - main - loader: comconsole: don't unconditionally wipe out hw.uart.console
Message-ID:  <202304140442.33E4gmrp069272@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=ec671f4980437008b0119c6367816083e15fa503

commit ec671f4980437008b0119c6367816083e15fa503
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2023-04-14 04:41:22 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2023-04-14 04:42:03 +0000

    loader: comconsole: don't unconditionally wipe out hw.uart.console
    
    It may be the case that we need to set hw.uart.console manually in some
    scenarios that comconsole can't necessarily support.  Avoid clobbering
    hw.uart.console unless we've actually selected comconsole so that one
    could at least get kernel console output..
    
    Discussed with: imp
    Sponsored by:   Zenith Electronics LLC
    Sponsored by:   Klara, Inc.
---
 stand/i386/libi386/comconsole.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/stand/i386/libi386/comconsole.c b/stand/i386/libi386/comconsole.c
index 3fbb6a292c19..507cd0ec922f 100644
--- a/stand/i386/libi386/comconsole.c
+++ b/stand/i386/libi386/comconsole.c
@@ -338,12 +338,13 @@ comc_setup(int speed, int port)
 	char intbuf[64];
 	int tries;
 
-	unsetenv("hw.uart.console");
 	comc_curspeed = speed;
 	comc_port = port;
 	if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0)
 		return;
 
+	unsetenv("hw.uart.console");
+
 #define	COMC_TEST	0xbb
 	/*
 	 * Write byte to scratch register and read it out.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304140442.33E4gmrp069272>