request.hh (12749:223c83ed9979) request.hh (12766:1c347e60c7fd)
1/*
2 * Copyright (c) 2012-2013,2017 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

--- 431 unchanged lines hidden (view full) ---

440 accessDelta(0), depth(0)
441 {
442 setVirt(asid, vaddr, size, flags, mid, pc);
443 setContext(cid);
444 }
445
446 Request(int asid, Addr vaddr, unsigned size, Flags flags, MasterID mid,
447 Addr pc, ContextID cid, AtomicOpFunctor *atomic_op)
1/*
2 * Copyright (c) 2012-2013,2017 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

--- 431 unchanged lines hidden (view full) ---

440 accessDelta(0), depth(0)
441 {
442 setVirt(asid, vaddr, size, flags, mid, pc);
443 setContext(cid);
444 }
445
446 Request(int asid, Addr vaddr, unsigned size, Flags flags, MasterID mid,
447 Addr pc, ContextID cid, AtomicOpFunctor *atomic_op)
448 : atomicOpFunctor(atomic_op)
449 {
448 {
450 setVirt(asid, vaddr, size, flags, mid, pc);
449 setVirt(asid, vaddr, size, flags, mid, pc, atomic_op);
451 setContext(cid);
452 }
453
450 setContext(cid);
451 }
452
453 Request(const Request& other)
454 : _paddr(other._paddr), _size(other._size),
455 _masterId(other._masterId),
456 _flags(other._flags),
457 _memSpaceConfigFlags(other._memSpaceConfigFlags),
458 privateFlags(other.privateFlags),
459 _time(other._time),
460 _taskId(other._taskId), _asid(other._asid), _vaddr(other._vaddr),
461 _extraData(other._extraData), _contextId(other._contextId),
462 _pc(other._pc), _reqInstSeqNum(other._reqInstSeqNum),
463 translateDelta(other.translateDelta),
464 accessDelta(other.accessDelta), depth(other.depth)
465 {
466 if (other.atomicOpFunctor)
467 atomicOpFunctor = (other.atomicOpFunctor)->clone();
468 else
469 atomicOpFunctor = nullptr;
470 }
471
454 ~Request()
455 {
456 if (hasAtomicOpFunctor()) {
457 delete atomicOpFunctor;
458 }
459 }
460
461 /**

--- 7 unchanged lines hidden (view full) ---

469 }
470
471 /**
472 * Set up a virtual (e.g., CPU) request in a previously
473 * allocated Request object.
474 */
475 void
476 setVirt(int asid, Addr vaddr, unsigned size, Flags flags, MasterID mid,
472 ~Request()
473 {
474 if (hasAtomicOpFunctor()) {
475 delete atomicOpFunctor;
476 }
477 }
478
479 /**

--- 7 unchanged lines hidden (view full) ---

487 }
488
489 /**
490 * Set up a virtual (e.g., CPU) request in a previously
491 * allocated Request object.
492 */
493 void
494 setVirt(int asid, Addr vaddr, unsigned size, Flags flags, MasterID mid,
477 Addr pc)
495 Addr pc, AtomicOpFunctor *amo_op = nullptr)
478 {
479 _asid = asid;
480 _vaddr = vaddr;
481 _size = size;
482 _masterId = mid;
483 _pc = pc;
484 _time = curTick();
485
486 _flags.clear(~STICKY_FLAGS);
487 _flags.set(flags);
488 privateFlags.clear(~STICKY_PRIVATE_FLAGS);
489 privateFlags.set(VALID_VADDR|VALID_SIZE|VALID_PC);
490 depth = 0;
491 accessDelta = 0;
492 translateDelta = 0;
496 {
497 _asid = asid;
498 _vaddr = vaddr;
499 _size = size;
500 _masterId = mid;
501 _pc = pc;
502 _time = curTick();
503
504 _flags.clear(~STICKY_FLAGS);
505 _flags.set(flags);
506 privateFlags.clear(~STICKY_PRIVATE_FLAGS);
507 privateFlags.set(VALID_VADDR|VALID_SIZE|VALID_PC);
508 depth = 0;
509 accessDelta = 0;
510 translateDelta = 0;
511 atomicOpFunctor = amo_op;
493 }
494
495 /**
496 * Set just the physical address. This usually used to record the
497 * result of a translation. However, when using virtualized CPUs
498 * setPhys() is sometimes called to finalize a physical address
499 * without a virtual address, so we can't check if the virtual
500 * address is valid.

--- 418 unchanged lines hidden ---
512 }
513
514 /**
515 * Set just the physical address. This usually used to record the
516 * result of a translation. However, when using virtualized CPUs
517 * setPhys() is sometimes called to finalize a physical address
518 * without a virtual address, so we can't check if the virtual
519 * address is valid.

--- 418 unchanged lines hidden ---