Go to the documentation of this file.
43 #include "debug/MipsPRA.hh"
44 #include "debug/TLB.hh"
46 #include "params/MipsTLB.hh"
78 while (
i->first == vpn) {
86 if (((vpn & InvMask) == (VPN & InvMask)) &&
87 (pte->
G || (asn == pte->
asid))) {
96 DPRINTF(
TLB,
"lookup %#x, asn %#x -> %s ppn %#x\n", vpn, (
int)asn,
97 retval ?
"hit" :
"miss", retval ? retval->
PFN1 : 0);
106 return &
table[Index];
116 while (
i->first == vpn) {
122 Addr InvMask = ~Mask;
124 if (((vpn & InvMask) == (VPN & InvMask)) &&
125 (pte->
G || (asn == pte->
asid))) {
133 DPRINTF(MipsPRA,
"VPN: %x, asid: %d, Result of TLBP: %d\n",vpn,asn,Ind);
140 Addr VAddrUncacheable = 0xA0000000;
143 if ((req->getVaddr() & VAddrUncacheable) == VAddrUncacheable) {
155 warn(
"Attempted to write at index (%d) beyond TLB size (%d)",
160 Index, pte.
Mask << 11,
162 ((pte.
PFN0 << 6) | (pte.
C0 << 3) |
163 (pte.
D0 << 2) | (pte.
V0 <<1) | pte.
G),
164 ((pte.
PFN1 <<6) | (pte.
C1 << 3) |
165 (pte.
D1 << 2) | (pte.
V1 <<1) | pte.
G));
181 fatal(
"TLB Insert not yet implemented\n");
199 for (
int i = 0;
i <
size;
i++) {
211 for (
int i = 0;
i <
size;
i++) {
262 MipsTLBParams::create()
264 return new TLB(
this);
#define fatal(...)
This implements a cprintf based fatal() function.
virtual void finish(const Fault &fault, const RequestPtr &req, ThreadContext *tc, Mode mode)=0
Fault translateFunctional(const RequestPtr &req, ThreadContext *tc, Mode mode) override
#define UNSERIALIZE_SCALAR(scalar)
MipsISA::PTE & index(bool advance=true)
MipsISA::PTE * lookup(Addr vpn, uint8_t asn) const
void serialize(CheckpointOut &cp) const override
Serialize an object.
void translateTiming(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode) override
void flushAll() override
Remove all entries from the TLB.
EmulationPageTable * pTable
std::shared_ptr< Request > RequestPtr
Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode) override
MipsISA::PTE * getEntry(unsigned) const
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
virtual Process * getProcessPtr()=0
@ STRICT_ORDER
The request is required to be strictly ordered by CPU models and is non-speculative.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
std::shared_ptr< FaultBase > Fault
@ UNCACHEABLE
The request is to an uncacheable address.
constexpr decltype(nullptr) NoFault
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define SERIALIZE_SCALAR(scalar)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void unserialize(CheckpointIn &cp)
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Overload hash function for BasicBlockRange type.
static Fault checkCacheability(const RequestPtr &req)
void serialize(CheckpointOut &cp) const
void insertAt(MipsISA::PTE &pte, unsigned Index, int _smallPages)
std::ostream CheckpointOut
int probeEntry(Addr vpn, uint8_t) const
void insert(Addr vaddr, MipsISA::PTE &pte)
Fault finalizePhysical(const RequestPtr &req, ThreadContext *tc, Mode mode) const override
Do post-translation physical address finalization.
bool translate(Addr vaddr, Addr &paddr)
Translate function.
std::string csprintf(const char *format, const Args &...args)
Generated on Wed Sep 30 2020 14:01:59 for gem5 by doxygen 1.8.17