serenity
serenity copied to clipboard
Kernel/SerialIO: Introduce basic PS2 core for device detection
Instead of hardcoding initialization paths in the i8042 controller code, we could just have very abstracted basic PS2 core for detecting devices on PS2 controllers, with no ties to the i8042 code (or any other future implementation).
Each device driver has a responsibility for detecting if it supports the given PS2DeviceType value, and if that's the case it should continue with the initialization sequence, which might have specific details to handle per device. To ensure this can be done safely, a new abstraction layer was added for PS2Controller objects - now the PS2 core code can acquire spinlocks for specific PS2 ports and initiate PS2 commands while holding a lock on that port, ensuring that assumptions based on results from a previous command result are actually valid during an initialization sequence.
Relies on #18654 and therefore this is a draft.
Putting a reminder from https://github.com/SerenityOS/serenity/pull/18654#discussion_r1193205709 to remove stale includes here.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!