All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gregory Anders" <greg@gpanders.com>
To: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Peter Maydell" <peter.maydell@linaro.org>
Cc: <qemu-devel@nongnu.org>, "Alistair Francis" <alistair@alistair23.me>
Subject: Re: [PATCH] hw/misc: zynq_slcr: set SLC_RST bit in REBOOT_STATUS register
Date: Sun, 03 Mar 2024 13:24:39 -0600	[thread overview]
Message-ID: <CZKD06O0WZK7.30UAMU1R3DWCD@gpanders.com> (raw)
In-Reply-To: <CAJy5ezo20Hh7QN6S70fu+akYjhiB_RR=teo+UPigMwzyyb6NzA@mail.gmail.com>

On Fri Mar 1, 2024 at 5:55 PM CST, Edgar E. Iglesias wrote:
> Hi,
>
> I don't have great answers unfortunately...
>
> We haven't been super consistent with these things but on the ZynqMP we
> sometimes require the user to apply ROM behaviour using -device loader on
> the command-line (not great for this case since we wouldn't want the mask
> to be set until a soft reset) or we conditionalize the ROM behaviour
> checking if we're doing direct Linux boots..
>
> Best regards,
> Edgar
>

Hi Edgar,

Perhaps it would be helpful if I explained my use case.

In our design we use the soft reset feature of the Zynq to reboot the
computer into one of two different applications. We use the persistent
bits in the REBOOT_STATUS register to store a small amount of state
which is then read in the bootloader to determine which application to
boot into.

As part of that process we also test the SLC_RST bit in the
REBOOT_STATUS register so that those bits are only considered when a
soft reset was performed by the software.

We would like to test this code path in QEMU, but it is not possible at
present since QEMU does not set the SLC_RST bit. So when QEMU performs
the soft CPU reset, our boot code does not consider the persistent bits
in the REBOOT_STATUS register.

If there is another way to do this (e.g. using a -device option, as you
mentioned) then I will gladly consider it, but setting the bit in QEMU
seems simplest to me (we have a fork of QEMU that we maintain with some
other patches, so we can apply this patch ourselves if required, but of
course it's easier for us to upstream and can hopefully benefit others
as well).

Thanks,

Gregory


      reply	other threads:[~2024-03-03 19:25 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
2024-03-01 23:55   ` Edgar E. Iglesias
2024-03-03 19:24     ` Gregory Anders [this message]

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=CZKD06O0WZK7.30UAMU1R3DWCD@gpanders.com \
    --to=greg@gpanders.com \
    --cc=alistair@alistair23.me \
    --cc=edgar.iglesias@gmail.com \
    --cc=peter.maydell@linaro.org \
    --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.