1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +00:00

Kernel: Make i8042 controller initialization sequence more robust

The setting of scan code set sequence is removed, as it's buggy and
could lead the controller to fail immediately when doing self-test
afterwards. We will restore it when we understand how to do so safely.

Allow the user to determine a preferred detection path with a new kernel
command line argument. The defualt option is to check i8042 presence
with an ACPI check and if necessary - an "aggressive" test to determine
i8042 existence in the system.
Also, keep the i8042 controller pointer on the stack, so don't assign
m_i8042_controller member pointer if it does not exist.
This commit is contained in:
Liav A 2022-12-22 03:46:22 +02:00 committed by Jelle Raaijmakers
parent fc5bcd8476
commit 0f7cc468b2
6 changed files with 62 additions and 34 deletions

View file

@ -28,9 +28,7 @@ List of options:
during the boot sequence. Leaving only the AHCI and Ram Disk controllers.
* **`disable_physical_storage`** - If present on the command line, neither AHCI, or IDE controllers will be initialized on boot.
* **`disable_ps2_controller`** - If present on the command line, the I8042 keyboard controller will not be initialized on boot.
* **`disable_uhci_controller`** - If present on the command line, the UHCI controller will not be initialized on boot.
* **`disable_virtio`** - If present on the command line, virtio devices will not be detected, and initialized on boot.
@ -61,6 +59,12 @@ has set up before booting the Kernel, don't initialize any driver.
* **`init_args`** - This parameter expects a set of arguments to pass to the **`init`** program.
The value should be a set of strings separated by `,` characters.
* **`i8042_presence_mode`** - This parameter expects one of the following values:
**`aggressive-test`** - The i8042 initialization sequence should only try an aggressive presence test.
**`auto`** - The i8042 initialization sequence should try to check if ACPI says i8042 exists, and if not an aggressive presence test should take place to determine presence.
**`none`** - Assume there's no i8042 controller in the system.
**`force`** - Assume there's i8042 controller in the system.
* **`panic`** - This parameter expects **`halt`** or **`shutdown`**. This is particularly useful in CI contexts.
* **`pci`** - This parameter expects **`ecam`**, **`io`** or **`none`**. When selecting **`none`**