ladybird/Kernel/Devices
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
..
HID Kernel: Make all Spinlocks use u8 for storage, remove template 2021-09-05 20:46:02 +02:00
AsyncDeviceRequest.cpp Kernel: Convert Processor::in_irq() to static current_in_irq() 2021-08-23 00:02:09 +02:00
AsyncDeviceRequest.h Kernel: Remove redundant [[nodiscard]] on KResult return values 2021-09-07 01:18:02 +02:00
BlockDevice.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BlockDevice.h Kernel: Make AsyncDeviceRequest::name() return StringView 2021-08-06 00:37:47 +02:00
CharacterDevice.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CharacterDevice.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Device.cpp Kernel: Rename ScopedSpinlock => SpinlockLocker 2021-08-22 03:34:10 +02:00
Device.h Kernel: Make all Spinlocks use u8 for storage, remove template 2021-09-05 20:46:02 +02:00
FullDevice.cpp Kernel: Standardize the header include style to 'include <Kernel/...>' 2021-07-11 21:37:38 +02:00
FullDevice.h Kernel: Standardize the header include style to 'include <Kernel/...>' 2021-07-11 21:37:38 +02:00
KCOVDevice.cpp Kernel/KCOV: Bring closer to typical SerenityOS coding style 2021-09-06 01:55:27 +02:00
KCOVDevice.h Kernel: Rename Range => VirtualRange 2021-08-06 14:05:58 +02:00
KCOVInstance.cpp Kernel/KCOV: Use TRY() in KCOVInstance::buffer_allocate() 2021-09-06 20:33:35 +02:00
KCOVInstance.h Kernel/KCOV: Bring closer to typical SerenityOS coding style 2021-09-06 01:55:27 +02:00
MemoryDevice.cpp Kernel: Use TRY() in MemoryDevice::mmap() 2021-09-06 20:33:45 +02:00
MemoryDevice.h Kernel: Rename Range => VirtualRange 2021-08-06 14:05:58 +02:00
NullDevice.cpp Everywhere: Replace AK::Singleton => Singleton 2021-08-08 00:03:45 +02:00
NullDevice.h Kernel: Make NullDevice (/dev/null) seekable 2021-08-03 10:36:48 +02:00
PCISerialDevice.cpp Kernel/PCI: Simplify the entire subsystem 2021-09-07 13:47:37 +02:00
PCISerialDevice.h Kernel: Rename PCI::DeviceController => PCI::Device 2021-08-23 01:07:45 +02:00
PCSpeaker.cpp Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
PCSpeaker.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
RandomDevice.cpp Kernel: Convert UserOrKernelBuffer callbacks to use AK::Bytes 2021-09-01 18:06:14 +02:00
RandomDevice.h Kernel: Standardize the header include style to 'include <Kernel/...>' 2021-07-11 21:37:38 +02:00
SB16.cpp Kernel: Make kernel region allocators return KResultOr<NOP<Region>> 2021-09-06 01:55:27 +02:00
SB16.h Kernel: Implement ioctl for the SB16 to change sample rate 2021-08-27 23:35:27 +04:30
SerialDevice.cpp Kernel: Convert UserOrKernelBuffer callbacks to use AK::Bytes 2021-09-01 18:06:14 +02:00
SerialDevice.h Kernel: Make all Spinlocks use u8 for storage, remove template 2021-09-05 20:46:02 +02:00
VMWareBackdoor.cpp Everywhere: Replace AK::Singleton => Singleton 2021-08-08 00:03:45 +02:00
VMWareBackdoor.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ZeroDevice.cpp Kernel: Remove unused header includes in Devices subtree 2021-07-11 21:37:38 +02:00
ZeroDevice.h Kernel: Standardize the header include style to 'include <Kernel/...>' 2021-07-11 21:37:38 +02:00