Go to the documentation of this file.
55 auto traverse_hierarchy = [
this](
BaseTLB *starter) {
57 switch (
tlb->type()) {
58 case TypeTLB::instruction:
66 case TypeTLB::unified:
71 panic(
"Invalid TLB type\n");
76 traverse_hierarchy(
itb);
77 traverse_hierarchy(
dtb);
134 TranslationGen(new_start, new_size), tc(new_tc), cid(tc->contextId()),
135 mmu(new_mmu),
mode(new_mode),
flags(new_flags),
136 pageBytes(page_bytes)
143 if (next == range.
vaddr)
147 auto req = std::make_shared<Request>(
150 range.
fault = mmu->translateFunctional(req, tc,
mode);
153 range.
paddr = req->getPaddr();
BaseTLB * getTlb(Mode mode) const
@ funcRequestorId
This requestor id is used for functional requests that don't come from a particular device.
constexpr decltype(nullptr) NoFault
virtual void takeOverFrom(BaseTLB *otlb)=0
Take over from an old tlb context.
void translate(Range &range) const override
Subclasses implement this function to complete TranslationGen.
virtual Fault finalizePhysical(const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode) const =0
Do post-translation physical address finalization.
void init() override
Called at init time, this method is traversing the TLB hierarchy and pupulating the instruction/data/...
void takeOverFrom(Port *old)
A utility function to make it easier to swap out ports.
This structure represents a single, contiguous translation, or carries information about whatever fau...
virtual Fault translateFunctional(const RequestPtr &req, ThreadContext *tc, Mode mode)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
std::shared_ptr< FaultBase > Fault
std::set< BaseTLB * > unified
std::shared_ptr< Request > RequestPtr
void demapPage(Addr vaddr, uint64_t asn)
virtual void demapPage(Addr vaddr, uint64_t asn)=0
virtual Fault translateFunctional(const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode)
virtual void translateTiming(const RequestPtr &req, ThreadContext *tc, BaseMMU::Translation *translation, BaseMMU::Mode mode)=0
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
TranslationGen is a base class for a generator object which returns information about address transla...
virtual void translateTiming(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode)
std::set< BaseTLB * > instruction
It is possible from the MMU to traverse the entire hierarchy of TLBs, starting from the DTB and ITB (...
virtual Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode)=0
Ports are used to interface objects to each other.
static constexpr T roundUp(const T &val, const U &align)
This function is used to align addresses in memory.
virtual Fault finalizePhysical(const RequestPtr &req, ThreadContext *tc, Mode mode) const
virtual Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
MMUTranslationGen(Addr page_bytes, Addr new_start, Addr new_size, ThreadContext *new_tc, BaseMMU *new_mmu, BaseMMU::Mode new_mode, Request::Flags new_flags)
virtual void takeOverFrom(BaseMMU *old_mmu)
virtual Port * getTableWalkerPort()
Get the table walker port if present.
std::set< BaseTLB * > data
#define panic(...)
This implements a cprintf based panic() function.
Generated on Sun Jul 30 2023 01:56:49 for gem5 by doxygen 1.8.17