Expand description
PS/2 Controller Initialization Library
This library provides low-level routines for initializing the PS/2 controller and keyboard on x86 systems. It is intended for use in OS kernels or bootloaders where direct hardware access is required.
§Features
- Remaps the Programmable Interrupt Controller (PIC) to avoid conflicts with CPU exceptions.
- Configures the PS/2 controller and keyboard device, including IRQ unmasking and device enabling.
- Provides safe wrappers for port I/O using inline assembly.
- Logs initialization steps using the
serial_loggingcrate.
§Safety
All hardware access is performed in unsafe blocks. Use with caution and only in appropriate contexts (e.g., kernel mode).
Functions§
- ps2_
init - Initialize the PS/2 controller and keyboard device.