mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 13:32:45 +00:00 
			
		
		
		
	Revert "Revert "Kernel/Storage: Remove the ramdisk implementation""
This reverts commit 187723776a.
This was reverted because it was needed until the aarch64 port
got an SD card driver
Co-authored-by: Ollrogge <nils-ollrogge@outlook.de>
			
			
This commit is contained in:
		
							parent
							
								
									d09852642c
								
							
						
					
					
						commit
						36c5afdfb2
					
				
					 9 changed files with 0 additions and 232 deletions
				
			
		|  | @ -28,7 +28,6 @@ | |||
| #include <Kernel/Storage/ATA/AHCI/Controller.h> | ||||
| #include <Kernel/Storage/ATA/GenericIDE/Controller.h> | ||||
| #include <Kernel/Storage/NVMe/NVMeController.h> | ||||
| #include <Kernel/Storage/Ramdisk/Controller.h> | ||||
| #include <Kernel/Storage/SD/SDHostController.h> | ||||
| #include <Kernel/Storage/StorageManagement.h> | ||||
| #include <LibPartition/EBRPartitionTable.h> | ||||
|  | @ -53,7 +52,6 @@ static constexpr StringView block_device_prefix = "block"sv; | |||
| 
 | ||||
| static constexpr StringView ata_device_prefix = "ata"sv; | ||||
| static constexpr StringView nvme_device_prefix = "nvme"sv; | ||||
| static constexpr StringView ramdisk_device_prefix = "ramdisk"sv; | ||||
| static constexpr StringView logical_unit_number_device_prefix = "lun"sv; | ||||
| 
 | ||||
| UNMAP_AFTER_INIT StorageManagement::StorageManagement() | ||||
|  | @ -304,13 +302,6 @@ UNMAP_AFTER_INIT void StorageManagement::determine_nvme_boot_device() | |||
|     }); | ||||
| } | ||||
| 
 | ||||
| UNMAP_AFTER_INIT void StorageManagement::determine_ramdisk_boot_device() | ||||
| { | ||||
|     determine_hardware_relative_boot_device(ramdisk_device_prefix, [](StorageDevice const& device) -> bool { | ||||
|         return device.command_set() == StorageDevice::CommandSet::PlainMemory; | ||||
|     }); | ||||
| } | ||||
| 
 | ||||
| UNMAP_AFTER_INIT void StorageManagement::determine_block_boot_device() | ||||
| { | ||||
|     VERIFY(m_boot_argument.starts_with(block_device_prefix)); | ||||
|  | @ -370,11 +361,6 @@ UNMAP_AFTER_INIT void StorageManagement::determine_boot_device() | |||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (m_boot_argument.starts_with(ramdisk_device_prefix)) { | ||||
|         determine_ramdisk_boot_device(); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (m_boot_argument.starts_with(nvme_device_prefix)) { | ||||
|         determine_nvme_boot_device(); | ||||
|         return; | ||||
|  | @ -468,14 +454,6 @@ UNMAP_AFTER_INIT void StorageManagement::initialize(StringView root_device, bool | |||
|     } | ||||
| #endif | ||||
| 
 | ||||
|     // Note: Whether PCI bus is present on the system or not, always try to attach
 | ||||
|     // a given ramdisk.
 | ||||
|     auto controller = RamdiskController::try_initialize(); | ||||
|     if (controller.is_error()) { | ||||
|         dmesgln("Unable to initialize RAM controller: {}", controller.error()); | ||||
|     } else { | ||||
|         m_controllers.append(controller.release_value()); | ||||
|     } | ||||
|     enumerate_storage_devices(); | ||||
|     enumerate_disk_partitions(); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Marco Cutecchia
						Marco Cutecchia