62 uint8_t *loc_data = (uint8_t*)
data;
65 for (
const auto &range: *gen) {
66 fatal_if(range.fault,
"Failed translation: vaddr 0x%x", range.vaddr);
69 (this->*dmaFn)(range.paddr, range.size,
event, loc_data, delay);
70 loc_data += range.size;
Event * getChunkEvent()
Request a chunk event.
void dmaWrite(Addr addr, int size, Event *event, uint8_t *data, uint32_t sid, uint32_t ssid, Tick delay=0)
void dmaRead(Addr addr, int size, Event *event, uint8_t *data, uint32_t sid, uint32_t ssid, Tick delay=0)
void dmaReadVirt(Addr host_addr, unsigned size, DmaCallback *cb, void *data, Tick delay=0)
Initiate a DMA read from virtual address host_addr.
void dmaVirt(DmaFnPtr dmaFn, Addr host_addr, unsigned size, DmaCallback *cb, void *data, Tick delay=0)
Initiate a call to DmaDevice using DmaFnPtr do a DMA starting from virtual address host_addr for size...
virtual TranslationGenPtr translate(Addr vaddr, Addr size)=0
Function used to translate a range of addresses from virtual to physical addresses.
void dmaWriteVirt(Addr host_addr, unsigned size, DmaCallback *b, void *data, Tick delay=0)
Initiate a DMA write from virtual address host_addr.
void schedule(Event &event, Tick when)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Tick curTick()
The universal simulation clock.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
std::unique_ptr< TranslationGen > TranslationGenPtr