All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Gregory Anders <greg@gpanders.com>
Cc: qemu-devel@nongnu.org,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	 Alistair Francis <alistair@alistair23.me>
Subject: Re: [PATCH] hw/misc: zynq_slcr: set SLC_RST bit in REBOOT_STATUS register
Date: Fri, 1 Mar 2024 16:40:32 +0000	[thread overview]
Message-ID: <CAFEAcA-wrdUaH55ZmoCQAQ=zV=seaCo2hciXys_p4tKE08Tf3w@mail.gmail.com> (raw)
In-Reply-To: <20240227222227.74935-1-greg@gpanders.com>

On Wed, 28 Feb 2024 at 01:40, Gregory Anders <greg@gpanders.com> wrote:
>
> When the CPU is reset using PSS_RST_CTRL in the SLCR, bit 19 in
> REBOOT_STATUS should be set.
>
> Refer to page 1602 of the Xilinx Zynq 7000 Technical Reference Manual.
>
> Signed-off-by: Gregory Anders <greg@gpanders.com>
> ---
>  hw/misc/zynq_slcr.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c
> index d2ac2e77f2..a8f1792bf6 100644
> --- a/hw/misc/zynq_slcr.c
> +++ b/hw/misc/zynq_slcr.c
> @@ -120,6 +120,7 @@ REG32(RS_AWDT_CTRL, 0x24c)
>  REG32(RST_REASON, 0x250)
>
>  REG32(REBOOT_STATUS, 0x258)
> +    FIELD(REBOOT_STATUS, SLC_RST, 19, 1)
>  REG32(BOOT_MODE, 0x25c)
>
>  REG32(APU_CTRL, 0x300)
> @@ -562,6 +563,7 @@ static void zynq_slcr_write(void *opaque, hwaddr offset,
>      switch (offset) {
>      case R_PSS_RST_CTRL:
>          if (FIELD_EX32(val, PSS_RST_CTRL, SOFT_RST)) {
> +            s->regs[R_REBOOT_STATUS] |= R_REBOOT_STATUS_SLC_RST_MASK;
>              qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
>          }
>          break;
> --

The manual also says that "This field is written by ROM code",
so as a model of the hardware should QEMU be writing it?

I've cc'd the Zynq maintainers for their opinion.

thanks
-- PMM


  reply	other threads:[~2024-03-01 16:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 22:22 [PATCH] hw/misc: zynq_slcr: set SLC_RST bit in REBOOT_STATUS register Gregory Anders
2024-03-01 16:40 ` Peter Maydell [this message]
2024-03-01 23:55   ` Edgar E. Iglesias
2024-03-03 19:24     ` Gregory Anders

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA-wrdUaH55ZmoCQAQ=zV=seaCo2hciXys_p4tKE08Tf3w@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=alistair@alistair23.me \
    --cc=edgar.iglesias@gmail.com \
    --cc=greg@gpanders.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.