1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +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 61a385fc01
commit 0379742d7e
4 changed files with 17 additions and 1 deletions

View file

@ -131,6 +131,16 @@ UNMAP_AFTER_INIT bool CommandLine::is_early_boot_console_disabled() const
PANIC("Unknown early_boot_console setting: {}", value);
}
UNMAP_AFTER_INIT bool CommandLine::i8042_enable_first_port_translation() const
{
auto value = lookup("i8042_first_port_translation"sv).value_or("off"sv);
if (value == "off"sv)
return false;
if (value == "on"sv)
return true;
PANIC("Unknown i8042_enable_first_port_translation setting: {}", value);
}
UNMAP_AFTER_INIT I8042PresenceMode CommandLine::i8042_presence_mode() const
{
auto value = lookup("i8042_presence_mode"sv).value_or("auto"sv);