Go to the documentation of this file.
44 #include "debug/Power.hh"
45 #include "debug/TLB.hh"
47 #include "params/PowerTLB.hh"
59 #define MODE2MASK(X) (1 << (X))
83 while (
i->first == vpn) {
89 if (((vpn & InvMask) == (VPN & InvMask))
90 && (pte->
G || (asn == pte->
asid))) {
100 DPRINTF(
TLB,
"lookup %#x, asn %#x -> %s ppn %#x\n", vpn, (
int)asn,
101 retval ?
"hit" :
"miss", retval ? retval->
PFN1 : 0);
110 return &
table[Index];
120 while (
i->first == vpn) {
124 Addr InvMask = ~Mask;
126 if (((vpn & InvMask) == (VPN & InvMask))
127 && (pte->
G || (asn == pte->
asid))) {
137 DPRINTF(
Power,
"VPN: %x, asid: %d, Result of TLBP: %d\n", vpn, asn, Ind);
144 Addr VAddrUncacheable = 0xA0000000;
145 if ((req->getVaddr() & VAddrUncacheable) == VAddrUncacheable) {
158 warn(
"Attempted to write at index (%d) beyond TLB size (%d)",
180 fatal(
"TLB Insert not yet implemented\n");
198 for (
int i = 0;
i <
size;
i++) {
210 for (
int i = 0;
i <
size;
i++) {
222 if (req->getVaddr() & 0x3) {
223 DPRINTF(
TLB,
"Alignment Fault on %#x, size = %d\n", req->getVaddr(),
225 return std::make_shared<AlignmentFault>();
241 "translateAtomic not yet implemented for full system.");
253 "translateFunctional not implemented for full system.");
284 PowerTLBParams::create()
#define fatal(...)
This implements a cprintf based fatal() function.
virtual void finish(const Fault &fault, const RequestPtr &req, ThreadContext *tc, Mode mode)=0
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode) override
Fault translateFunctional(const RequestPtr &req, ThreadContext *tc, Mode mode) override
#define UNSERIALIZE_SCALAR(scalar)
EmulationPageTable * pTable
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::shared_ptr< Request > RequestPtr
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
virtual Process * getProcessPtr()=0
Fault translateInst(const RequestPtr &req, ThreadContext *tc)
static Fault checkCacheability(const RequestPtr &req)
void insert(Addr vaddr, PowerISA::PTE &pte)
void translateTiming(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode) override
@ STRICT_ORDER
The request is required to be strictly ordered by CPU models and is non-speculative.
Fault translateData(const RequestPtr &req, ThreadContext *tc, bool write)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
std::shared_ptr< FaultBase > Fault
Fault finalizePhysical(const RequestPtr &req, ThreadContext *tc, Mode mode) const override
Do post-translation physical address finalization.
@ UNCACHEABLE
The request is to an uncacheable address.
int probeEntry(Addr vpn, uint8_t) const
PowerISA::PTE * lookup(Addr vpn, uint8_t asn) const
constexpr decltype(nullptr) NoFault
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define SERIALIZE_SCALAR(scalar)
PowerISA::PTE & index(bool advance=true)
#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.
std::ostream CheckpointOut
PowerISA::PTE * getEntry(unsigned) const
void flushAll() override
Remove all entries from the TLB.
bool translate(Addr vaddr, Addr &paddr)
Translate function.
void serialize(CheckpointOut &cp) const
std::string csprintf(const char *format, const Args &...args)
void insertAt(PowerISA::PTE &pte, unsigned Index, int _smallPages)
Generated on Wed Sep 30 2020 14:01:59 for gem5 by doxygen 1.8.17