On 09/03/17(Thu) 14:48, Mark Kettenis wrote: > > Date: Thu, 9 Mar 2017 14:04:04 +0100 > > From: Martin Pieuchot <m...@openbsd.org> > > > > Many of us have x86 machines with a USB keyboard that's unusable in > > ddb(4). That's generally because the BIOS presents a fake pckbd(4) > > to the OS: > > > > pckbc0 at isa0 port 0x60/5 irq 1 irq 12 > > pckbd0 at pckbc0 (kbd slot) > > wskbd0 at pckbd0: console keyboard, using wsdisplay0 > > > > Some BIOSes allow you to disable this emulation. While this might > > allow you to have a working USB keyboard in ddb(4) it generally means > > you lose input in the bootloader. > > > > So the diff below introduces a new sysctl(3) to work around this problem. > > Adding the following line in your /etc/sysctl.conf will force your first > > USB keyboard to re-attach itself after cold boot and become the default > > console keyboard. That means you now have a working keyboard in ddb(4)! > > > > sysctl machdep.fakepckbc=1 > > > > I hope this will improve the content of bug reports. > > Can't you already achieve this by disabling pckbc(4) in the kernel > config? So something like this: > > # config -ef /bsd > ... > ukc> disable pckbc > 250 pckbc0 disabled > ukc> quit
This doesn't work. The reason is that pckbc_cnattach() doesn't care about the value of ``cf_fstate''. We could fix that of course but I see two downside: First we want "boot bsd -c" and early ddb(4) to work. At least until the *hci(4) driver did its handshake with the BIOS we want a pckbc input console. Second downside is this one: > Only downside is that it doesn't stick. If you install a new kernel > you need to repeat the excercise. This is only good for development, not for users having an unexpected panic.