Kernel: Increase PS2 timeout to 300 ms, load PS2 in separate thread

PS/2 seems to hit command timeout sometimes on slow emulation so
increase the timeouts.

Also move PS/2 device initialization to a different thread because
device indentification waits for timeouts.
This commit is contained in:
2025-07-01 18:56:53 +03:00
parent 92e4078287
commit 892e16dfb1
4 changed files with 82 additions and 27 deletions

View File

@@ -27,7 +27,9 @@ namespace Kernel::Input
private:
PS2Controller() = default;
BAN::ErrorOr<void> initialize_impl(uint8_t scancode_set);
BAN::ErrorOr<void> initialize_device(uint8_t, uint8_t scancode_set);
BAN::ErrorOr<void> identify_device(uint8_t, uint8_t scancode_set);
void device_initialize_task(void*);
BAN::ErrorOr<uint8_t> read_byte();
BAN::ErrorOr<void> send_byte(uint16_t port, uint8_t byte);

View File

@@ -22,6 +22,7 @@ namespace Kernel::Input
protected:
PS2Device(PS2Controller&, InputDevice::Type type);
virtual ~PS2Device();
protected:
PS2Controller& m_controller;