serenity/Kernel/Storage
Liav A fb7b4caa57 Kernel/Storage: Implement basic AHCI hotplug support
This is really a basic support for AHCI hotplug events, so we know how
to add a node representing the device in /sys/dev/block and removing it
according to the event type (insertion/removal).

This change doesn't take into account what happens if the device was
mounted or a read/write operation is being handled.

For this to work correctly, StorageManagement now uses the Singleton
container, as it might be accessed simultaneously from many CPUs
for hotplug events. DiskPartition holds a WeakPtr instead of a RefPtr,
to allow removal of a StorageDevice object from the heap.
StorageDevices are now stored and being referenced to via an
IntrusiveList to make it easier to remove them on hotplug event.

In future changes, all of the stated above might change, but for now,
this commit represents the least amount of changes to make everything
to work correctly.
2021-09-08 00:42:20 +02:00
..
Partition Kernel/Storage: Implement basic AHCI hotplug support 2021-09-08 00:42:20 +02:00
AHCI.h Kernel/AHCI: Fix shift of 1 2021-06-25 16:27:01 +02:00
AHCIController.cpp Kernel/PCI: Simplify the entire subsystem 2021-09-07 13:47:37 +02:00
AHCIController.h Kernel: Rename PCI::DeviceController => PCI::Device 2021-08-23 01:07:45 +02:00
AHCIPort.cpp Kernel/Storage: Implement basic AHCI hotplug support 2021-09-08 00:42:20 +02:00
AHCIPort.h Kernel/Storage: Implement basic AHCI hotplug support 2021-09-08 00:42:20 +02:00
AHCIPortHandler.cpp Kernel/Interrupts: Return boolean on whether we handled the interrupt 2021-06-17 16:53:25 +02:00
AHCIPortHandler.h Kernel: Move Mutex into Locking/ 2021-08-07 11:48:00 +02:00
ATA.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BMIDEChannel.cpp Kernel: Make UserOrKernelBuffer return KResult from read/write/memset 2021-09-07 13:53:14 +02:00
BMIDEChannel.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
IDEChannel.cpp Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
IDEChannel.h Kernel: Make all Spinlocks use u8 for storage, remove template 2021-09-05 20:46:02 +02:00
IDEController.cpp Kernel/PCI: Simplify the entire subsystem 2021-09-07 13:47:37 +02:00
IDEController.h Kernel: Rename PCI::DeviceController => PCI::Device 2021-08-23 01:07:45 +02:00
PATADiskDevice.cpp Kernel/Devices: Remove required_mode and device_name methods 2021-09-08 00:42:20 +02:00
PATADiskDevice.h Kernel/Devices: Remove required_mode and device_name methods 2021-09-08 00:42:20 +02:00
RamdiskController.cpp Kernel: Make kernel region allocators return KResultOr<NOP<Region>> 2021-09-06 01:55:27 +02:00
RamdiskController.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
RamdiskDevice.cpp Kernel/Devices: Remove required_mode and device_name methods 2021-09-08 00:42:20 +02:00
RamdiskDevice.h Kernel/Devices: Remove required_mode and device_name methods 2021-09-08 00:42:20 +02:00
SATADiskDevice.cpp Kernel/Storage: Implement basic AHCI hotplug support 2021-09-08 00:42:20 +02:00
SATADiskDevice.h Kernel/Storage: Implement basic AHCI hotplug support 2021-09-08 00:42:20 +02:00
StorageController.h Kernel: Rename PCI::DeviceController => PCI::Device 2021-08-23 01:07:45 +02:00
StorageDevice.cpp Kernel: Make Device request creation return KResultOr 2021-09-07 16:42:03 +02:00
StorageDevice.h Kernel/Storage: Implement basic AHCI hotplug support 2021-09-08 00:42:20 +02:00
StorageManagement.cpp Kernel/Storage: Implement basic AHCI hotplug support 2021-09-08 00:42:20 +02:00
StorageManagement.h Kernel/Storage: Implement basic AHCI hotplug support 2021-09-08 00:42:20 +02:00