diff mbox series

[3/7] hw/arm/mps2: Add CMSDK APB watchdog as unimplemented device

Message ID 20200616063157.16389-4-f4bug@amsat.org
State New
Headers show
Series mps2: Add few more peripherals | expand

Commit Message

Philippe Mathieu-Daudé June 16, 2020, 6:31 a.m. UTC
Register the watchdog peripheral as unimplemented to better
follow its accesses, for example booting Zephyr:

  ----------------
  IN: wdog_cmsdk_apb_init
  0x00000900:  b508       push     {r3, lr}
  0x00000902:  4b07       ldr      r3, [pc, #0x1c]
  0x00000904:  4a07       ldr      r2, [pc, #0x1c]
  0x00000906:  6018       str      r0, [r3]
  0x00000908:  4b07       ldr      r3, [pc, #0x1c]
  0x0000090a:  4808       ldr      r0, [pc, #0x20]
  0x0000090c:  f8c3 2c00  str.w    r2, [r3, #0xc00]
  0x00000910:  4a07       ldr      r2, [pc, #0x1c]
  0x00000912:  6812       ldr      r2, [r2]
  0x00000914:  601a       str      r2, [r3]
  0x00000916:  f000 f9f9  bl       #0xd0c
  cmsdk-apb-watchdog: unimplemented device write (size 4, value 0x1acce551, offset 0xc00)
  cmsdk-apb-watchdog: unimplemented device write (size 4, value 0xe4e1c00, offset 0x0)

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/arm/mps2.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Peter Maydell June 16, 2020, 10:17 a.m. UTC | #1
On Tue, 16 Jun 2020 at 07:32, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Register the watchdog peripheral as unimplemented to better
> follow its accesses, for example booting Zephyr:

We have a TYPE_CMSDK_APB_WATCHDOG device; so we could use
that, I think ?

thanks
-- PMM
Philippe Mathieu-Daudé June 16, 2020, 10:35 a.m. UTC | #2
On 6/16/20 12:17 PM, Peter Maydell wrote:
> On Tue, 16 Jun 2020 at 07:32, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>
>> Register the watchdog peripheral as unimplemented to better
>> follow its accesses, for example booting Zephyr:
> 
> We have a TYPE_CMSDK_APB_WATCHDOG device; so we could use
> that, I think ?

Oh I missed it, excellent! Thanks :)

> 
> thanks
> -- PMM
>
diff mbox series

Patch

diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c
index 1e8d5f21f9..570ec50aa8 100644
--- a/hw/arm/mps2.c
+++ b/hw/arm/mps2.c
@@ -314,6 +314,7 @@  static void mps2_common_init(MachineState *machine)
     sysbus_connect_irq(SYS_BUS_DEVICE(&mms->dualtimer), 0,
                        qdev_get_gpio_in(armv7m, 10));
     sysbus_mmio_map(SYS_BUS_DEVICE(&mms->dualtimer), 0, 0x40002000);
+    create_unimplemented_device("cmsdk-apb-watchdog", 0x40008000, 0x1000);
 
     sysbus_init_child_obj(OBJECT(mms), "scc", &mms->scc,
                           sizeof(mms->scc), TYPE_MPS2_SCC);