unsigned max_pending,
Request::Flags flags)
: maxReqSize(max_req_size), fifoSize(size),
- reqFlags(flags), port(_port), proxy(port, port.sys->cacheLineSize()),
- cacheLineSize(port.sys->cacheLineSize()), buffer(size)
+ reqFlags(flags), port(_port), cacheLineSize(port.sys->cacheLineSize()),
+ buffer(size)
{
freeRequests.resize(max_pending);
for (auto &e : freeRequests)
const bool old_eob(atEndOfBlock());
if (port.sys->bypassCaches())
- resumeFillFunctional();
+ resumeFillBypass();
else
resumeFillTiming();
}
void
-DmaReadFifo::resumeFillFunctional()
+DmaReadFifo::resumeFillBypass()
{
const size_t fifo_space = buffer.capacity() - buffer.size();
if (fifo_space >= cacheLineSize || buffer.capacity() < cacheLineSize) {
std::vector<uint8_t> tmp_buffer(xfer_size);
assert(pendingRequests.empty());
- DPRINTF(DMA, "KVM Bypassing startAddr=%#x xfer_size=%#x " \
+ DPRINTF(DMA, "Direct bypass startAddr=%#x xfer_size=%#x " \
"fifo_space=%#x block_remaining=%#x\n",
nextAddr, xfer_size, fifo_space, block_remaining);
- proxy.readBlob(nextAddr, tmp_buffer.data(), xfer_size);
+ port.dmaAction(MemCmd::ReadReq, nextAddr, xfer_size, nullptr,
+ tmp_buffer.data(), 0, reqFlags);
+
buffer.write(tmp_buffer.begin(), xfer_size);
nextAddr += xfer_size;
}
#include "base/circlebuf.hh"
#include "dev/io_device.hh"
#include "mem/backdoor.hh"
-#include "mem/port_proxy.hh"
#include "params/DmaDevice.hh"
#include "sim/drain.hh"
#include "sim/system.hh"
const Request::Flags reqFlags;
DmaPort &port;
- PortProxy proxy;
const int cacheLineSize;
/** Try to issue new DMA requests during normal execution*/
void resumeFillTiming();
- /** Try to bypass DMA requests in KVM execution mode */
- void resumeFillFunctional();
+ /** Try to bypass DMA requests in non-caching mode */
+ void resumeFillBypass();
private: // Internal state
Fifo<uint8_t> buffer;