gem5 [DEVELOP-FOR-25.0]
Loading...
Searching...
No Matches
tlb.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * Copyright (c) 2020 Barkhausen Institut
5 * Copyright (c) 2021 Huawei International
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met: redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer;
12 * redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution;
15 * neither the name of the copyright holders nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#include "arch/riscv/tlb.hh"
33
34#include <string>
35#include <vector>
36
37#include "arch/riscv/faults.hh"
38#include "arch/riscv/mmu.hh"
42#include "arch/riscv/pmp.hh"
44#include "arch/riscv/utility.hh"
45#include "base/inifile.hh"
46#include "base/str.hh"
47#include "base/trace.hh"
48#include "cpu/thread_context.hh"
49#include "debug/TLB.hh"
50#include "debug/TLBVerbose.hh"
51#include "mem/page_table.hh"
52#include "params/RiscvTLB.hh"
53#include "sim/full_system.hh"
54#include "sim/process.hh"
55#include "sim/system.hh"
56
57namespace gem5
58{
59
60using namespace RiscvISA;
61
63//
64// RISC-V TLB
65//
66
67static Addr
68buildKey(Addr vpn, uint16_t asid)
69{
70 // Note ASID is 16 bits
71 // The VPN in sv39 is up to 39-12=27 bits
72 // The VPN in sv48 is up to 48-12=36 bits
73 // The VPN in sv57 is up to 57-12=45 bits
74 // So, shifting the ASID into the top 16 bits is safe.
75 assert(bits(vpn, 63, 48) == 0);
76 return (static_cast<Addr>(asid) << 48) | vpn;
77}
78
79TLB::TLB(const Params &p) :
80 BaseTLB(p), size(p.size), tlb(size),
81 lruSeq(0), stats(this), pma(p.pma_checker),
82 pmp(p.pmp)
83{
84 for (size_t x = 0; x < size; x++) {
85 tlb[x].trieHandle = NULL;
86 freeList.push_back(&tlb[x]);
87 }
88
89 walker = p.walker;
90 walker->setTLB(this);
91}
92
93Walker *
95{
96 return walker;
97}
98
99void
101{
102 // Find the entry with the lowest (and hence least recently updated)
103 // sequence number.
104
105 size_t lru = 0;
106 for (size_t i = 1; i < size; i++) {
107 if (tlb[i].lruSeq < tlb[lru].lruSeq)
108 lru = i;
109 }
110
111 remove(lru);
112}
113
114TlbEntry *
115TLB::lookup(Addr vpn, uint16_t asid, BaseMMU::Mode mode, bool hidden)
116{
117 TlbEntry *entry = trie.lookup(buildKey(vpn, asid));
118
119 DPRINTF(TLBVerbose, "lookup(vpn=%#x, asid=%#x, key=%#x): "
120 "%s ppn=%#x (%#x) %s\n",
121 vpn, asid, buildKey(vpn, asid), entry ? "hit" : "miss",
122 entry ? entry->paddr : 0, entry ? entry->size() : 0,
123 hidden ? "hidden" : "");
124
125 if (!hidden) {
126 if (entry)
127 entry->lruSeq = nextSeq();
128
129 if (mode == BaseMMU::Write)
130 stats.writeAccesses++;
131 else
132 stats.readAccesses++;
133
134 if (!entry) {
135 if (mode == BaseMMU::Write)
136 stats.writeMisses++;
137 else
138 stats.readMisses++;
139 }
140 else {
141 if (mode == BaseMMU::Write)
142 stats.writeHits++;
143 else
144 stats.readHits++;
145 }
146 }
147
148 return entry;
149}
150
151TlbEntry *
152TLB::insert(Addr vpn, const TlbEntry &entry)
153{
154 DPRINTF(TLB, "insert(vpn=%#x, asid=%#x, key=%#x): "
155 "vaddr=%#x paddr=%#x pte=%#x size=%#x\n",
156 vpn, entry.asid, buildKey(vpn, entry.asid), entry.vaddr, entry.paddr,
157 entry.pte, entry.size());
158
159 // If somebody beat us to it, just use that existing entry.
160 TlbEntry *newEntry = lookup(vpn, entry.asid, BaseMMU::Read, true);
161 if (newEntry) {
162 // update PTE flags (maybe we set the dirty/writable flag)
163 newEntry->pte = entry.pte;
164 assert(newEntry->vaddr == entry.vaddr);
165 assert(newEntry->asid == entry.asid);
166 assert(newEntry->logBytes == entry.logBytes);
167 return newEntry;
168 }
169
170 if (freeList.empty())
171 evictLRU();
172
173 newEntry = freeList.front();
174 freeList.pop_front();
175
176 Addr key = buildKey(vpn, entry.asid);
177 *newEntry = entry;
178 newEntry->lruSeq = nextSeq();
179 newEntry->trieHandle = trie.insert(
180 key, TlbEntryTrie::MaxBits - entry.logBytes + PageShift, newEntry
181 );
182 return newEntry;
183}
184
185void
186TLB::demapPage(Addr vaddr, uint64_t asid)
187{
188 // Note: vaddr is Reg[rs1] and asid is Reg[rs2]
189 // The definition of this instruction is
190 // if vaddr=x0 and asid=x0, then flush all
191 // if vaddr=x0 and asid!=x0 then flush all with matching asid
192 // if vaddr!=x0 and asid=x0 then flush all leaf PTEs that match vaddr
193 // if vaddr!=x0 and asid!=x0 then flush the leaf PTE that matches vaddr
194 // in the given asid.
195 // No effect if vaddr is not valid
196 // Currently, we assume if the values of the registers are 0 then it was
197 // referencing x0.
198
199 asid &= 0xFFFF;
200
201 DPRINTF(TLB, "flush(vaddr=%#x, asid=%#x)\n", vaddr, asid);
202 if (vaddr == 0 && asid == 0) {
203 DPRINTF(TLB, "Flushing all TLB entries\n");
204 flushAll();
205 } else {
206 if (vaddr != 0 && asid != 0) {
207 // TODO: When supporting other address translation modes, fix this
208 Addr vpn = getVPNFromVAddr(vaddr, AddrXlateMode::SV39);
209 TlbEntry *entry = lookup(vpn, asid, BaseMMU::Read, true);
210 if (entry) {
211 remove(entry - tlb.data());
212 }
213 }
214 else {
215 for (size_t i = 0; i < size; i++) {
216 if (tlb[i].trieHandle) {
217 Addr mask = ~(tlb[i].size() - 1);
218 if ((vaddr == 0 || (vaddr & mask) == tlb[i].vaddr) &&
219 (asid == 0 || tlb[i].asid == asid))
220 remove(i);
221 }
222 }
223 }
224 }
225}
226
227void
228TLB::flushAll()
229{
230 DPRINTF(TLB, "flushAll()\n");
231 for (size_t i = 0; i < size; i++) {
232 if (tlb[i].trieHandle)
233 remove(i);
234 }
235}
236
237void
238TLB::remove(size_t idx)
239{
240 DPRINTF(TLB, "remove(vpn=%#x, asid=%#x): ppn=%#x pte=%#x size=%#x\n",
241 tlb[idx].vaddr, tlb[idx].asid, tlb[idx].paddr, tlb[idx].pte,
242 tlb[idx].size());
243
244 assert(tlb[idx].trieHandle);
245 trie.remove(tlb[idx].trieHandle);
246 tlb[idx].trieHandle = NULL;
247 freeList.push_back(&tlb[idx]);
248}
249
250Fault
252 BaseMMU::Mode mode, PTESv39 pte)
253{
254 Fault fault = NoFault;
255
256 if (mode == BaseMMU::Read && !pte.r && !(pte.x && status.mxr)) {
257 DPRINTF(TLB, "PTE has no read perm, raising PF\n");
258 fault = createPagefault(vaddr, mode);
259 }
260 else if (mode == BaseMMU::Write && !pte.w) {
261 DPRINTF(TLB, "PTE has no write perm, raising PF\n");
262 fault = createPagefault(vaddr, mode);
263 }
264 else if (mode == BaseMMU::Execute && !pte.x) {
265 DPRINTF(TLB, "PTE has no exec perm, raising PF\n");
266 fault = createPagefault(vaddr, mode);
267 }
268
269 if (fault == NoFault) {
270 // check pte.u
271 if (pmode == PrivilegeMode::PRV_U && !pte.u) {
272 DPRINTF(TLB, "PTE is not user accessible, raising PF\n");
273 fault = createPagefault(vaddr, mode);
274 }
275 else if (pmode == PrivilegeMode::PRV_S && pte.u &&
276 (mode == BaseMMU::Execute || status.sum == 0)) {
277 DPRINTF(TLB, "PTE is only user accessible, raising PF\n");
278 fault = createPagefault(vaddr, mode);
279 }
280 }
281
282 return fault;
283}
284
285Fault
287{
288 ExceptionCode code;
289 if (mode == BaseMMU::Read)
291 else if (mode == BaseMMU::Write)
293 else
295 return std::make_shared<AddressFault>(vaddr, code);
296}
297
298Addr
301{
302 TlbEntry *e = lookup(getVPNFromVAddr(vaddr, xmode), asid, mode, true);
303 assert(e != nullptr);
304 return e->paddr << PageShift | (vaddr & mask(e->logBytes));
305}
306
307Fault
310 bool &delayed)
311{
312 delayed = false;
313
314 Addr vaddr = Addr(sext<VADDR_BITS>(req->getVaddr()));
315 SATP satp = tc->readMiscReg(MISCREG_SATP);
316
317 Addr vpn = getVPNFromVAddr(vaddr, satp.mode);
318 TlbEntry *e = lookup(vpn, satp.asid, mode, false);
319 if (!e) {
320 Fault fault = walker->start(tc, translation, req, mode);
321 if (translation != nullptr || fault != NoFault) {
322 // This gets ignored in atomic mode.
323 delayed = true;
324 return fault;
325 }
326 e = lookup(vpn, satp.asid, mode, true);
327 assert(e != nullptr);
328 }
329
330 STATUS status = tc->readMiscReg(MISCREG_STATUS);
331 PrivilegeMode pmode = getMemPriv(tc, mode);
332 Fault fault = checkPermissions(status, pmode, vaddr, mode, e->pte);
333 if (fault != NoFault) {
334 // if we want to write and it isn't writable, do a page table walk
335 // again to update the dirty flag.
336 if (mode == BaseMMU::Write && !e->pte.w) {
337 DPRINTF(TLB, "Dirty bit not set, repeating PT walk\n");
338 fault = walker->start(tc, translation, req, mode);
339 if (translation != nullptr || fault != NoFault) {
340 delayed = true;
341 return fault;
342 }
343 }
344 if (fault != NoFault)
345 return fault;
346 }
347
348 Addr paddr = e->paddr << PageShift | (vaddr & mask(e->logBytes));
349 DPRINTF(TLBVerbose, "translate(vaddr=%#x, vpn=%#x, asid=%#x): %#x\n",
350 vaddr, vpn, satp.asid, paddr);
351 req->setPaddr(paddr);
352
353 return NoFault;
354}
355
358{
359 STATUS status = (STATUS)tc->readMiscReg(MISCREG_STATUS);
361 if (mode != BaseMMU::Execute && status.mprv == 1)
362 pmode = (PrivilegeMode)(RegVal)status.mpp;
363 return pmode;
364}
365
366Fault
369 bool &delayed)
370{
371 delayed = false;
372
373 if (FullSystem) {
374 PrivilegeMode pmode = getMemPriv(tc, mode);
375 MISA misa = tc->readMiscRegNoEffect(MISCREG_ISA);
376 SATP satp = tc->readMiscReg(MISCREG_SATP);
377 Fault fault = NoFault;
378
379 fault = pma->checkVAddrAlignment(req, mode);
380
381 if (!misa.rvs || pmode == PrivilegeMode::PRV_M ||
382 satp.mode == AddrXlateMode::BARE) {
383 req->setFlags(Request::PHYSICAL);
384 }
385
386 if (fault == NoFault) {
387 if (req->getFlags() & Request::PHYSICAL) {
391 req->setPaddr(getValidAddr(req->getVaddr(), tc, mode));
392 } else {
393 fault = doTranslate(req, tc, translation, mode, delayed);
394 }
395 }
396
397 if (!delayed && fault == NoFault) {
398 // do pmp check if any checking condition is met.
399 // timingFault will be NoFault if pmp checks are
400 // passed, otherwise an address fault will be returned.
401 fault = pmp->pmpCheck(req, mode, pmode, tc);
402 }
403
404 if (!delayed && fault == NoFault) {
405 fault = pma->check(req, mode);
406 }
407 return fault;
408 } else {
409 // In the O3 CPU model, sometimes a memory access will be speculatively
410 // executed along a branch that will end up not being taken where the
411 // address is invalid. In that case, return a fault rather than trying
412 // to translate it (which will cause a panic). Since RISC-V allows
413 // unaligned memory accesses, this should only happen if the request's
414 // length is long enough to wrap around from the end of the memory to
415 // the start.
416 assert(req->getSize() > 0);
417 if (req->getVaddr() + req->getSize() - 1 < req->getVaddr())
418 return std::make_shared<GenericPageTableFault>(req->getVaddr());
419
420 Process * p = tc->getProcessPtr();
421
422 /*
423 * In RV32 Linux, as vaddr >= 0x80000000 is legal in userspace
424 * (except for COMPAT mode for RV32 Userspace in RV64 Linux), we
425 * need to ignore the upper bits beyond 32 bits.
426 */
427 Addr vaddr = getValidAddr(req->getVaddr(), tc, mode);
428 Addr paddr;
429
430 if (!p->pTable->translate(vaddr, paddr))
431 return std::make_shared<GenericPageTableFault>(req->getVaddr());
432
433 req->setPaddr(paddr);
434
435 return NoFault;
436 }
437}
438
439Fault
442{
443 bool delayed;
444 return translate(req, tc, nullptr, mode, delayed);
445}
446
447void
450{
451 bool delayed;
452 assert(translation);
453 Fault fault = translate(req, tc, translation, mode, delayed);
454 if (!delayed)
455 translation->finish(fault, req, tc, mode);
456 else
457 translation->markDelayed();
458}
459
460Fault
461TLB::translateFunctional(const RequestPtr &req, ThreadContext *tc,
462 BaseMMU::Mode mode)
463{
464 const Addr vaddr = getValidAddr(req->getVaddr(), tc, mode);
465 Addr paddr = vaddr;
466
467 if (FullSystem) {
468 MMU *mmu = static_cast<MMU *>(tc->getMMUPtr());
469
470 PrivilegeMode pmode = mmu->getMemPriv(tc, mode);
471 MISA misa = tc->readMiscRegNoEffect(MISCREG_ISA);
472 SATP satp = tc->readMiscReg(MISCREG_SATP);
473 if (misa.rvs && pmode != PrivilegeMode::PRV_M &&
474 satp.mode != AddrXlateMode::BARE) {
475 Walker *walker = mmu->getDataWalker();
476 unsigned logBytes;
477 Fault fault = walker->startFunctional(
478 tc, paddr, logBytes, mode);
479 if (fault != NoFault)
480 return fault;
481
482 Addr masked_addr = vaddr & mask(logBytes);
483 paddr |= masked_addr;
484 }
485 }
486 else {
487 Process *process = tc->getProcessPtr();
488 const auto *pte = process->pTable->lookup(vaddr);
489
490 if (!pte && mode != BaseMMU::Execute) {
491 // Check if we just need to grow the stack.
492 if (process->fixupFault(vaddr)) {
493 // If we did, lookup the entry for the new page.
494 pte = process->pTable->lookup(vaddr);
495 }
496 }
497
498 if (!pte)
499 return std::make_shared<GenericPageTableFault>(req->getVaddr());
500
501 paddr = pte->paddr | process->pTable->pageOffset(vaddr);
502 }
503
504 DPRINTF(TLB, "Translated (functional) %#x -> %#x.\n", vaddr, paddr);
505 req->setPaddr(paddr);
506 return NoFault;
507}
508
509Fault
510TLB::finalizePhysical(const RequestPtr &req,
511 ThreadContext *tc, BaseMMU::Mode mode) const
512{
513 return NoFault;
514}
515
516void
517TLB::serialize(CheckpointOut &cp) const
518{
519 // Only store the entries in use.
520 uint32_t _size = size - freeList.size();
521 SERIALIZE_SCALAR(_size);
522 SERIALIZE_SCALAR(lruSeq);
523
524 uint32_t _count = 0;
525 for (uint32_t x = 0; x < size; x++) {
526 if (tlb[x].trieHandle != NULL)
527 tlb[x].serializeSection(cp, csprintf("Entry%d", _count++));
528 }
529}
530
531void
532TLB::unserialize(CheckpointIn &cp)
533{
534 // Do not allow to restore with a smaller tlb.
535 uint32_t _size;
536 UNSERIALIZE_SCALAR(_size);
537 if (_size > size) {
538 fatal("TLB size less than the one in checkpoint!");
539 }
540
541 UNSERIALIZE_SCALAR(lruSeq);
542
543 for (uint32_t x = 0; x < _size; x++) {
544 TlbEntry *newEntry = freeList.front();
545 freeList.pop_front();
546
547 newEntry->unserializeSection(cp, csprintf("Entry%d", x));
548 // TODO: When supporting other addressing modes fix this
549 Addr vpn = getVPNFromVAddr(newEntry->vaddr, AddrXlateMode::SV39);
550 Addr key = buildKey(vpn, newEntry->asid);
551 newEntry->trieHandle = trie.insert(key,
552 TlbEntryTrie::MaxBits - newEntry->logBytes + PageShift, newEntry);
553 }
554}
555
557 : statistics::Group(parent),
558 ADD_STAT(readHits, statistics::units::Count::get(), "read hits"),
559 ADD_STAT(readMisses, statistics::units::Count::get(), "read misses"),
560 ADD_STAT(readAccesses, statistics::units::Count::get(), "read accesses"),
561 ADD_STAT(writeHits, statistics::units::Count::get(), "write hits"),
562 ADD_STAT(writeMisses, statistics::units::Count::get(), "write misses"),
563 ADD_STAT(writeAccesses, statistics::units::Count::get(), "write accesses"),
564 ADD_STAT(hits, statistics::units::Count::get(),
565 "Total TLB (read and write) hits", readHits + writeHits),
566 ADD_STAT(misses, statistics::units::Count::get(),
567 "Total TLB (read and write) misses", readMisses + writeMisses),
568 ADD_STAT(accesses, statistics::units::Count::get(),
569 "Total TLB (read and write) accesses",
570 readAccesses + writeAccesses)
571{
572}
573
574Port *
576{
577 return &walker->getPort("port");
578}
579
580} // namespace gem5
#define DPRINTF(x,...)
Definition trace.hh:209
TLB(const Params &p)
Definition tlb.cc:101
void translateTiming(const RequestPtr &req, ThreadContext *tc, BaseMMU::Translation *translation, BaseMMU::Mode mode) override
Definition tlb.hh:259
virtual void finish(const Fault &fault, const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode)=0
virtual void markDelayed()=0
Signal that the translation has been delayed due to a hw page table walk.
Ports are used to interface objects to each other.
Definition port.hh:62
@ PHYSICAL
The virtual address is also the physical address.
Definition request.hh:117
void remove(size_t idx)
Definition tlb.cc:238
TLB(const Params &p)
Walker * walker
Definition tlb.hh:70
Fault createPagefault(Addr vaddr, BaseMMU::Mode mode)
Definition tlb.cc:286
BasePMAChecker * pma
Definition tlb.hh:89
Addr hiddenTranslateWithTLB(Addr vaddr, uint16_t asid, Addr xmode, BaseMMU::Mode mode)
Definition tlb.cc:299
gem5::RiscvISA::TLB::TlbStats stats
TlbEntry * insert(Addr vpn, const TlbEntry &entry)
Insert an entry into the TLB.
Definition tlb.cc:152
EntryList freeList
Definition tlb.hh:67
uint64_t nextSeq()
Definition tlb.hh:175
std::vector< TlbEntry > tlb
Definition tlb.hh:65
Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode) override
TlbEntryTrie trie
Definition tlb.hh:66
PrivilegeMode getMemPriv(ThreadContext *tc, BaseMMU::Mode mode)
Definition tlb.cc:357
TlbEntry * lookup(Addr vpn, uint16_t asid, BaseMMU::Mode mode, bool hidden)
Perform the tlb lookup.
Definition tlb.cc:115
Addr getValidAddr(Addr vaddr, ThreadContext *tc, BaseMMU::Mode mode)
Definition tlb.hh:148
Fault doTranslate(const RequestPtr &req, ThreadContext *tc, BaseMMU::Translation *translation, BaseMMU::Mode mode, bool &delayed)
Definition tlb.cc:308
Fault translate(const RequestPtr &req, ThreadContext *tc, BaseMMU::Translation *translation, BaseMMU::Mode mode, bool &delayed)
Definition tlb.cc:367
Fault checkPermissions(STATUS status, PrivilegeMode pmode, Addr vaddr, BaseMMU::Mode mode, PTESv39 pte)
Definition tlb.cc:251
void demapPage(Addr vaddr, uint64_t asn) override
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual RegVal readMiscReg(RegIndex misc_reg)=0
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
virtual Process * getProcessPtr()=0
Walker * walker
Definition tlb.hh:89
uint32_t size
Definition tlb.hh:101
uint64_t lruSeq
Definition tlb.hh:108
void evictLRU()
Definition tlb.cc:100
Walker * getWalker()
Definition tlb.cc:94
Port * getTableWalkerPort() override
Get the table walker port.
Definition tlb.cc:630
std::vector< TlbEntry > tlb
Definition tlb.hh:103
Statistics container.
Definition group.hh:93
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition group.hh:75
static const unsigned MaxBits
Definition trie.hh:127
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition bitfield.hh:79
constexpr uint64_t sext(uint64_t val)
Sign-extend an N-bit value to 64 bits.
Definition bitfield.hh:129
#define fatal(...)
This implements a cprintf based fatal() function.
Definition logging.hh:232
Declaration of IniFile object.
Bitfield< 3, 0 > mask
Definition pcstate.hh:63
Bitfield< 4, 0 > mode
Definition misc_types.hh:74
Bitfield< 7 > i
Definition misc_types.hh:67
Bitfield< 9 > e
Definition misc_types.hh:65
Bitfield< 5, 0 > status
Bitfield< 59, 56 > tlb
Bitfield< 0 > p
Bitfield< 0 > p
Addr getVPNFromVAddr(Addr vaddr, Addr mode)
Definition pagetable.cc:64
const Addr PageShift
Definition page_size.hh:53
Bitfield< 59, 44 > asid
Definition pagetable.hh:47
Bitfield< 3 > x
Definition pagetable.hh:76
@ MISCREG_STATUS
Definition misc.hh:76
Bitfield< 4 > x
Definition pagetable.hh:61
Units for Stats.
Definition units.hh:113
Copyright (c) 2024 Arm Limited All rights reserved.
Definition binary32.hh:36
std::shared_ptr< FaultBase > Fault
Definition types.hh:249
static Addr buildKey(Addr vpn, uint16_t asid)
Definition tlb.cc:68
std::shared_ptr< Request > RequestPtr
Definition request.hh:94
uint64_t RegVal
Definition types.hh:173
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
Definition root.cc:220
std::string csprintf(const char *format, const Args &...args)
Definition cprintf.hh:161
constexpr decltype(nullptr) NoFault
Definition types.hh:253
Declarations of a non-full system Page Table.
PMP header file.
#define UNSERIALIZE_SCALAR(scalar)
Definition serialize.hh:575
#define SERIALIZE_SCALAR(scalar)
Definition serialize.hh:568
TlbEntryTrie::Handle trieHandle
Definition pagetable.hh:106
TlbStats(statistics::Group *parent)
Definition tlb.cc:556

Generated on Mon May 26 2025 09:19:05 for gem5 by doxygen 1.13.2