From: Havard Skinnemoen <hskinnemoen@google.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Cédric Le Goater" <clg@kaod.org>,
"Joel Stanley" <joel@jms.id.au>, qemu-arm <qemu-arm@nongnu.org>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"IS20 Avi Fishman" <Avi.Fishman@nuvoton.com>,
"CS20 KFTing" <kfting@nuvoton.com>
Subject: Re: [PATCH v3 08/12] hw/nvram: NPCM7xx OTP device model
Date: Fri, 3 Jul 2020 14:07:44 -0700 [thread overview]
Message-ID: <CAFQmdRYZWhA-957jRHfiRHfYoOk-c2TJVtqoz6LMOhDgJwMiCg@mail.gmail.com> (raw)
In-Reply-To: <abdb209d-7268-7997-2caa-95cb984269da@amsat.org>
On Fri, Jul 3, 2020 at 6:46 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> On 6/27/20 1:55 AM, Havard Skinnemoen wrote:
> > +static void npcm7xx_otp_realize(DeviceState *dev, Error **errp)
> > +{
> > + NPCM7xxOTPClass *oc = NPCM7XX_OTP_GET_CLASS(dev);
> > + NPCM7xxOTPState *s = NPCM7XX_OTP(dev);
> > + SysBusDevice *sbd = &s->parent;
> > +
> > + s->array = g_malloc0(NPCM7XX_OTP_ARRAY_BYTES);
>
> The possibility to reuse persistent OTP seems important.
> This can be added later of course.
Agree, it's an important part of the behavior of the module. But it's
not essential to be able to boot a BMC firmware image, so I left it
out initially.
> See simple example in hw/nvram/eeprom_at24c.c which use
> a BlockBackend so the OTP content is not lost after reset
> or migration.
I'll take a look at that, thanks!
> > +
> > + memory_region_init_io(&s->mmio, OBJECT(s), oc->mmio_ops, s, "regs",
> > + NPCM7XX_OTP_REGS_SIZE);
> > + sysbus_init_mmio(sbd, &s->mmio);
> > +}
> > +
> > +static void npcm7xx_otp_class_init(ObjectClass *klass, void *data)
> > +{
> > + ResettableClass *rc = RESETTABLE_CLASS(klass);
> > + DeviceClass *dc = DEVICE_CLASS(klass);
> > +
>
> Missing migration vmstate for NPCM7xxOTPState::regs[].
Ah, you're right. This is probably true for most of the peripherals in
this series. I'll see if I can get it sorted out for the next
iteration.
next prev parent reply other threads:[~2020-07-03 21:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-26 23:55 [PATCH v3 00/12] Add Nuvoton NPCM730/NPCM750 SoCs and two BMC machines Havard Skinnemoen
2020-06-26 23:55 ` [PATCH v3 01/12] npcm7xx: Add config symbol Havard Skinnemoen
2020-06-26 23:55 ` [PATCH v3 02/12] hw/misc: Add NPCM7xx System Global Control Registers device model Havard Skinnemoen
2020-06-26 23:55 ` [PATCH v3 03/12] hw/misc: Add NPCM7xx Clock Controller " Havard Skinnemoen
2020-06-26 23:55 ` [PATCH v3 04/12] hw/timer: Add NPCM7xx Timer " Havard Skinnemoen
2020-06-26 23:55 ` [PATCH v3 05/12] hw/arm: Add NPCM730 and NPCM750 SoC models Havard Skinnemoen
2020-07-03 13:32 ` Philippe Mathieu-Daudé
2020-07-03 20:56 ` Havard Skinnemoen
2020-07-03 22:27 ` Philippe Mathieu-Daudé
2020-06-26 23:55 ` [PATCH v3 06/12] hw/arm: Add two NPCM7xx-based machines Havard Skinnemoen
2020-06-26 23:55 ` [PATCH v3 07/12] hw/arm: Load -bios image as a boot ROM for npcm7xx Havard Skinnemoen
2020-06-26 23:55 ` [PATCH v3 08/12] hw/nvram: NPCM7xx OTP device model Havard Skinnemoen
2020-07-03 13:46 ` Philippe Mathieu-Daudé
2020-07-03 21:07 ` Havard Skinnemoen [this message]
2020-07-03 21:19 ` Havard Skinnemoen
2020-07-03 21:34 ` Philippe Mathieu-Daudé
2020-07-03 22:24 ` Philippe Mathieu-Daudé
2020-07-04 0:50 ` Havard Skinnemoen
2020-06-26 23:55 ` [PATCH v3 09/12] hw/mem: Stubbed out NPCM7xx Memory Controller model Havard Skinnemoen
2020-06-26 23:55 ` [PATCH v3 10/12] hw/ssi: NPCM7xx Flash Interface Unit device model Havard Skinnemoen
2020-06-26 23:55 ` [PATCH v3 11/12] hw/arm: Wire up BMC boot flash for npcm750-evb and quanta-gsj Havard Skinnemoen
2020-06-26 23:55 ` [PATCH v3 12/12] docs/system: Add Nuvoton machine documentation Havard Skinnemoen
2020-07-03 16:35 ` Philippe Mathieu-Daudé
2020-07-03 21:02 ` Havard Skinnemoen
2020-06-27 0:15 ` [PATCH v3 00/12] Add Nuvoton NPCM730/NPCM750 SoCs and two BMC machines no-reply
2020-07-03 12:27 ` Peter Maydell
2020-07-03 13:35 ` Philippe Mathieu-Daudé
2020-07-03 21:15 ` Havard Skinnemoen
2020-07-03 22:33 ` Philippe Mathieu-Daudé
2020-07-03 20:41 ` Havard Skinnemoen
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=CAFQmdRYZWhA-957jRHfiRHfYoOk-c2TJVtqoz6LMOhDgJwMiCg@mail.gmail.com \
--to=hskinnemoen@google.com \
--cc=Avi.Fishman@nuvoton.com \
--cc=clg@kaod.org \
--cc=f4bug@amsat.org \
--cc=joel@jms.id.au \
--cc=kfting@nuvoton.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.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 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).