40 #include "debug/VtoPhys.hh"
56 panic(
"vtophys() without context on SPARC largly worthless\n");
77 bool addr_mask =
bits(tlbdata,3,3);
78 bool data_real = !
bits(tlbdata,5,5);
79 bool inst_real = !
bits(tlbdata,4,4);
80 bool ctx_zero =
bits(tlbdata,18,16) > 0;
81 int part_id =
bits(tlbdata,15,8);
82 int pri_context =
bits(tlbdata,47,32);
100 tbe = dtb->
lookup(addr, part_id, data_real, ctx_zero ? 0 : pri_context ,
105 tbe = itb->
lookup(addr, part_id, inst_real, ctx_zero ? 0 : pri_context,
111 dtb->
GetTsbPtr(tc, addr, ctx_zero ? 0 : pri_context, tsbs);
112 va_tag =
bits(addr, 63, 22);
113 for (
int x = 0;
x < 4;
x++) {
115 if (ttetag.
valid() && ttetag.
va() == va_tag) {
116 uint64_t entry = mem.
read<uint64_t>(tsbs[
x]) +
sizeof(uint64_t);
119 DPRINTF(VtoPhys,
"Virtual(%#x)->Physical(%#x) found in TTE\n",
124 panic(
"couldn't translate %#x\n", addr);
128 DPRINTF(VtoPhys,
"Virtual(%#x)->Physical(%#x) found in TLB\n", addr,
Addr translate(Addr vaddr) const
virtual MiscReg readMiscRegNoEffect(int misc_reg) const =0
TlbEntry * lookup(Addr va, int partition_id, bool real, int context_id=0, bool update_used=true)
lookup an entry in the TLB based on the partition id, and real bit if real is true or the partition i...
ThreadContext is the external interface to all thread state for anything outside of the CPU...
void populate(uint64_t e, EntryType t=sun4u)
PortProxy Object Declaration.
virtual PortProxy & getPhysProxy()=0
virtual TheISA::TLB * getDTBPtr()=0
T read(Addr address) const
Read sizeof(T) bytes from address and return as object T.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
This object is a proxy for a structural port, to be used for debug accesses.
void GetTsbPtr(ThreadContext *tc, Addr addr, int ctx, Addr *ptrs)
Addr vtophys(ThreadContext *tc, Addr vaddr)
Declaration and inline definition of ChunkGenerator object.
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it...
virtual TheISA::TLB * getITBPtr()=0