]> Git Repo - qemu.git/commitdiff
hw/misc/grlib_ahb_apb_pnp: Add trace events on read accesses
authorPhilippe Mathieu-Daudé <[email protected]>
Tue, 31 Mar 2020 10:02:47 +0000 (12:02 +0200)
committerPhilippe Mathieu-Daudé <[email protected]>
Tue, 9 Jun 2020 07:21:10 +0000 (09:21 +0200)
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: KONRAD Frederic <[email protected]>
Message-Id: <20200331105048[email protected]>

hw/misc/grlib_ahb_apb_pnp.c
hw/misc/trace-events

index d22ed00206b2455b6e968a87c9a836299aee02ae..43e001c3c7b78a0e6b1e9cd7ddbf7dabd57f3a3d 100644 (file)
@@ -25,6 +25,7 @@
 #include "qemu/log.h"
 #include "hw/sysbus.h"
 #include "hw/misc/grlib_ahb_apb_pnp.h"
+#include "trace.h"
 
 #define GRLIB_PNP_VENDOR_SHIFT (24)
 #define GRLIB_PNP_VENDOR_SIZE   (8)
@@ -132,8 +133,12 @@ void grlib_ahb_pnp_add_entry(AHBPnp *dev, uint32_t address, uint32_t mask,
 static uint64_t grlib_ahb_pnp_read(void *opaque, hwaddr offset, unsigned size)
 {
     AHBPnp *ahb_pnp = GRLIB_AHB_PNP(opaque);
+    uint32_t val;
 
-    return ahb_pnp->regs[offset >> 2];
+    val = ahb_pnp->regs[offset >> 2];
+    trace_grlib_ahb_pnp_read(offset, val);
+
+    return val;
 }
 
 static void grlib_ahb_pnp_write(void *opaque, hwaddr addr,
@@ -239,8 +244,12 @@ void grlib_apb_pnp_add_entry(APBPnp *dev, uint32_t address, uint32_t mask,
 static uint64_t grlib_apb_pnp_read(void *opaque, hwaddr offset, unsigned size)
 {
     APBPnp *apb_pnp = GRLIB_APB_PNP(opaque);
+    uint32_t val;
+
+    val = apb_pnp->regs[offset >> 2];
+    trace_grlib_apb_pnp_read(offset, val);
 
-    return apb_pnp->regs[offset >> 2];
+    return val;
 }
 
 static void grlib_apb_pnp_write(void *opaque, hwaddr addr,
index 0cb4c64ae71466798e878d36f8ec067017f02be5..556174686698f6e937f4411878f9087cff9b59ed 100644 (file)
@@ -202,3 +202,7 @@ via1_rtc_cmd_pram_read(int addr, int value) "addr=%u value=0x%02x"
 via1_rtc_cmd_pram_write(int addr, int value) "addr=%u value=0x%02x"
 via1_rtc_cmd_pram_sect_read(int sector, int offset, int addr, int value) "sector=%u offset=%u addr=%d value=0x%02x"
 via1_rtc_cmd_pram_sect_write(int sector, int offset, int addr, int value) "sector=%u offset=%u addr=%d value=0x%02x"
+
+# grlib_ahb_apb_pnp.c
+grlib_ahb_pnp_read(uint64_t addr, uint32_t value) "AHB PnP read addr:0x%03"PRIx64" data:0x%08x"
+grlib_apb_pnp_read(uint64_t addr, uint32_t value) "APB PnP read addr:0x%03"PRIx64" data:0x%08x"
This page took 0.028841 seconds and 4 git commands to generate.