summaryrefslogtreecommitdiff
path: root/src/arch/arm
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-05-23 09:14:12 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-05-23 09:14:12 -0400
commit5b36cf623cd065eea4f7b5e8b892dc904c030d56 (patch)
tree624c4dd0f98bfa824a05c61d0b9b6554ec7a9a08 /src/arch/arm
parent31b4ac5cec638ee5a60e15fada85f5890300ec6a (diff)
downloadgem5-5b36cf623cd065eea4f7b5e8b892dc904c030d56.tar.xz
MEM: Add a snooping DMA port subclass for table walker
This patch makes the (device) DmaPort non-snooping and removes the recvSnoop constructor parameter and instead introduces a SnoopingDmaPort subclass for the ARM table walker. Functionality is unchanged, as are the stats, and the patch merely clarifies that the normal DMA ports are not snooping (although they may issue requests that are snooped by others, as done with PCI, PCIe, AMBA4 ACE etc). Currently this port is declared in the ARM table walker as it is not used anywhere else. If other ports were to have similar behaviour it could be moved in a future patch.
Diffstat (limited to 'src/arch/arm')
-rw-r--r--src/arch/arm/table_walker.cc2
-rw-r--r--src/arch/arm/table_walker.hh39
2 files changed, 37 insertions, 4 deletions
diff --git a/src/arch/arm/table_walker.cc b/src/arch/arm/table_walker.cc
index 591c16747..dfb406543 100644
--- a/src/arch/arm/table_walker.cc
+++ b/src/arch/arm/table_walker.cc
@@ -51,7 +51,7 @@ using namespace ArmISA;
TableWalker::TableWalker(const Params *p)
: MemObject(p), port(this, params()->sys, params()->min_backoff,
- params()->max_backoff, true),
+ params()->max_backoff),
tlb(NULL), currState(NULL), pending(false),
masterId(p->sys->getMasterId(name())),
doL1DescEvent(this), doL2DescEvent(this), doProcessEvent(this)
diff --git a/src/arch/arm/table_walker.hh b/src/arch/arm/table_walker.hh
index a6ff2585b..36adc8a82 100644
--- a/src/arch/arm/table_walker.hh
+++ b/src/arch/arm/table_walker.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 ARM Limited
+ * Copyright (c) 2010-2012 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -51,7 +51,6 @@
#include "sim/eventq.hh"
#include "sim/fault_fwd.hh"
-class DmaPort;
class ThreadContext;
namespace ArmISA {
@@ -260,6 +259,40 @@ class TableWalker : public MemObject
};
+ protected:
+
+ /**
+ * A snooping DMA port that currently does nothing besides
+ * extending the DMA port to accept snoops without complaining.
+ */
+ class SnoopingDmaPort : public DmaPort
+ {
+
+ protected:
+
+ virtual void recvTimingSnoopReq(PacketPtr pkt)
+ { }
+
+ virtual Tick recvAtomicSnoop(PacketPtr pkt)
+ { return 0; }
+
+ virtual void recvFunctionalSnoop(PacketPtr pkt)
+ { }
+
+ virtual bool isSnooping() const { return true; }
+
+ public:
+
+ /**
+ * A snooping DMA port merely calls the construtor of the DMA
+ * port.
+ */
+ SnoopingDmaPort(MemObject *dev, System *s, Tick min_backoff,
+ Tick max_backoff) :
+ DmaPort(dev, s, min_backoff, max_backoff)
+ { }
+ };
+
struct WalkerState //: public SimObject
{
/** Thread context that we're doing the walk for */
@@ -329,7 +362,7 @@ class TableWalker : public MemObject
/** Port to issue translation requests from */
- DmaPort port;
+ SnoopingDmaPort port;
/** TLB that is initiating these table walks */
TLB *tlb;