1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00
serenity/Kernel/Bus/USB
Liav A 25ea7461a0 Kernel/PCI: Simplify the entire subsystem
A couple of things were changed:
1. Semantic changes - PCI segments are now called PCI domains, to better
match what they are really. It's also the name that Linux gave, and it
seems that Wikipedia also uses this name.
We also remove PCI::ChangeableAddress, because it was used in the past
but now it's no longer being used.
2. There are no WindowedMMIOAccess or MMIOAccess classes anymore, as
they made a bunch of unnecessary complexity. Instead, Windowed access is
removed entirely (this was tested, but never was benchmarked), so we are
left with IO access and memory access options. The memory access option
is essentially mapping the PCI bus (from the chosen PCI domain), to
virtual memory as-is. This means that unless needed, at any time, there
is only one PCI bus being mapped, and this is changed if access to
another PCI bus in the same PCI domain is needed. For now, we don't
support mapping of different PCI buses from different PCI domains at the
same time, because basically it's still a non-issue for most machines
out there.
2. OOM-safety is increased, especially when constructing the Access
object. It means that we pre-allocating any needed resources, and we try
to find PCI domains (if requested to initialize memory access) after we
attempt to construct the Access object, so it's possible to fail at this
point "gracefully".
3. All PCI API functions are now separated into a different header file,
which means only "clients" of the PCI subsystem API will need to include
that header file.
4. Functional changes - we only allow now to enumerate the bus after
a hardware scan. This means that the old method "enumerate_hardware"
is removed, so, when initializing an Access object, the initializing
function must call rescan on it to force it to find devices. This makes
it possible to fail rescan, and also to defer it after construction from
both OOM-safety terms and hotplug capabilities.
2021-09-07 13:47:37 +02:00
..
UHCI Kernel/PCI: Simplify the entire subsystem 2021-09-07 13:47:37 +02:00
PacketTypes.h Kernel/USB: Move the USB components as a subfolder to the Bus directory 2021-07-02 13:16:12 +02:00
SysFSUSB.cpp Kernel: Make SysFS and ProcFS generator functions return KResult 2021-09-06 18:56:51 +02:00
SysFSUSB.h Kernel: Make SysFS and ProcFS generator functions return KResult 2021-09-06 18:56:51 +02:00
USBClasses.h Kernel/USB: Add header containing all the current USB classes 2021-08-14 21:22:44 +02:00
USBConstants.h Kernel/USB: Add Hubs and the UHCI Root Hub 2021-08-14 21:22:44 +02:00
USBController.cpp Kernel/USB: Create controller base class and introduce USBManagement 2021-08-09 21:05:25 +02:00
USBController.h AK+Kernel: Move KResult.h to Kernel/API for userspace access 2021-09-05 12:54:48 +02:00
USBDescriptors.h Kernel/USB: Add Hubs and the UHCI Root Hub 2021-08-14 21:22:44 +02:00
USBDevice.cpp Kernel/USB: Use TRY() and adopt_nonnull_own_or_enomem() some more 2021-09-06 13:06:05 +02:00
USBDevice.h Kernel/USB: Replace PortNumber enum with a raw u8 2021-08-14 21:22:44 +02:00
USBEndpoint.h Kernel/USB: Use "Pipe" instead of "USBPipe" in USBEndpoint 2021-08-14 21:22:44 +02:00
USBHub.cpp Kernel: Use TRY() some more in USB::Hub 2021-09-06 01:55:27 +02:00
USBHub.h Kernel: Use TRY() some more in USB::Hub 2021-09-06 01:55:27 +02:00
USBManagement.cpp Kernel/PCI: Simplify the entire subsystem 2021-09-07 13:47:37 +02:00
USBManagement.h Kernel/USB: Create controller base class and introduce USBManagement 2021-08-09 21:05:25 +02:00
USBPipe.cpp Kernel/USB: Use TRY() and adopt_nonnull_own_or_enomem() some more 2021-09-06 13:06:05 +02:00
USBPipe.h Kernel/USB: Create controller base class and introduce USBManagement 2021-08-09 21:05:25 +02:00
USBRequest.h Kernel/USB: Add all USB 2.0 bmRequestType fields 2021-08-14 21:22:44 +02:00
USBTransfer.cpp Kernel: Make kernel region allocators return KResultOr<NOP<Region>> 2021-09-06 01:55:27 +02:00
USBTransfer.h Kernel/USB: Tidy up USB::Transfer construction 2021-09-06 01:55:27 +02:00