[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 2/8] vt82c686: QOM-ify superio related functionality
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v6 2/8] vt82c686: QOM-ify superio related functionality |
Date: |
Wed, 10 Mar 2021 00:58:05 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 3/9/21 9:28 PM, BALATON Zoltan wrote:
> Collect superio functionality and its controlling config registers
> handling in an abstract VIA_SUPERIO class that is a subclass of
> ISA_SUPERIO and put vt82c686b specific parts in a subclass of this
> abstract class.
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
> hw/isa/vt82c686.c | 240 ++++++++++++++++++++++++--------------
> include/hw/isa/vt82c686.h | 1 -
> 2 files changed, 150 insertions(+), 91 deletions(-)
> static MemoryRegion *find_subregion(ISADevice *d, MemoryRegion *parent,
> int offs)
> @@ -270,10 +279,76 @@ static MemoryRegion *find_subregion(ISADevice *d,
> MemoryRegion *parent,
> return mr;
> }
>
> -static void superio_cfg_write(void *opaque, hwaddr addr, uint64_t data,
> - unsigned size)
> +static void via_superio_realize(DeviceState *d, Error **errp)
> +{
> + ViaSuperIOState *s = VIA_SUPERIO(d);
> + ISASuperIOClass *ic = ISA_SUPERIO_GET_CLASS(s);
> + int i;
> +
> + assert(s->io_ops);
> + ic->parent_realize(d, errp);
> + if (*errp) {
Unfortunately this doesn't work because errp can be NULL...
This is described in "qapi/error.h". You have to use a local_err.
> + return;
> + }
- [PATCH v6 0/8] Pegasos2 emulation, BALATON Zoltan, 2021/03/09
- [PATCH v6 5/8] vt82c686: Add emulation of VT8231 south bridge, BALATON Zoltan, 2021/03/09
- [PATCH v6 4/8] vt82c686: Introduce abstract TYPE_VIA_ISA and base vt82c686b_isa on it, BALATON Zoltan, 2021/03/09
- [PATCH v6 6/8] hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM, BALATON Zoltan, 2021/03/09
- [PATCH v6 3/8] vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO, BALATON Zoltan, 2021/03/09
- [PATCH v6 2/8] vt82c686: QOM-ify superio related functionality, BALATON Zoltan, 2021/03/09
- Re: [PATCH v6 2/8] vt82c686: QOM-ify superio related functionality,
Philippe Mathieu-Daudé <=
- [PATCH v6 8/8] hw/ppc: Add emulation of Genesi/bPlan Pegasos II, BALATON Zoltan, 2021/03/09
- [PATCH v6 7/8] hw/pci-host: Add emulation of Marvell MV64361 PPC system controller, BALATON Zoltan, 2021/03/09
- [PATCH v6 1/8] vt82c686: Implement control of serial port io ranges via config regs, BALATON Zoltan, 2021/03/09