OpenSolaris

Printable Version Enter a New Search
Bug ID 6812677
Synopsis debug kernels trip over an assertion when pressing a key on a ps/2 keyboard
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:boot
Keywords
Responsible Engineer Jan Setje-eilers
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_111
Fixed In snv_111
Release Fixed solaris_nevada(snv_111)
Related Bugs 6810939 , 6813117 , 6816281 , 6819284 , 6834260
Submit Date 3-March-2009
Last Update Date 25-March-2009
Description
On debug kernels, hitting a key on a ps/2 keyboard will cause the system to trip
over an assertion:

panic[cpu1]/thread=c867fdc0: assertion failed: !servicing_interrupt(), file: ../../common/os/driver_lyr.c, line: 1518

c867fc6c genunix:assfail+5a (feb2e9b0, feb2ee44,)
c867fc9c genunix:ldi_ident_from_dev+82 (1940000, c867fcc0, )
c867fccc kb8042:kb8042_received_byte+c2 (fed3ce60, 22)
c867fcfc kb8042:kb8042_intr+64 (fed3ce60, 0, 1, 0)
c867fd3c i8042:i8042_intr+152 (c7e9aac0, 0, c7e9aa)
c867fd8c unix:av_dispatch_autovect+70 (1, 0, 0, 282)
c867fdac unix:dispatch_hardint+1a (1, 0)
Work Around
Boot -kd and set aok to 1.
Comments
The kb8042_received_byte() code runs in interrupt context, so tripping 
over the assertion in the ldi code make sense. While this does work 
with non-debug bits, it's clearly not safe. While the code in kb8042 
was an attempt to allow switching without requiring kbtrans to be 
present, it doesn't really matter as a ps/2 keyboarded system will 
still be in interrupt context when in kbtrans. 
 
The fix is to spawn another thread to do the work. I also pulled the 
code out of the kb8042 driver as while it's minor optimization for 
some cases, the single code-path is cleaner.