32#ifndef __ARCH_RISCV_TLB_HH__
33#define __ARCH_RISCV_TLB_HH__
45#include "params/RiscvTLB.hh"
Ports are used to interface objects to each other.
Based on the RISC-V ISA privileged specifications V1.11, there is no implementation guidelines on the...
This class helps to implement RISCV's physical memory protection (pmp) primitive.
void translateTiming(const RequestPtr &req, ThreadContext *tc, BaseMMU::Translation *translation, BaseMMU::Mode mode) override
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Fault finalizePhysical(const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode) const override
Do post-translation physical address finalization.
Fault createPagefault(Addr vaddr, BaseMMU::Mode mode)
Port * getTableWalkerPort() override
Get the table walker port.
gem5::RiscvISA::TLB::TlbStats stats
TlbEntry * insert(Addr vpn, const TlbEntry &entry)
Fault translateFunctional(const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode) override
std::list< TlbEntry * > EntryList
std::vector< TlbEntry > tlb
Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode) override
PrivilegeMode getMemPriv(ThreadContext *tc, BaseMMU::Mode mode)
void flushAll() override
Remove all entries from the TLB.
TlbEntry * lookup(Addr vpn, uint16_t asid, BaseMMU::Mode mode, bool hidden)
Fault doTranslate(const RequestPtr &req, ThreadContext *tc, BaseMMU::Translation *translation, BaseMMU::Mode mode, bool &delayed)
Fault translate(const RequestPtr &req, ThreadContext *tc, BaseMMU::Translation *translation, BaseMMU::Mode mode, bool &delayed)
void serialize(CheckpointOut &cp) const override
Serialize an object.
Fault checkPermissions(STATUS status, PrivilegeMode pmode, Addr vaddr, BaseMMU::Mode mode, PTESv39 pte)
void demapPage(Addr vaddr, uint64_t asn) override
Addr translateWithTLB(Addr vaddr, uint16_t asid, BaseMMU::Mode mode)
void takeOverFrom(BaseTLB *old) override
Take over from an old tlb context.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
This is a simple scalar statistic, like a counter.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
std::shared_ptr< Request > RequestPtr
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
Declaration of Statistics objects.
statistics::Formula accesses
statistics::Scalar readHits
statistics::Formula misses
statistics::Scalar writeAccesses
TlbStats(statistics::Group *parent)
statistics::Scalar writeMisses
statistics::Scalar writeHits
statistics::Scalar readMisses
statistics::Scalar readAccesses