zynq: Request qemu reset when PSS_RESET_CTRL triggered.
PATCH 1/1 zynq: Request qemu reset when PSS_RESET_CTRL triggered.
If 1 is written to the SLCR's PSS_RESET_CTRL register request a qemu reset.
The RTEMS BSPs use this bit and if -no-reboot is used qemu exits cleanly.
--- hw/misc/zynq_slcr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
hw/misc/zynq_slcr.c +5 -1
@@ -394,7 +394,11 @@ static void zynq_slcr_write(void *opaque, hwaddr offset, case 0x1B0 ... 0x1D8: s->misc[(offset -0x1B0 ) /4 ] = val;break ; - case 0x200 ... 0x25C: +case 0x200 : +if (val ==1 ) { +qemu_system_reset_request (); + } + case 0x204 ... 0x25C:if (offset ==0x250 ) { goto bad_reg; }
Signature · 1 line
1.8.3.4 (Apple Git-47)
Quoted 15 lines · Chris Johns
If 1 is written to the SLCR's
PSS_RESET_CTRLregister request a qemu reset.The RTEMS BSPs use this bit and if -no-reboot is used qemu exits cleanly.
Signed-off-by Chris Johns <[email protected]>--- hw/misc/zynq_slcr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)hw/misc/zynq_slcr.c +0
-0
hw/misc/zynq_slcr.c static void zynq_slcr_write(void *opaque, hwaddr offset, · line 400
Quoted 8 lines
hw/misc/zynq_slcr.c +4
-1@@ -394,7 +394,11 @@ static void zynq_slcr_write(void *opaque, hwaddr offset, case 0x1B0 ... 0x1D8: s->misc[(offset -0x1B0 ) /4 ] = val;break ; - case 0x200 ... 0x25C: +case 0x200 : +if (val ==1 ) { +qemu_system_reset_request (); + }
Either missing "break" statement or missing "/* fall through */" comment.
Is this really a "reset on specific value written" rather than "bit 0 in the register is set to cause system reset"?
hw/misc/zynq_slcr.c static void zynq_slcr_write(void *opaque, hwaddr offset, · line 404
Quoted 4 lines
hw/misc/zynq_slcr.c +1
-0+ case 0x204 ... 0x25C:if (offset ==0x250 ) { goto bad_reg; }
thanks
-- PMM
Quoted 9 lines · Peter Maydell
Quoted 6 lines · Chris Johns
If 1 is written to the SLCR's
PSS_RESET_CTRLregister request a qemu reset.The RTEMS BSPs use this bit and if -no-reboot is used qemu exits cleanly.
Signed-off-by Chris Johns <[email protected]>[review comments]
Never mind, I see there's a newer version from somebody else already.
thanks
-- PMM