All of lore.kernel.org
 help / color / mirror / Atom feed
* Re%3A [PATCH v4 1%2F2] hw%2Fwatchdog%3A Implement SBSA watchdog device&In-Reply-To=<CAD8XO3YmTC7fzxttg%3DQLMpJbg7uLogatxN7q7vf-iGZjyQLjjQ%40mail.gmail.com>
@ 2020-10-09 17:30 Shashi Mallela
  2020-10-09 17:51 ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Shashi Mallela @ 2020-10-09 17:30 UTC (permalink / raw)
  To: Maxim Uvarov; +Cc: peter.maydell, qemu-arm, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 381 bytes --]

The value being returned here is 0 (initialized to 0 at the beginning of read function).
I have seen similar practices being followed in other qemu implementations like for example bcm2835_dma_read() in qemu/hw/dma/bcm2835_dma.c,a9_scu_read() in qemu/hw/misc/a9scu.c.

Please confirm if you would still like to add specific value like 0xdeadbeef for bad read offset.
Thanks
Shashi

[-- Attachment #2: Type: text/html, Size: 704 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re%3A [PATCH v4 1%2F2] hw%2Fwatchdog%3A Implement SBSA watchdog device&In-Reply-To=<CAD8XO3YmTC7fzxttg%3DQLMpJbg7uLogatxN7q7vf-iGZjyQLjjQ%40mail.gmail.com>
  2020-10-09 17:30 Re%3A [PATCH v4 1%2F2] hw%2Fwatchdog%3A Implement SBSA watchdog device&In-Reply-To=<CAD8XO3YmTC7fzxttg%3DQLMpJbg7uLogatxN7q7vf-iGZjyQLjjQ%40mail.gmail.com> Shashi Mallela
@ 2020-10-09 17:51 ` Peter Maydell
  2020-10-12  8:07   ` Maxim Uvarov
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2020-10-09 17:51 UTC (permalink / raw)
  To: Shashi Mallela; +Cc: Maxim Uvarov, qemu-devel, qemu-arm

On Fri, 9 Oct 2020 at 18:30, Shashi Mallela <shashi.mallela@linaro.org> wrote:
>
> The value being returned here is 0 (initialized to 0 at the beginning of read function).
> I have seen similar practices being followed in other qemu implementations like for example bcm2835_dma_read() in qemu/hw/dma/bcm2835_dma.c,a9_scu_read() in qemu/hw/misc/a9scu.c.
>
> Please confirm if you would still like to add specific value like 0xdeadbeef for bad read offset.

Judging by the subject line you've mangled the headers on this
email so I'm not sure exactly what this was a reply to,
but in general QEMU doesn't do that kind of "return
specific marker values for bad register offsets". We
typically log it with a qemu_log_mask(LOG_GUEST_ERROR) and
return 0 (unless the h/w does something else).

thanks
-- PMM


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re%3A [PATCH v4 1%2F2] hw%2Fwatchdog%3A Implement SBSA watchdog device&In-Reply-To=<CAD8XO3YmTC7fzxttg%3DQLMpJbg7uLogatxN7q7vf-iGZjyQLjjQ%40mail.gmail.com>
  2020-10-09 17:51 ` Peter Maydell
@ 2020-10-12  8:07   ` Maxim Uvarov
  0 siblings, 0 replies; 3+ messages in thread
From: Maxim Uvarov @ 2020-10-12  8:07 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Shashi Mallela, qemu-arm, qemu-devel

> +static uint64_t sbsa_gwdt_rread(void *opaque, hwaddr addr, unsigned int size)
> +{
> +    uint32_t ret;
> +
> +    if (addr == SBSA_GWDT_WRR) {
> +        /* watch refresh read has no effect and returns 0 */
> +        ret = 0;
> +    } else {
> +        qemu_log_mask(LOG_GUEST_ERROR, "bad address in refresh frame read :"
> +

Then it has to be  uint32_t ret = 0;

On Fri, 9 Oct 2020 at 20:51, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Fri, 9 Oct 2020 at 18:30, Shashi Mallela <shashi.mallela@linaro.org> wrote:
> >
> > The value being returned here is 0 (initialized to 0 at the beginning of read function).
> > I have seen similar practices being followed in other qemu implementations like for example bcm2835_dma_read() in qemu/hw/dma/bcm2835_dma.c,a9_scu_read() in qemu/hw/misc/a9scu.c.
> >
> > Please confirm if you would still like to add specific value like 0xdeadbeef for bad read offset.
>
> Judging by the subject line you've mangled the headers on this
> email so I'm not sure exactly what this was a reply to,
> but in general QEMU doesn't do that kind of "return
> specific marker values for bad register offsets". We
> typically log it with a qemu_log_mask(LOG_GUEST_ERROR) and
> return 0 (unless the h/w does something else).
>
> thanks
> -- PMM


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-12  8:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 17:30 Re%3A [PATCH v4 1%2F2] hw%2Fwatchdog%3A Implement SBSA watchdog device&In-Reply-To=<CAD8XO3YmTC7fzxttg%3DQLMpJbg7uLogatxN7q7vf-iGZjyQLjjQ%40mail.gmail.com> Shashi Mallela
2020-10-09 17:51 ` Peter Maydell
2020-10-12  8:07   ` Maxim Uvarov

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.