dev-arm: device name in AmbaFake accesses
authorAdrian Herrera <adrian.herrera@arm.com>
Wed, 16 Oct 2019 09:32:36 +0000 (10:32 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 28 Nov 2019 10:06:42 +0000 (10:06 +0000)
This patch prints the name of the AmbaFake device being accessed.
This is useful for identifying the device triggering the warning.

Change-Id: I69ca06d5d9bce73d918b8c8b46bb43e92597933b
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22847
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/dev/arm/amba_fake.cc

index 9c14140fb234c31efabfa32fbf1d2dac3ed8e763..fb08c4fa91b04f43626c11431283e4d69848fd19 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010 ARM Limited
+ * Copyright (c) 2010, 2019 ARM Limited
  * All rights reserved
  *
  * The license below extends only to copyright in the software and shall
@@ -63,7 +63,8 @@ AmbaFake::read(PacketPtr pkt)
 
     pkt->setLE<uint32_t>(0);
     if (!readId(pkt, ambaId, pioAddr) && !params()->ignore_access)
-        panic("Tried to read AmbaFake at offset %#x that doesn't exist\n", daddr);
+        panic("Tried to read AmbaFake %s at offset %#x that doesn't exist\n",
+              name(), daddr);
 
     pkt->makeAtomicResponse();
     return pioDelay;
@@ -76,7 +77,8 @@ AmbaFake::write(PacketPtr pkt)
     Addr daddr = pkt->getAddr() - pioAddr;
 
     if (!params()->ignore_access)
-        panic("Tried to write AmbaFake at offset %#x that doesn't exist\n", daddr);
+        panic("Tried to write AmbaFake %s at offset %#x that doesn't exist\n",
+              name(), daddr);
 
     pkt->makeAtomicResponse();
     return pioDelay;