Skip to content

Commit 6da09e3

Browse files
committed
Restore keyboard/screen console broken in revision 1.16
Previous change caused com0 to be set as default console instead of pc, leading to a confusing black screen on kernel start.
1 parent c673477 commit 6da09e3

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

sys/arch/i386/stand/efiboot/eficons.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: eficons.c,v 1.17 2025/10/14 07:16:18 skrll Exp $ */
1+
/* $NetBSD: eficons.c,v 1.18 2025/10/15 13:16:58 manu Exp $ */
22

33
/*-
44
* Copyright (c) 2016 Kimihiro Nonaka <nonaka@netbsd.org>
@@ -141,6 +141,7 @@ efi_consinit(int dev, int ioport, int unit, int speed, bool switchcons)
141141
awaitkey(7, 0))
142142
goto ok;
143143
}
144+
goto nocom;
144145
ok:
145146
break;
146147

@@ -165,7 +166,7 @@ efi_consinit(int dev, int ioport, int unit, int speed, bool switchcons)
165166
case CONSDEV_COM0KBD:
166167
case CONSDEV_COM1KBD:
167168
case CONSDEV_COM2KBD:
168-
case CONSDEV_COM3KBD: /* XXXmanu */
169+
case CONSDEV_COM3KBD:
169170
consname = "com";
170171
btinfo_console.addr = getcomaddr(unit);
171172

@@ -201,10 +202,10 @@ efi_consinit(int dev, int ioport, int unit, int speed, bool switchcons)
201202
break;
202203
internal_putchar = efi_cons_putc;
203204
kbd:
204-
consname = "com";
205205
if (!switchcons)
206206
break;
207-
com_unit = unit;
207+
if (unit != -1)
208+
com_unit = unit;
208209
internal_getchar = efi_cons_getc;
209210
internal_iskey = efi_cons_iskey;
210211
internal_waitforinputevent = efi_cons_waitforinputevent;

0 commit comments

Comments
 (0)