mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 01:32:14 -05:00
Kernel: Call USB Driver initialize functions during init
This commit is contained in:
parent
a0dd6ec6b1
commit
3cead2801a
Notes:
sideshowbarker
2024-07-16 17:12:03 +09:00
Author: https://github.com/Quaker762 Commit: https://github.com/SerenityOS/serenity/commit/3cead2801a Pull-request: https://github.com/SerenityOS/serenity/pull/21090 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/BertalanD Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/kleinesfilmroellchen ✅ Reviewed-by: https://github.com/supercomputer7 ✅
1 changed files with 8 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <Kernel/Boot/Multiboot.h>
|
||||
#include <Kernel/Bus/PCI/Access.h>
|
||||
#include <Kernel/Bus/PCI/Initializer.h>
|
||||
#include <Kernel/Bus/USB/Drivers/USBDriver.h>
|
||||
#include <Kernel/Bus/USB/USBManagement.h>
|
||||
#include <Kernel/Bus/VirtIO/Device.h>
|
||||
#include <Kernel/Bus/VirtIO/Transport/PCIe/Detect.h>
|
||||
|
@ -84,6 +85,9 @@ extern "C" u8 start_of_safemem_atomic_text[];
|
|||
extern "C" u8 end_of_safemem_atomic_text[];
|
||||
#endif
|
||||
|
||||
extern "C" USB::DriverInitFunction driver_init_table_start[];
|
||||
extern "C" USB::DriverInitFunction driver_init_table_end[];
|
||||
|
||||
extern "C" u8 end_of_kernel_image[];
|
||||
|
||||
multiboot_module_entry_t multiboot_copy_boot_modules_array[16];
|
||||
|
@ -417,6 +421,10 @@ void init_stage2(void*)
|
|||
PANIC("VirtualFileSystem::mount_root failed");
|
||||
}
|
||||
|
||||
// Initialise all USB Drivers
|
||||
for (auto* init_function = driver_init_table_start; init_function != driver_init_table_end; init_function++)
|
||||
(*init_function)();
|
||||
|
||||
// Switch out of early boot mode.
|
||||
g_in_early_boot = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue