23#include "pedigree/kernel/Atomic.h"
24#include "pedigree/kernel/process/Mutex.h"
25#include "pedigree/kernel/processor/MemoryRegion.h"
26#include "pedigree/kernel/processor/types.h"
34inline constexpr bool BusMasterVerboseLogging =
false;
55 uint8_t startStop : 1;
66 uint8_t bmIdeActive : 1;
68 uint8_t interrupt : 1;
70 uint8_t drv0Capable : 1;
71 uint8_t drv1Capable : 1;
72 uint8_t simplexOnly : 1;
126 bool add(uintptr_t buffer,
size_t nBytes);
139 bool begin(
bool bWrite);
bool add(uintptr_t buffer, size_t nBytes)
Adds a buffer to a DMA transaction.
bool hasError()
Determines if an ERROR has occurred on this channel.
size_t m_LastPrdTableOffset
bool isActive() const
Is there currently a DMA transaction taking place?
bool completeIdleTransaction()
bool hasCompleted()
Determines if the CURRENT TRANSFER has completed.
bool initialise(IoBase *pBase)
Initialises DMA for a specific channel.
void commandComplete()
Called by drivers when a command completes.
bool hasInterrupt()
Determines if an INTERRUPT has occurred on this channel.
MemoryRegion m_PrdTableMemRegion
bool begin(bool bWrite)
Begin a DMA operation.
physical_uintptr_t m_PrdTablePhys
PhysicalRegionDescriptor * m_PrdTable
Abstrace base class for hardware I/O capabilities.
Special memory entity in the kernel's virtual address space.
uint32_t baseAddress
Base address of the table, first two bits must be zero.