diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-08 16:35:00 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-08 17:19:46 +0200 |
commit | 5cc09b0245deb89cd909de1ee3d92cf52482975f (patch) | |
tree | 92e1053b03d60c89e8dc1340e02b866062661198 /Kernel/init.cpp | |
parent | bb2be4bb99b24463e529f9dc9e1c925a7666a1f1 (diff) | |
download | serenity-5cc09b0245deb89cd909de1ee3d92cf52482975f.zip |
Kernel: Simplify VMWareBackdoor somewhat
- If there is no VMWare backdoor, don't allocate memory for it.
- Remove the "unsupported" state, instead just don't instantiate.
- Move the command-line parsing from init to the driver.
- Move mouse packet reception from PS2MouseDevice to VMWareBackdoor.
Diffstat (limited to 'Kernel/init.cpp')
-rw-r--r-- | Kernel/init.cpp | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp index 2c46189715..d66b52a114 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -66,10 +66,10 @@ #include <Kernel/RTC.h> #include <Kernel/Random.h> #include <Kernel/Scheduler.h> -#include <Kernel/Tasks/FinalizerTask.h> -#include <Kernel/Tasks/SyncTask.h> #include <Kernel/TTY/PTYMultiplexer.h> #include <Kernel/TTY/VirtualConsole.h> +#include <Kernel/Tasks/FinalizerTask.h> +#include <Kernel/Tasks/SyncTask.h> #include <Kernel/Time/TimeManagement.h> #include <Kernel/VM/MemoryManager.h> @@ -86,7 +86,6 @@ namespace Kernel { [[noreturn]] static void init_stage2(); static void setup_serial_debug(); static void setup_acpi(); -static void setup_vmmouse(); static void setup_pci(); static void setup_interrupts(); static void setup_time_management(); @@ -130,7 +129,6 @@ extern "C" [[noreturn]] void init() new VFS; new KeyboardDevice; new PS2MouseDevice; - setup_vmmouse(); new Console; klog() << "Starting SerenityOS..."; @@ -198,6 +196,7 @@ void init_stage2() new RandomDevice; new PTYMultiplexer; new SB16; + VMWareBackdoor::initialize(); bool dmi_unreliable = kernel_command_line().contains("dmi_unreliable"); if (dmi_unreliable) { @@ -390,24 +389,6 @@ void setup_acpi() hang(); } -void setup_vmmouse() -{ - VMWareBackdoor::initialize(); - if (!kernel_command_line().contains("vmmouse")) { - VMWareBackdoor::the().enable_absolute_vmmouse(); - return; - } - auto vmmouse = kernel_command_line().get("vmmouse"); - if (vmmouse == "off") - return; - if (vmmouse == "on") { - VMWareBackdoor::the().enable_absolute_vmmouse(); - return; - } - klog() << "vmmouse boot argmuent has an invalid value."; - hang(); -} - void setup_pci() { if (!kernel_command_line().contains("pci_mmio")) { |