serenity/Kernel/Arch
Liav A bfffe88de5 Kernel/HID: Untie the PS2 protocol, i8042 hardware and generic devices
For a very long time, the kernel had only support for basic PS/2 devices
such as the PS2 AT keyboard and regular PS2 mouse (with a scroll wheel).

To adapt to this, we had very simple abstractions in place, essentially,
the PS2 devices were registered as IRQ handlers (IRQ 1 and 12), and when
an interrupt was triggered, we simply had to tell the I8042Controller to
fetch a byte for us, then send it back to the appropriate device for
further processing and queueing of either a key event, or a mouse packet
so userspace can do something meaningful about it.

When we added the VMWare mouse integration feature it was easily adapted
to this paradigm, requiring small changes across the handling code for
these devices.

This patch is a major cleanup for any future advancements in the HID
subsystem.
It ensures we do things in a much more sane manner:
- We stop using LockRefPtrs. Currently, after the initialization of the
  i8042 controller, we never have to change RefPtrs in that class, as we
  simply don't support PS2 hotplugging currently.
  Also, we remove the unnecessary getters for keyboard and mouse devices
  which also returned a LockRefPtr.
- There's a clear separation between PS2 devices and the actual device
  nodes that normally exist in /dev. PS2 devices are not polled, because
  when the user uses these devices, they will trigger an IRQ which when
  is handled, could produce either a MousePacket or KeyEvent, depending
  on the device state.
  The separation is crucial for buses that are polled, for example - USB
  is a polled bus and will not generate an IRQ for HID devices.
- There's a clear separation in roles of each structure. The PS2 devices
  which are attached to a I8042Controller object are managing the device
  state, while the generic MouseDevice and KeyboardDevice manage all
  related tasks of a CharacterDevice, as well as interpreting scan code
  events and mouse relative/absolute coordinates.
2023-04-09 18:11:37 +02:00
..
aarch64 Kernel: Fix compilation of aarch64/RPi/Framebuffer.cpp 2023-04-08 19:16:35 -07:00
x86_64 Kernel/HID: Untie the PS2 protocol, i8042 hardware and generic devices 2023-04-09 18:11:37 +02:00
CPU.h Kernel: Reorganize Arch/x86 directory to Arch/x86_64 after i686 removal 2022-12-28 11:53:41 +01:00
CurrentTime.h Kernel: Abstract platform-specific current time methods from Scheduler 2022-10-14 14:13:51 +02:00
DebugOutput.h Kernel: Abstract platform-specific serial port access from kprintf 2022-09-20 18:43:05 +01:00
DeferredCallEntry.h Kernel: Extract DeferredCallEntry from Arch/Processor.h 2021-12-11 13:23:27 -08:00
DeferredCallPool.cpp Kernel: Move deferred call code into separate DeferredCallPool class 2023-04-03 20:01:28 -06:00
DeferredCallPool.h Kernel: Move deferred call code into separate DeferredCallPool class 2023-04-03 20:01:28 -06:00
Delay.h Kernel: Move IO delay code to x86 architecture subdirectory 2022-09-20 18:43:05 +01:00
init.cpp Kernel: Remove redundant HID name from all associated files 2023-04-09 18:11:37 +02:00
InterruptManagement.h Kernel: Reorganize Arch/x86 directory to Arch/x86_64 after i686 removal 2022-12-28 11:53:41 +01:00
Interrupts.h Kernel: Reorganize Arch/x86 directory to Arch/x86_64 after i686 removal 2022-12-28 11:53:41 +01:00
IRQController.h Kernel: Reorganize Arch/x86 directory to Arch/x86_64 after i686 removal 2022-12-28 11:53:41 +01:00
mcontext.h Kernel+Userland: Remove uses of the __i386__ compiler macro 2022-12-28 11:53:41 +01:00
PageDirectory.h Kernel: Reorganize Arch/x86 directory to Arch/x86_64 after i686 removal 2022-12-28 11:53:41 +01:00
PageFault.cpp Kernel: Remove heuristics for detecting malformed malloc memory access 2023-03-01 19:36:53 -07:00
PageFault.h Kernel/aarch64: Handle instruction aborts 2023-02-08 18:19:48 +00:00
Processor.cpp Kernel: Add enum InterruptsState and helper functions 2022-08-26 12:51:57 +02:00
Processor.h Kernel: Reorganize Arch/x86 directory to Arch/x86_64 after i686 removal 2022-12-28 11:53:41 +01:00
ProcessorSpecificDataID.h Kernel: Extract ProcessorSpecificDataID from from Arch/Processor.h 2021-12-11 13:23:27 -08:00
RegisterState.h Kernel: Reorganize Arch/x86 directory to Arch/x86_64 after i686 removal 2022-12-28 11:53:41 +01:00
SafeMem.h Everywhere: Fix order of includes and #pragma once 2022-09-18 18:30:05 -07:00
SmapDisabler.h
ThreadRegisters.h Kernel: Move ThreadRegisters into arch-specific directory 2022-12-29 19:32:20 -07:00
TrapFrame.h Kernel: Reorganize Arch/x86 directory to Arch/x86_64 after i686 removal 2022-12-28 11:53:41 +01:00