13using namespace MaxOS::hardwarecommunication;
14using namespace MaxOS::drivers;
15using namespace MaxOS::drivers::disk;
16using namespace MaxOS::filesystem;
17using namespace MaxOS::filesystem::partition;
30 devices.insert(primary_maser,
true);
31 devices.insert(primary_slave,
false);
36 devices.insert(secondary_maser,
true);
37 devices.insert(secondary_slave,
false);
41IntegratedDriveElectronicsController::~IntegratedDriveElectronicsController() =
default;
49 for (
auto &device: devices) {
52 auto ata_device = device.first;
53 if (ata_device ==
nullptr)
57 bool exists = ata_device->identify();
61 devices.erase(ata_device);
68 Logger::DEBUG() <<
"IDE Controller: Initialised " << devices.size() <<
" devices\n";
77 for (
auto &device: devices) {
80 if (device.first ==
nullptr || !device.second)
static Logger DEBUG()
Gets active logger set to DEBUG level.
Driver for the ATA controller, handles the reading and writing of data to the hard drive.
void activate() final
Activate the IDE controller by mounting the devices to the virtual file system.
void initialise() final
Initialise the IDE controller by identifying the devices.
string device_name() final
Get the device name.
IntegratedDriveElectronicsController(hardwarecommunication::PCIDeviceDescriptor *device_descriptor)
Construct a new Integrated Drive Electronics Controller object.
string vendor_name() final
Get the vendor name.
static void mount_partitions(drivers::disk::Disk *disk)
read the partition table of a given hard disk
Stores information about a PCI device.
Defines a driver for the Integrated Drive Electronics (IDE) controller.