[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 04/10] hw/fsi: Introduce IBM's FSI
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v5 04/10] hw/fsi: Introduce IBM's FSI |
Date: |
Thu, 19 Oct 2023 09:28:22 +0100 |
User-agent: |
Mutt/2.2.9 (2022-11-12) |
On Wed, Oct 11, 2023 at 10:13:33AM -0500, Ninad Palsule wrote:
> This is a part of patchset where IBM's Flexible Service Interface is
> introduced.
>
> This commit models the FSI bus. CFAM is hanging out of FSI bus. The bus
> is model such a way that it is embedded inside the FSI master which is a
> bus controller.
>
> The FSI master: A controller in the platform service processor (e.g.
> BMC) driving CFAM engine accesses into the POWER chip. At the
> hardware level FSI is a bit-based protocol supporting synchronous and
> DMA-driven accesses of engines in a CFAM.
>
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
> Reviewed-by: Joel Stanley <joel@jms.id.au>
> ---
> v2:
> - Incorporated review comments by Joel
> v5:
> - Incorporated review comments by Cedric.
> ---
> include/hw/fsi/fsi-master.h | 30 ++++++
> include/hw/fsi/fsi.h | 37 +++++++
> hw/fsi/cfam.c | 2 +-
> hw/fsi/fsi-master.c | 199 ++++++++++++++++++++++++++++++++++++
> hw/fsi/fsi.c | 54 ++++++++++
> hw/fsi/meson.build | 2 +-
> hw/fsi/trace-events | 2 +
> 7 files changed, 324 insertions(+), 2 deletions(-)
> create mode 100644 include/hw/fsi/fsi-master.h
> create mode 100644 include/hw/fsi/fsi.h
> create mode 100644 hw/fsi/fsi-master.c
> create mode 100644 hw/fsi/fsi.c
>
> +static void fsi_master_realize(DeviceState *dev, Error **errp)
> +{
> + FSIMasterState *s = FSI_MASTER(dev);
> + Error *err = NULL;
> +
> + qbus_init(&s->bus, sizeof(s->bus), TYPE_FSI_BUS, DEVICE(s), NULL);
> +
> + memory_region_init_io(&s->iomem, OBJECT(s), &fsi_master_ops, s,
> + TYPE_FSI_MASTER, 0x10000000);
> + memory_region_init(&s->opb2fsi, OBJECT(s), "fsi.opb2fsi", 0x10000000);
> +
> + object_property_set_bool(OBJECT(&s->bus), "realized", true, &err);
> + if (err) {
> + error_propagate(errp, err);
> + return;
> + }
Redundant Error object, just check return value of set_bool
> +
> + memory_region_add_subregion(&s->opb2fsi, 0, &s->bus.slave.mr);
> +}
> +static void fsi_bus_realize(BusState *bus, Error **errp)
> +{
> + FSIBus *s = FSI_BUS(bus);
> + Error *err = NULL;
> +
> + /* Note: Move it elsewhere when we add more CFAMs. */
> + object_property_set_bool(OBJECT(&s->slave), "realized", true, &err);
> + if (err) {
> + error_propagate(errp, err);
> + }
Likewise.
> +}
> +
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- Re: [PATCH v5 05/10] hw/fsi: IBM's On-chip Peripheral Bus, (continued)