Browse Source

hw/misc/a9scu: Report unimplemented accesses with qemu_log_mask(UNIMP)

Report unimplemented register accesses using qemu_log_mask(UNIMP).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20200901144100.116742-5-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Philippe Mathieu-Daudé 5 năm trước cách đây
mục cha
commit
ae689ad7a8
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      hw/misc/a9scu.c

+ 6 - 0
hw/misc/a9scu.c

@@ -13,6 +13,7 @@
 #include "hw/qdev-properties.h"
 #include "hw/qdev-properties.h"
 #include "migration/vmstate.h"
 #include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qemu/log.h"
 #include "qemu/module.h"
 #include "qemu/module.h"
 
 
 #define A9_SCU_CPU_MAX  4
 #define A9_SCU_CPU_MAX  4
@@ -38,6 +39,8 @@ static uint64_t a9_scu_read(void *opaque, hwaddr offset,
     case 0x54: /* SCU Non-secure Access Control Register */
     case 0x54: /* SCU Non-secure Access Control Register */
         /* unimplemented, fall through */
         /* unimplemented, fall through */
     default:
     default:
+        qemu_log_mask(LOG_UNIMP, "%s: Unsupported offset 0x%"HWADDR_PRIx"\n",
+                      __func__, offset);
         return 0;
         return 0;
     }
     }
 }
 }
@@ -67,6 +70,9 @@ static void a9_scu_write(void *opaque, hwaddr offset,
     case 0x54: /* SCU Non-secure Access Control Register */
     case 0x54: /* SCU Non-secure Access Control Register */
         /* unimplemented, fall through */
         /* unimplemented, fall through */
     default:
     default:
+        qemu_log_mask(LOG_UNIMP, "%s: Unsupported offset 0x%"HWADDR_PRIx
+                                 " value 0x%"PRIx64"\n",
+                      __func__, offset, value);
         break;
         break;
     }
     }
 }
 }