mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:57:45 +00:00
Kernel/USB: Add a rudimentary interrogation only EHCI driver
This adds a simple EHCI driver that currently only interrogates the device and checks if all ports are addressable via associated legacy controllers (companion controllers), and warns if this is not the case. This also adds a lot of the other data structures needed for actually driving the controller, but these are currently not hooked up to anything. To test this run with `SERENITY_EXTRA_QEMU_ARGS="--device usb-ehci"` or the q35 machine type
This commit is contained in:
parent
a768685d16
commit
f4bfd0468b
6 changed files with 742 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <Kernel/Boot/CommandLine.h>
|
||||
#include <Kernel/Bus/PCI/API.h>
|
||||
#include <Kernel/Bus/PCI/Definitions.h>
|
||||
#include <Kernel/Bus/USB/EHCI/EHCIController.h>
|
||||
#include <Kernel/Bus/USB/UHCI/UHCIController.h>
|
||||
#include <Kernel/Bus/USB/USBManagement.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.h>
|
||||
|
@ -48,7 +49,9 @@ UNMAP_AFTER_INIT void USBManagement::enumerate_controllers()
|
|||
dmesgln("USBManagement: OHCI controller found at {} is not currently supported.", device_identifier.address());
|
||||
return;
|
||||
case EHCI:
|
||||
dmesgln("USBManagement: EHCI controller found at {} is not currently supported.", device_identifier.address());
|
||||
dmesgln("USBManagement: EHCI controller found at {} is currently not fully supported.", device_identifier.address());
|
||||
if (auto ehci_controller_or_error = EHCI::EHCIController::try_to_initialize(device_identifier); !ehci_controller_or_error.is_error())
|
||||
m_controllers.append(ehci_controller_or_error.release_value());
|
||||
return;
|
||||
case xHCI:
|
||||
dmesgln("USBManagement: xHCI controller found at {} is not currently supported.", device_identifier.address());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue