drivers that attach to it. This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111. The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers. To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.
In theory, this shouldn't cause any behavioural changes in the drivers
concerned. Thy just use rather more function pointers than before. Tested
on i386 and (with a new host driver) acorn32. Compiled on several other
affected architectures.
to only call pckbc_machdep_cnattach() if this is present. This allows
pckbc_machdep_cnattach() to be omitted entirely on most ports, where it only
returns ENXIO anyway.
The devices with this attribute at the moment are pc(4) on i386 and bebox, and
pckbc on sparc, where pckbc_machdep_cnattach() mysteriously returns 0 rather
than ENXIO.
pckbcintr_hard and pckbcintr_soft, which, together, do the same as
pckbcintr. The first is called from the interrupt handler, the second
from a softinterrupt at arbitrary protection level (lower or equal to
IPL_TTY). They pass data via a small ringbuffer.
The new functions are intended for platforms that, due to
hardware/firmware restrictions are not able to make pckbcintr called at
IPL_TTY, like Krups javastations. Using the monolithic pckbcintr on
these plattforms leads to the input handlers for the slot data to be
run at elevated priority, causing various race conditions.
we call the configuration function. Thanks lennard for pointing it out.
XXX: Someone should look this over and make sure that the current strategy
makes sense.
using level triggered interrupts, which livelocks calling intr routine
if the data register is not read in the interrupt routine, as it's case
when polling after interrupts are enabled during boot.
Block all interrupts when polling for keypress, and modify intr routine
to read and store value from data register. The latter one is to avoid
losing a keypress when one would manage to press a key when kernel is
not in spl-guarded code section.
Tested with classic pccons, 'pcconskbd at pckbc' and 'pckbd at pckbc'
configurations, on i386.
tag handy and we are going to need more of it in pckbc_poll_data1() soon,
change pckbc_poll_data1() to accept it as first arg. iot, ioh_d, ioh_c are
no longer passed separately. Use fabricated pckbc tag for calls from
arch/arc/jazz/pckbc_jazzio.c and dev/isa/pckbc_isa.c.
when the system is "warm", i.e. interrupts are not blocked anymore.
This seems to be necessary on my PS/2 Model 70 keyboard - without this,
system ends up in endless loop calling the keyboard intr routine if a key
is pressed when polling. This _may_ be just specific to level-triggered
interrupts PS/2 MCA uses, though it's more likely it's just the way the
particular keyboard controller works.
Discussed on tech-kern@.
0xfe on my gateway 2000 circa 1993). That should not affect broken controllers
that choke on the kbc_auxtest, because for those the write/read test succeeds.
mouse port seem to interpret the "test aux port" (0xa9) command differently,
leading to a non-working keyboard.
Now we try to echo a byte through the aux port by means of the "echo aux"
(0xd3) command, which is what Linux does.
Thanks to Christoph Badura for detailed reports and testing.
from devices connected to pckbc:
- Do actual sample collection in pckbc.
- Add rndsource_element_t to the slot data.
- Change pckbc_set_inputhandler() to take an additional argument,
the name of the device, which is (eventually) passed into
rnd_attach_source() to identify the source.
- Change callers of pckbc_set_inputhander() appropriately.
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.
The old timeout()/untimeout() API has been removed from the kernel.