gem5 [DEVELOP-FOR-25.0]
Loading...
Searching...
No Matches
pagetable_walker.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
14 * Copyright (c) 2007 The Hewlett-Packard Development Company
15 * All rights reserved.
16 *
17 * The license below extends only to copyright in the software and shall
18 * not be construed as granting a license to any other intellectual
19 * property including but not limited to intellectual property relating
20 * to a hardware implementation of the functionality of the software
21 * licensed hereunder. You may use the software subject to the license
22 * terms below provided that you ensure that this notice is replicated
23 * unmodified and in its entirety in all distributions of the software,
24 * modified or unmodified, in source code or in binary form.
25 *
26 * Redistribution and use in source and binary forms, with or without
27 * modification, are permitted provided that the following conditions are
28 * met: redistributions of source code must retain the above copyright
29 * notice, this list of conditions and the following disclaimer;
30 * redistributions in binary form must reproduce the above copyright
31 * notice, this list of conditions and the following disclaimer in the
32 * documentation and/or other materials provided with the distribution;
33 * neither the name of the copyright holders nor the names of its
34 * contributors may be used to endorse or promote products derived from
35 * this software without specific prior written permission.
36 *
37 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
38 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
39 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
40 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
41 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
42 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
43 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
44 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
45 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
46 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
47 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48 */
49
51
52#include <memory>
53
54#include "arch/x86/faults.hh"
55#include "arch/x86/pagetable.hh"
56#include "arch/x86/regs/misc.hh"
57#include "arch/x86/tlb.hh"
58#include "base/bitfield.hh"
59#include "base/trie.hh"
60#include "cpu/base.hh"
61#include "cpu/thread_context.hh"
62#include "debug/PageTableWalker.hh"
63#include "mem/packet_access.hh"
64#include "mem/request.hh"
65
66namespace gem5
67{
68
69namespace X86ISA {
70
73 const RequestPtr &_req, BaseMMU::Mode _mode)
74{
75 // TODO: in timing mode, instead of blocking when there are other
76 // outstanding requests, see if this request can be coalesced with
77 // another one (i.e. either coalesce or start walk)
78 WalkerState * newState = new WalkerState(this, _translation, _req);
79 newState->initState(_tc, _mode, sys->isTimingMode());
80 if (currStates.size()) {
81 assert(newState->isTiming());
82 DPRINTF(PageTableWalker, "Walks in progress: %d\n", currStates.size());
83 currStates.push_back(newState);
84 return NoFault;
85 } else {
86 currStates.push_back(newState);
87 Fault fault = newState->startWalk();
88 if (!newState->isTiming()) {
89 currStates.pop_front();
90 delete newState;
91 }
92 return fault;
93 }
94}
95
97Walker::startFunctional(ThreadContext * _tc, Addr &addr, unsigned &logBytes,
98 BaseMMU::Mode _mode)
99{
100 funcState.initState(_tc, _mode);
101 return funcState.startFunctional(addr, logBytes);
102}
103
104bool
106{
107 return walker->recvTimingResp(pkt);
108}
109
110bool
112{
113 WalkerSenderState * senderState =
114 dynamic_cast<WalkerSenderState *>(pkt->popSenderState());
115 WalkerState * senderWalk = senderState->senderWalk;
116 bool walkComplete = senderWalk->recvPacket(pkt);
117 delete senderState;
118 if (walkComplete) {
120 for (iter = currStates.begin(); iter != currStates.end(); iter++) {
121 WalkerState * walkerState = *(iter);
122 if (walkerState == senderWalk) {
123 iter = currStates.erase(iter);
124 break;
125 }
126 }
127 delete senderWalk;
128 // Since we block requests when another is outstanding, we
129 // need to check if there is a waiting request to be serviced
130 if (currStates.size() && !startWalkWrapperEvent.scheduled())
131 // delay sending any new requests until we are finished
132 // with the responses
134 }
135 return true;
136}
137
138void
140{
141 walker->recvReqRetry();
142}
143
144void
146{
148 for (iter = currStates.begin(); iter != currStates.end(); iter++) {
149 WalkerState * walkerState = *(iter);
150 if (walkerState->isRetrying()) {
151 walkerState->retry();
152 }
153 }
154}
155
157{
158 WalkerSenderState* walker_state = new WalkerSenderState(sendingState);
159 pkt->pushSenderState(walker_state);
160 if (port.sendTimingReq(pkt)) {
161 return true;
162 } else {
163 // undo the adding of the sender state and delete it, as we
164 // will do it again the next time we attempt to send it
165 pkt->popSenderState();
166 delete walker_state;
167 return false;
168 }
169
170}
171
172Port &
173Walker::getPort(const std::string &if_name, PortID idx)
174{
175 if (if_name == "port")
176 return port;
177 else
178 return ClockedObject::getPort(if_name, idx);
179}
180
181void
183 BaseMMU::Mode _mode, bool _isTiming)
184{
185 assert(state == Ready);
186 started = false;
187 tc = _tc;
188 mode = _mode;
189 timing = _isTiming;
190}
191
192void
194{
195 unsigned num_squashed = 0;
196 WalkerState *currState = currStates.front();
197 while ((num_squashed < numSquashable) && currState &&
198 currState->translation->squashed()) {
199 currStates.pop_front();
200 num_squashed++;
201
202 DPRINTF(PageTableWalker, "Squashing table walk for address %#x\n",
203 currState->req->getVaddr());
204
205 // finish the translation which will delete the translation object
206 currState->translation->finish(
207 std::make_shared<UnimpFault>("Squashed Inst"),
208 currState->req, currState->tc, currState->mode);
209
210 // delete the current request if there are no inflight packets.
211 // if there is something in flight, delete when the packets are
212 // received and inflight is zero.
213 if (currState->numInflight() == 0) {
214 delete currState;
215 } else {
216 currState->squash();
217 }
218
219 // check the next translation request, if it exists
220 if (currStates.size())
221 currState = currStates.front();
222 else
223 currState = NULL;
224 }
225 if (currState && !currState->wasStarted())
226 currState->startWalk();
227}
228
229Fault
231{
232 Fault fault = NoFault;
233 assert(!started);
234 started = true;
235 setupWalk(req->getVaddr());
236 if (timing) {
238 state = Waiting;
240 sendPackets();
241 } else {
242 do {
243 walker->port.sendAtomic(read);
244 PacketPtr write = NULL;
245 fault = stepWalk(write);
246 assert(fault == NoFault || read == NULL);
249 if (write) {
250 walker->port.sendAtomic(write);
251 // delete the write packet as it is not needed anymore
252 delete write;
253 }
254 } while (read);
255 state = Ready;
257 }
258 return fault;
259}
260
261Fault
263{
264 Fault fault = NoFault;
265 assert(!started);
266 started = true;
268
269 do {
270 walker->port.sendFunctional(read);
271 // On a functional access (page table lookup), writes should
272 // not happen so this pointer is ignored after stepWalk
273 PacketPtr write = NULL;
274 fault = stepWalk(write);
275 assert(fault == NoFault || read == NULL);
276 // delete the write packet if it exists
277 if (write) {
278 delete write;
279 }
282 } while (read);
283 logBytes = entry.logBytes;
284 addr = entry.paddr;
285
286 return fault;
287}
288
289Fault
291{
292 assert(state != Ready && state != Waiting);
293 Fault fault = NoFault;
294 write = NULL;
295 PageTableEntry pte;
296 if (dataSize == 8)
297 pte = read->getLE<uint64_t>();
298 else
299 pte = read->getLE<uint32_t>();
300 VAddr vaddr = entry.vaddr;
301 bool uncacheable = pte.pcd;
302 Addr nextRead = 0;
303 bool doWrite = false;
304 bool doTLBInsert = false;
305 bool doEndWalk = false;
306 bool badNX = pte.nx && mode == BaseMMU::Execute && enableNX;
307 switch(state) {
308 case LongPML4:
309 DPRINTF(PageTableWalker, "Got long mode PML4 entry %#016x.\n", pte);
310 nextRead = mbits(pte, 51, 12) + vaddr.longl3 * dataSize;
311 doWrite = !pte.a;
312 pte.a = 1;
313 entry.writable = pte.w;
314 entry.user = pte.u;
315 if (badNX || !pte.p) {
316 doEndWalk = true;
317 fault = pageFault(pte.p);
318 break;
319 }
320 entry.noExec = pte.nx;
322 break;
323 case LongPDP:
324 DPRINTF(PageTableWalker, "Got long mode PDP entry %#016x.\n", pte);
325 nextRead = mbits(pte, 51, 12) + vaddr.longl2 * dataSize;
326 doWrite = !pte.a;
327 pte.a = 1;
328 entry.writable = entry.writable && pte.w;
329 entry.user = entry.user && pte.u;
330 if (badNX || !pte.p) {
331 doEndWalk = true;
332 fault = pageFault(pte.p);
333 break;
334 }
336 break;
337 case LongPD:
338 DPRINTF(PageTableWalker, "Got long mode PD entry %#016x.\n", pte);
339 doWrite = !pte.a;
340 pte.a = 1;
341 entry.writable = entry.writable && pte.w;
342 entry.user = entry.user && pte.u;
343 if (badNX || !pte.p) {
344 doEndWalk = true;
345 fault = pageFault(pte.p);
346 break;
347 }
348 if (!pte.ps) {
349 // 4 KB page
350 entry.logBytes = 12;
351 nextRead = mbits(pte, 51, 12) + vaddr.longl1 * dataSize;
353 break;
354 } else {
355 // 2 MB page
356 entry.logBytes = 21;
357 entry.paddr = mbits(pte, 51, 21);
358 entry.uncacheable = uncacheable;
359 entry.global = pte.g;
360 entry.patBit = bits(pte, 12);
361 entry.vaddr = mbits(entry.vaddr, 63, 21);
362 doTLBInsert = true;
363 doEndWalk = true;
364 break;
365 }
366 case LongPTE:
367 DPRINTF(PageTableWalker, "Got long mode PTE entry %#016x.\n", pte);
368 doWrite = !pte.a;
369 pte.a = 1;
370 entry.writable = entry.writable && pte.w;
371 entry.user = entry.user && pte.u;
372 if (badNX || !pte.p) {
373 doEndWalk = true;
374 fault = pageFault(pte.p);
375 break;
376 }
377 entry.paddr = mbits(pte, 51, 12);
378 entry.uncacheable = uncacheable;
379 entry.global = pte.g;
380 entry.patBit = bits(pte, 12);
381 entry.vaddr = mbits(entry.vaddr, 63, 12);
382 doTLBInsert = true;
383 doEndWalk = true;
384 break;
385 case PAEPDP:
386 DPRINTF(PageTableWalker,
387 "Got legacy mode PAE PDP entry %#08x.\n", pte);
388 nextRead = mbits(pte, 51, 12) + vaddr.pael2 * dataSize;
389 if (!pte.p) {
390 doEndWalk = true;
391 fault = pageFault(pte.p);
392 break;
393 }
395 break;
396 case PAEPD:
397 DPRINTF(PageTableWalker, "Got legacy mode PAE PD entry %#08x.\n", pte);
398 doWrite = !pte.a;
399 pte.a = 1;
400 entry.writable = pte.w;
401 entry.user = pte.u;
402 if (badNX || !pte.p) {
403 doEndWalk = true;
404 fault = pageFault(pte.p);
405 break;
406 }
407 if (!pte.ps) {
408 // 4 KB page
409 entry.logBytes = 12;
410 nextRead = mbits(pte, 51, 12) + vaddr.pael1 * dataSize;
412 break;
413 } else {
414 // 2 MB page
415 entry.logBytes = 21;
416 entry.paddr = mbits(pte, 51, 21);
417 entry.uncacheable = uncacheable;
418 entry.global = pte.g;
419 entry.patBit = bits(pte, 12);
420 entry.vaddr = mbits(entry.vaddr, 63, 21);
421 doTLBInsert = true;
422 doEndWalk = true;
423 break;
424 }
425 case PAEPTE:
426 DPRINTF(PageTableWalker,
427 "Got legacy mode PAE PTE entry %#08x.\n", pte);
428 doWrite = !pte.a;
429 pte.a = 1;
430 entry.writable = entry.writable && pte.w;
431 entry.user = entry.user && pte.u;
432 if (badNX || !pte.p) {
433 doEndWalk = true;
434 fault = pageFault(pte.p);
435 break;
436 }
437 entry.paddr = mbits(pte, 51, 12);
438 entry.uncacheable = uncacheable;
439 entry.global = pte.g;
440 entry.patBit = bits(pte, 7);
441 entry.vaddr = mbits(entry.vaddr, 63, 12);
442 doTLBInsert = true;
443 doEndWalk = true;
444 break;
445 case PSEPD:
446 DPRINTF(PageTableWalker, "Got legacy mode PSE PD entry %#08x.\n", pte);
447 doWrite = !pte.a;
448 pte.a = 1;
449 entry.writable = pte.w;
450 entry.user = pte.u;
451 if (!pte.p) {
452 doEndWalk = true;
453 fault = pageFault(pte.p);
454 break;
455 }
456 if (!pte.ps) {
457 // 4 KB page
458 entry.logBytes = 12;
459 nextRead = mbits(pte, 31, 12) + vaddr.norml2 * dataSize;
460 nextState = PTE;
461 break;
462 } else {
463 // 4 MB page
464 entry.logBytes = 21;
465 entry.paddr = bits(pte, 20, 13) << 32 | mbits(pte, 31, 22);
466 entry.uncacheable = uncacheable;
467 entry.global = pte.g;
468 entry.patBit = bits(pte, 12);
469 entry.vaddr = mbits(entry.vaddr, 63, 22);
470 doTLBInsert = true;
471 doEndWalk = true;
472 break;
473 }
474 case PD:
475 DPRINTF(PageTableWalker, "Got legacy mode PD entry %#08x.\n", pte);
476 doWrite = !pte.a;
477 pte.a = 1;
478 entry.writable = pte.w;
479 entry.user = pte.u;
480 if (!pte.p) {
481 doEndWalk = true;
482 fault = pageFault(pte.p);
483 break;
484 }
485 // 4 KB page
486 entry.logBytes = 12;
487 nextRead = mbits(pte, 31, 12) + vaddr.norml1 * dataSize;
488 nextState = PTE;
489 break;
490 case PTE:
491 DPRINTF(PageTableWalker, "Got legacy mode PTE entry %#08x.\n", pte);
492 doWrite = !pte.a;
493 pte.a = 1;
494 entry.writable = pte.w;
495 entry.user = pte.u;
496 if (!pte.p) {
497 doEndWalk = true;
498 fault = pageFault(pte.p);
499 break;
500 }
501 entry.paddr = mbits(pte, 31, 12);
502 entry.uncacheable = uncacheable;
503 entry.global = pte.g;
504 entry.patBit = bits(pte, 7);
505 entry.vaddr = mbits(entry.vaddr, 31, 12);
506 doTLBInsert = true;
507 doEndWalk = true;
508 break;
509 default:
510 panic("Unknown page table walker state %d!\n");
511 }
512 if (doEndWalk) {
513 if (doTLBInsert)
514 if (!functional) {
515
516 // Check if PCIDE is set in CR4
517 CR4 cr4 = tc->readMiscRegNoEffect(misc_reg::Cr4);
518 if (cr4.pcide){
519 CR3 cr3 = tc->readMiscRegNoEffect(misc_reg::Cr3);
520 walker->tlb->insert(entry.vaddr, entry, cr3.pcid);
521 }
522 else{
523 // The current PCID is always 000H if PCIDE
524 // is not set [sec 4.10.1 of Intel's Software
525 // Developer Manual]
526 walker->tlb->insert(entry.vaddr, entry, 0x000);
527 }
528 }
529
530 endWalk();
531 } else {
532 PacketPtr oldRead = read;
533 //If we didn't return, we're setting up another read.
534 Request::Flags flags = oldRead->req->getFlags();
535 flags.set(Request::UNCACHEABLE, uncacheable);
536 RequestPtr request = std::make_shared<Request>(
537 nextRead, oldRead->getSize(), flags, walker->requestorId);
538 read = new Packet(request, MemCmd::ReadReq);
539 read->allocate();
540 // If we need to write, adjust the read packet to write the modified
541 // value back to memory.
542 if (doWrite) {
543 write = oldRead;
544 if (dataSize == 8)
545 write->setLE<uint64_t>(pte);
546 else
547 write->setLE<uint32_t>(pte);
548 write->cmd = MemCmd::WriteReq;
549 } else {
550 write = NULL;
551 delete oldRead;
552 }
553 }
554 return fault;
555}
556
557void
559{
561 delete read;
562 read = NULL;
563}
564
565void
567{
568 VAddr addr = vaddr;
569 CR3 cr3 = tc->readMiscRegNoEffect(misc_reg::Cr3);
570 CR4 cr4 = tc->readMiscRegNoEffect(misc_reg::Cr4);
571 // Check if we're in long mode or not
572 Efer efer = tc->readMiscRegNoEffect(misc_reg::Efer);
573 dataSize = 8;
574 Addr topAddr;
575 if (efer.lma) {
576 // Do long mode.
577 state = LongPML4;
578 topAddr = (cr3.longPdtb << 12) + addr.longl4 * dataSize;
579 enableNX = efer.nxe;
580 } else {
581 // We're in some flavor of legacy mode.
582 if (cr4.pae) {
583 // Do legacy PAE.
584 state = PAEPDP;
585 topAddr = (cr3.paePdtb << 5) + addr.pael3 * dataSize;
586 enableNX = efer.nxe;
587 } else {
588 dataSize = 4;
589 topAddr = (cr3.pdtb << 12) + addr.norml2 * dataSize;
590 if (cr4.pse) {
591 // Do legacy PSE.
592 state = PSEPD;
593 } else {
594 // Do legacy non PSE.
595 state = PD;
596 }
597 enableNX = false;
598 }
599 }
600
602 entry.vaddr = vaddr;
603
605
606 // PCD can't be used if CR4.PCIDE=1 [sec 2.5
607 // of Intel's Software Developer's manual]
608 if (!cr4.pcide && cr3.pcd)
610
611 RequestPtr request = std::make_shared<Request>(
612 topAddr, dataSize, flags, walker->requestorId);
613
614 read = new Packet(request, MemCmd::ReadReq);
615 read->allocate();
616}
617
618bool
620{
621 assert(pkt->isResponse());
622 assert(inflight);
623 assert(state == Waiting);
624 inflight--;
625 if (squashed) {
626 // if were were squashed, return true once inflight is zero and
627 // this WalkerState will be freed there.
628 return (inflight == 0);
629 }
630 if (pkt->isRead()) {
631 // should not have a pending read it we also had one outstanding
632 assert(!read);
633
634 // @todo someone should pay for this
635 pkt->headerDelay = pkt->payloadDelay = 0;
636
639 PacketPtr write = NULL;
640 read = pkt;
641 timingFault = stepWalk(write);
642 state = Waiting;
643 assert(timingFault == NoFault || read == NULL);
644 if (write) {
645 writes.push_back(write);
646 }
647 sendPackets();
648 } else {
649 sendPackets();
650 }
651 if (inflight == 0 && read == NULL && writes.size() == 0) {
652 state = Ready;
654 if (timingFault == NoFault) {
655 /*
656 * Finish the translation. Now that we know the right entry is
657 * in the TLB, this should work with no memory accesses.
658 * There could be new faults unrelated to the table walk like
659 * permissions violations, so we'll need the return value as
660 * well.
661 */
662 bool delayedResponse;
663 Fault fault = walker->tlb->translate(req, tc, NULL, mode,
664 delayedResponse, true);
665 assert(!delayedResponse);
666 // Let the CPU continue.
667 translation->finish(fault, req, tc, mode);
668 } else {
669 // There was a fault during the walk. Let the CPU know.
670 translation->finish(timingFault, req, tc, mode);
671 }
672 return true;
673 }
674
675 return false;
676}
677
678void
680{
681 //If we're already waiting for the port to become available, just return.
682 if (retrying)
683 return;
684
685 //Reads always have priority
686 if (read) {
687 PacketPtr pkt = read;
688 read = NULL;
689 inflight++;
690 if (!walker->sendTiming(this, pkt)) {
691 retrying = true;
692 read = pkt;
693 inflight--;
694 return;
695 }
696 }
697 //Send off as many of the writes as we can.
698 while (writes.size()) {
699 PacketPtr write = writes.back();
700 writes.pop_back();
701 inflight++;
702 if (!walker->sendTiming(this, write)) {
703 retrying = true;
704 writes.push_back(write);
705 inflight--;
706 return;
707 }
708 }
709}
710
711unsigned
713{
714 return inflight;
715}
716
717bool
722
723bool
725{
726 return timing;
727}
728
729bool
734
735void
737{
738 squashed = true;
739}
740
741void
743{
744 retrying = false;
745 sendPackets();
746}
747
748Fault
750{
751 DPRINTF(PageTableWalker, "Raising page fault.\n");
752 HandyM5Reg m5reg = tc->readMiscRegNoEffect(misc_reg::M5Reg);
753 if (mode == BaseMMU::Execute && !enableNX)
755 return std::make_shared<PageFault>(entry.vaddr, present, mode,
756 m5reg.cpl == 3, false);
757}
758
759} // namespace X86ISA
760} // namespace gem5
#define DPRINTF(x,...)
Definition trace.hh:209
virtual bool squashed() const
This function is used by the page table walker to determine if it should translate the a pending requ...
Definition mmu.hh:84
virtual void finish(const Fault &fault, const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode)=0
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
bool isRead() const
Definition packet.hh:593
void setLE(T v)
Set the value in the data pointer to v as little endian.
bool isResponse() const
Definition packet.hh:598
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
Definition packet.hh:449
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
Definition packet.hh:431
void pushSenderState(SenderState *sender_state)
Push a new sender state to the packet and make the current sender state the predecessor of the new on...
Definition packet.cc:334
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
Definition packet.cc:342
RequestPtr req
A pointer to the original request.
Definition packet.hh:377
unsigned getSize() const
Definition packet.hh:817
MemCmd cmd
The command field of the packet.
Definition packet.hh:372
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
@ UNCACHEABLE
The request is to an uncacheable address.
Definition request.hh:125
gem5::Flags< FlagsType > Flags
Definition request.hh:102
ThreadContext is the external interface to all thread state for anything outside of the CPU.
void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
void initState(ThreadContext *_tc, BaseMMU::Mode _mode, bool _isTiming=false)
Fault startFunctional(Addr &addr, unsigned &logBytes)
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
bool recvTimingResp(PacketPtr pkt)
bool sendTiming(WalkerState *sendingState, PacketPtr pkt)
Fault start(ThreadContext *_tc, BaseMMU::Translation *translation, const RequestPtr &req, BaseMMU::Mode mode)
EventFunctionWrapper startWalkWrapperEvent
Event used to call startWalkWrapper.
std::list< WalkerState * > currStates
Fault startFunctional(ThreadContext *_tc, Addr &addr, unsigned &logBytes, BaseMMU::Mode mode)
STL list class.
Definition stl.hh:51
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 T mbits(T val, unsigned first, unsigned last)
Mask off the given bits in place like bits() but without shifting.
Definition bitfield.hh:106
void schedule(Event &event, Tick when)
Definition eventq.hh:1012
void set(Type mask)
Set all flag's bits matching the given mask.
Definition flags.hh:116
#define panic(...)
This implements a cprintf based panic() function.
Definition logging.hh:220
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
This is exposed globally, independent of the ISA.
Definition tlb.cc:65
Bitfield< 7 > present
Definition misc.hh:1027
Bitfield< 3 > addr
Definition types.hh:84
Copyright (c) 2024 Arm Limited All rights reserved.
Definition binary32.hh:36
std::shared_ptr< FaultBase > Fault
Definition types.hh:249
std::shared_ptr< Request > RequestPtr
Definition request.hh:94
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition types.hh:245
Packet * PacketPtr
constexpr decltype(nullptr) NoFault
Definition types.hh:253
Declaration of a request, the overall memory request consisting of the parts of the request that are ...

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