59 PortProxy(tc, tc->getSystemPtr()->cacheLineSize()), _tc(tc),
flags(_flags)
67 bool faulting =
false;
68 for (
const auto &range: *gen) {
94 [
this, &
p](
const auto &range) {
95 PortProxy::readBlobPhys(range.paddr, range.flags, p, range.size);
96 p = static_cast<uint8_t *>(p) + range.size;
102 Addr addr,
const void *
p, uint64_t size)
const
107 [
this, &
p](
const auto &range) {
108 PortProxy::writeBlobPhys(range.paddr, range.flags, p, range.size);
109 p = static_cast<const uint8_t *>(p) + range.size;
119 [
this,
v](
const auto &range) {
120 PortProxy::memsetBlobPhys(range.paddr, range.flags, v, range.size);
Declaration and inline definition of ChunkGenerator object.
virtual Fault translateFunctional(const RequestPtr &req, ThreadContext *tc, Mode mode)
This object is a proxy for a port or other object which implements the functional response protocol,...
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual BaseMMU * getMMUPtr()=0
TranslatingPortProxy(ThreadContext *tc, Request::Flags _flags=0)
bool tryReadBlob(Addr addr, void *p, uint64_t size) const override
Version of tryReadblob that translates virt->phys and deals with page boundries.
bool tryMemsetBlob(Addr address, uint8_t v, uint64_t size) const override
Fill size bytes starting at addr with byte value val.
virtual bool fixupRange(const TranslationGen::Range &range, BaseMMU::Mode mode) const
bool tryWriteBlob(Addr addr, const void *p, uint64_t size) const override
Version of tryWriteBlob that translates virt->phys and deals with page boundries.
bool tryOnBlob(BaseMMU::Mode mode, TranslationGenPtr gen, std::function< void(const TranslationGen::Range &)> func) const
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::unique_ptr< TranslationGen > TranslationGenPtr
This structure represents a single, contiguous translation, or carries information about whatever fau...