qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: Bin Meng <bin.meng@windriver.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	qemu-riscv@nongnu.org, qemu-devel@nongnu.org,
	Conor Dooley <conor.dooley@microchip.com>
Subject: Re: [PATCH v2 3/3] hw/{misc, riscv}: pfsoc: add system controller as unimplemented
Date: Sun, 13 Nov 2022 21:19:59 +0000	[thread overview]
Message-ID: <Y3Fff6710GfvPrgc@spud> (raw)
In-Reply-To: <ded28709-24c7-0e41-f507-277fccfbfecf@linaro.org>

On Sun, Nov 13, 2022 at 08:30:42PM +0100, Philippe Mathieu-Daudé wrote:
> Hi Conor,
> 
> On 12/11/22 14:34, Conor Dooley wrote:
> > From: Conor Dooley <conor.dooley@microchip.com>
> > 
> > The system controller on PolarFire SoC is access via a mailbox. The
> > control registers for this mailbox lie in the "IOSCB" region & the
> > interrupt is cleared via write to the "SYSREG" region. It also has a
> > QSPI controller, usually connected to a flash chip, that is used for
> > storing FPGA bitstreams and used for In-Application Programming (IAP).
> > 
> > Linux has an implementation of the system controller, through which the
> > hwrng is accessed, leading to load/store access faults.
> > 
> > Add the QSPI as unimplemented and a very basic (effectively
> > unimplemented) version of the system controller's mailbox. Rather than
> > purely marking the regions as unimplemented, service the mailbox
> > requests by reporting failures and raising the interrupt so a guest can
> > better handle the lack of support.
> > 
> > Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> > ---
> >   hw/misc/mchp_pfsoc_ioscb.c          | 59 ++++++++++++++++++++++++++++-
> >   hw/misc/mchp_pfsoc_sysreg.c         | 19 ++++++++--
> >   hw/riscv/microchip_pfsoc.c          |  6 +++
> >   include/hw/misc/mchp_pfsoc_ioscb.h  |  3 ++
> >   include/hw/misc/mchp_pfsoc_sysreg.h |  1 +
> >   include/hw/riscv/microchip_pfsoc.h  |  1 +
> >   6 files changed, 83 insertions(+), 6 deletions(-)
> 
> > @@ -52,10 +54,18 @@ static uint64_t mchp_pfsoc_sysreg_read(void *opaque, hwaddr offset,
> >   static void mchp_pfsoc_sysreg_write(void *opaque, hwaddr offset,
> >                                       uint64_t value, unsigned size)
> >   {
> > -    qemu_log_mask(LOG_UNIMP, "%s: unimplemented device write "
> > -                  "(size %d, value 0x%" PRIx64
> > -                  ", offset 0x%" HWADDR_PRIx ")\n",
> > -                  __func__, size, value, offset);
> > +    MchpPfSoCSysregState *s = opaque;
> > +    qemu_irq_lower(s->irq);
> 
> Is this always lowered IRQ line wanted? ...
> 
> > +    switch (offset) {
> > +    case MESSAGE_INT:
> > +        qemu_irq_lower(s->irq);
> 
> ... since we do it here.

Probably just me pressing the y key instead of the d one.
I'll sort that out for v3, thanks!

> > +        break;
> > +    default:
> > +        qemu_log_mask(LOG_UNIMP, "%s: unimplemented device write "
> > +                      "(size %d, value 0x%" PRIx64
> > +                      ", offset 0x%" HWADDR_PRIx ")\n",
> > +                      __func__, size, value, offset);
> > +    }
> >   }
> 
> 


  reply	other threads:[~2022-11-13 21:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-12 13:34 [PATCH v2 0/3] Add (more) missing PolarFire SoC io regions Conor Dooley
2022-11-12 13:34 ` [PATCH v2 1/3] hw/misc/pfsoc: add fabric clocks to ioscb Conor Dooley
2022-11-14  2:14   ` Alistair Francis
2022-11-12 13:34 ` [PATCH v2 2/3] hw/riscv: pfsoc: add missing FICs as unimplemented Conor Dooley
2022-11-14  2:18   ` Alistair Francis
2022-11-12 13:34 ` [PATCH v2 3/3] hw/{misc, riscv}: pfsoc: add system controller " Conor Dooley
2022-11-13 19:30   ` Philippe Mathieu-Daudé
2022-11-13 21:19     ` Conor Dooley [this message]
2022-11-17 17:00   ` Conor Dooley
2022-11-18  7:04     ` Philippe Mathieu-Daudé

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=Y3Fff6710GfvPrgc@spud \
    --to=conor@kernel.org \
    --cc=alistair.francis@wdc.com \
    --cc=bin.meng@windriver.com \
    --cc=conor.dooley@microchip.com \
    --cc=palmer@dabbelt.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).