1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

Kernel: Add boot parameter to determine i8042 first port translation

This can be used mainly for bare metal hardware, if the user experiences
problems with output from the PS2 keyboard.
This commit is contained in:
Liav A 2023-04-13 11:06:52 +03:00 committed by Andrew Kaster
parent c8f27d7cb8
commit 475ef6965a
4 changed files with 17 additions and 1 deletions

View file

@ -167,7 +167,8 @@ UNMAP_AFTER_INIT ErrorOr<void> HIDManagement::enumerate()
// Note: If we happen to not have i8042 just return "gracefully" for now.
if (!has_i8042_controller)
return {};
if (auto result_or_error = i8042_controller->detect_devices(I8042Controller::EnableKeyboardFirstPortTranslation::No); result_or_error.is_error())
auto i8042_enable_first_port_translation = kernel_command_line().i8042_enable_first_port_translation() ? I8042Controller::EnableKeyboardFirstPortTranslation::Yes : I8042Controller::EnableKeyboardFirstPortTranslation::No;
if (auto result_or_error = i8042_controller->detect_devices(i8042_enable_first_port_translation); result_or_error.is_error())
return {};
m_hid_serial_io_controllers.with([&](auto& list) {
list.append(i8042_controller);