20 #ifndef ATA_ATA_DISK_H 21 #define ATA_ATA_DISK_H 23 #include "BusMasterIde.h" 24 #include "ata-common.h" 25 #include "modules/drivers/common/scsi/ScsiDisk.h" 26 #include "pedigree/kernel/Atomic.h" 27 #include "pedigree/kernel/process/ConditionVariable.h" 28 #include "pedigree/kernel/process/Mutex.h" 29 #include "pedigree/kernel/processor/MemoryRegion.h" 30 #include "pedigree/kernel/processor/types.h" 31 #include "pedigree/kernel/utilities/String.h" 81 virtual uint64_t
doRead(uint64_t location);
82 virtual uint64_t
doWrite(uint64_t location);
96 virtual size_t getBlockCount()
const;
100 size_t nUnit, uintptr_t pCommand, uint8_t nCommandSize,
101 uintptr_t pRespBuffer, uint16_t nRespBytes,
bool bWrite);
105 void setupLBA28(uint64_t n, uint32_t nSectors);
107 void setupLBA48(uint64_t n, uint32_t nSectors);
170 uint8_t command, uint8_t countreg, uint8_t lowreg, uint8_t midreg,
bool initialise(size_t nUnit=~0)
physical_uintptr_t m_PrdTablePhys
void setFeatures(uint8_t command, uint8_t countreg, uint8_t lowreg, uint8_t midreg, uint8_t hireg)
virtual size_t getBlockSize() const
Gets the block size of the disk.
virtual BusMasterIde * getBusMaster() const
void setupLBA48(uint64_t n, uint32_t nSectors)
virtual uint64_t doWrite(uint64_t location)
MemoryRegion m_PrdTableMemRegion
virtual size_t defaultBlockSize()
Abstrace base class for hardware I/O capabilities.
virtual uint64_t doRead(uint64_t location)
virtual size_t getNativeBlockSize() const
size_t offset
Offset into the read.
size_t m_LastPrdTableOffset
virtual bool sendCommand(size_t nUnit, uintptr_t pCommand, uint8_t nCommandSize, uintptr_t pRespBuffer, uint16_t nRespBytes, bool bWrite)
Special memory entity in the kernel's virtual address space.
virtual void irqReceived()
The exception was caused by a hardware task switch.
Atomic< size_t > m_IrqCount
void setupLBA28(uint64_t n, uint32_t nSectors)
PhysicalRegionDescriptor * m_PrdTable
AtaDiskType m_AtaDiskType
uintptr_t buffer
Virtual address of buffer to read into (page sized).
virtual size_t getSize() const
Gets the size of the disk.
virtual void getName(String &str)
char m_pFirmwareRevision[64]