From 43e9d8745eea637fd3f1f4f42b170384689f9d1c Mon Sep 17 00:00:00 2001 From: Adrian Herrera Date: Wed, 16 Oct 2019 10:32:36 +0100 Subject: [PATCH] dev-arm: device name in AmbaFake accesses 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22847 Reviewed-by: Bobby R. Bruce Maintainer: Giacomo Travaglini Tested-by: kokoro --- src/dev/arm/amba_fake.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dev/arm/amba_fake.cc b/src/dev/arm/amba_fake.cc index 9c14140fb..fb08c4fa9 100644 --- a/src/dev/arm/amba_fake.cc +++ b/src/dev/arm/amba_fake.cc @@ -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(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; -- 2.30.2