Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64/conf XEN3_DOM0: Fix pckbc console attachment ...



details:   https://anonhg.NetBSD.org/src/rev/d906e0010fea
branches:  trunk
changeset: 959982:d906e0010fea
user:      gdt <gdt%NetBSD.org@localhost>
date:      Tue Mar 02 18:10:31 2021 +0000

description:
XEN3_DOM0: Fix pckbc console attachment logic

Copy PCKBD_CNATTACH_MAY_FAIL lines from GENERIC to XEN3_DOM0.

GENERIC defines PCKBD_CNATTACH_MAY_FAIL, which means that an attempt
to activate console input on pckbc will fail if there is no keyboard
present.  This is a problem on semi-modern machines that have pckbc
silicon but not ports, and thus almost always have a USB keyboard
also.  What I suspect are bugs in console attachment logic lead to
attempting to attach a ukbd while there already is a console keyboard,
and with DIAGNOSTIC this is (properly) fatal, so XEN3_DOM0 blows up
with a USB keyboard in current, and probably not in 9.

Live tested on a machine that previously paniced on boot.

diffstat:

 sys/arch/amd64/conf/XEN3_DOM0 |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 1f90b4d172cf -r d906e0010fea sys/arch/amd64/conf/XEN3_DOM0
--- a/sys/arch/amd64/conf/XEN3_DOM0     Tue Mar 02 18:06:12 2021 +0000
+++ b/sys/arch/amd64/conf/XEN3_DOM0     Tue Mar 02 18:10:31 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.188 2021/03/02 18:06:12 gdt Exp $
+# $NetBSD: XEN3_DOM0,v 1.189 2021/03/02 18:10:31 gdt Exp $
 
 # XEN3_DOM0 machine description file
 #
@@ -22,7 +22,7 @@
 #options       UVMHIST_PRINT
 #options       SYSCALL_DEBUG
 
-#ident         "XEN3_DOM0-$Revision: 1.188 $"
+#ident         "XEN3_DOM0-$Revision: 1.189 $"
 
 maxusers       32              # estimated number of users
 
@@ -166,6 +166,8 @@
 options        WSDISPLAY_COMPAT_SYSCONS        # emulate some ioctls
 options        WSDISPLAY_COMPAT_USL            # wsconscfg VT handling
 options        WSDISPLAY_COMPAT_RAWKBD         # can get raw scancodes
+# don't attach pckbd as the console if no PS/2 keyboard is found
+options        PCKBD_CNATTACH_MAY_FAIL
 # see dev/pckbport/wskbdmap_mfii.c for implemented layouts
 #options       PCKBD_LAYOUT="(KB_DE | KB_NODEAD)"
 # allocate a number of virtual screens at autoconfiguration time



Home | Main Index | Thread Index | Old Index