RubyPort.cc (12687:f26377b7f0c1) RubyPort.cc (12749:223c83ed9979)
1/*
2 * Copyright (c) 2012-2013 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

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

603
604void
605RubyPort::ruby_eviction_callback(Addr address)
606{
607 DPRINTF(RubyPort, "Sending invalidations.\n");
608 // Allocate the invalidate request and packet on the stack, as it is
609 // assumed they will not be modified or deleted by receivers.
610 // TODO: should this really be using funcMasterId?
1/*
2 * Copyright (c) 2012-2013 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

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

603
604void
605RubyPort::ruby_eviction_callback(Addr address)
606{
607 DPRINTF(RubyPort, "Sending invalidations.\n");
608 // Allocate the invalidate request and packet on the stack, as it is
609 // assumed they will not be modified or deleted by receivers.
610 // TODO: should this really be using funcMasterId?
611 Request request(address, RubySystem::getBlockSizeBytes(), 0,
612 Request::funcMasterId);
611 auto request = std::make_shared<Request>(
612 address, RubySystem::getBlockSizeBytes(), 0,
613 Request::funcMasterId);
614
613 // Use a single packet to signal all snooping ports of the invalidation.
614 // This assumes that snooping ports do NOT modify the packet/request
615 // Use a single packet to signal all snooping ports of the invalidation.
616 // This assumes that snooping ports do NOT modify the packet/request
615 Packet pkt(&request, MemCmd::InvalidateReq);
617 Packet pkt(request, MemCmd::InvalidateReq);
616 for (CpuPortIter p = slave_ports.begin(); p != slave_ports.end(); ++p) {
617 // check if the connected master port is snooping
618 if ((*p)->isSnooping()) {
619 // send as a snoop request
620 (*p)->sendTimingSnoopReq(&pkt);
621 }
622 }
623}
624
625void
626RubyPort::PioMasterPort::recvRangeChange()
627{
628 RubyPort &r = static_cast<RubyPort &>(owner);
629 r.gotAddrRanges--;
630 if (r.gotAddrRanges == 0 && FullSystem) {
631 r.pioSlavePort.sendRangeChange();
632 }
633}
618 for (CpuPortIter p = slave_ports.begin(); p != slave_ports.end(); ++p) {
619 // check if the connected master port is snooping
620 if ((*p)->isSnooping()) {
621 // send as a snoop request
622 (*p)->sendTimingSnoopReq(&pkt);
623 }
624 }
625}
626
627void
628RubyPort::PioMasterPort::recvRangeChange()
629{
630 RubyPort &r = static_cast<RubyPort &>(owner);
631 r.gotAddrRanges--;
632 if (r.gotAddrRanges == 0 && FullSystem) {
633 r.pioSlavePort.sendRangeChange();
634 }
635}