summaryrefslogtreecommitdiff
path: root/Kernel/IDEDiskDevice.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-03 12:36:40 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-03 12:36:40 +0200
commitab43658c5537c03d075f8abc57fe90e940023779 (patch)
tree01bd0f73784dd42372dd8a8f065a3a8c6b3d9858 /Kernel/IDEDiskDevice.h
parent072ea7eece8607efec8e2824307b0a6209e4d014 (diff)
downloadserenity-ab43658c5537c03d075f8abc57fe90e940023779.zip
Kernel: Move devices into Kernel/Devices/.
Diffstat (limited to 'Kernel/IDEDiskDevice.h')
-rw-r--r--Kernel/IDEDiskDevice.h48
1 files changed, 0 insertions, 48 deletions
diff --git a/Kernel/IDEDiskDevice.h b/Kernel/IDEDiskDevice.h
deleted file mode 100644
index 60a23507d8..0000000000
--- a/Kernel/IDEDiskDevice.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#pragma once
-
-#include <Kernel/Lock.h>
-#include <AK/RetainPtr.h>
-#include <Kernel/DiskDevice.h>
-#include "IRQHandler.h"
-
-class IDEDiskDevice final : public IRQHandler, public DiskDevice {
-public:
- static Retained<IDEDiskDevice> create();
- virtual ~IDEDiskDevice() override;
-
- // ^DiskDevice
- virtual unsigned block_size() const override;
- virtual bool read_block(unsigned index, byte*) const override;
- virtual bool write_block(unsigned index, const byte*) override;
-
-protected:
- IDEDiskDevice();
-
-private:
- // ^IRQHandler
- virtual void handle_irq() override;
-
- // ^DiskDevice
- virtual const char* class_name() const override;
-
- struct CHS {
- dword cylinder;
- word head;
- word sector;
- };
- CHS lba_to_chs(dword) const;
-
- void initialize();
- bool wait_for_irq();
- bool read_sectors(dword start_sector, word count, byte* buffer);
- bool write_sectors(dword start_sector, word count, const byte* data);
-
- Lock m_lock;
- word m_cylinders { 0 };
- word m_heads { 0 };
- word m_sectors_per_track { 0 };
- volatile bool m_interrupted { false };
- volatile byte m_device_error { 0 };
-
-};
-