qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ninad Palsule <ninad@linux.ibm.com>
To: "Cédric Le Goater" <clg@kaod.org>,
	qemu-devel@nongnu.org, peter.maydell@linaro.org,
	andrew@codeconstruct.com.au, joel@jms.id.au, pbonzini@redhat.com,
	marcandre.lureau@redhat.com, berrange@redhat.com,
	thuth@redhat.com, philmd@linaro.org, lvivier@redhat.com
Cc: qemu-arm@nongnu.org
Subject: Re: [PATCH v6 09/10] hw/fsi: Added FSI documentation
Date: Thu, 26 Oct 2023 10:32:31 -0500	[thread overview]
Message-ID: <fd4ca25e-a1b2-4ce1-828f-efbc88d00f3c@linux.ibm.com> (raw)
In-Reply-To: <ee85f3d0-7ec8-47d5-b157-60d103553502@kaod.org>

Hello Cedric,


On 10/24/23 02:37, Cédric Le Goater wrote:
> On 10/21/23 23:17, Ninad Palsule wrote:
>> Documentation for IBM FSI model.
>>
>> Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
>> ---
>> v4:
>>    - Added separate commit for documentation
>> ---
>>   docs/specs/fsi.rst | 141 +++++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 141 insertions(+)
>>   create mode 100644 docs/specs/fsi.rst
>
>
> Documentation build is broken.
>
> a 'fsi" entry should be added in docs/specs/index.rst. More below.
Sorry about that. Added entry in the index.rst
>
>
>
>> diff --git a/docs/specs/fsi.rst b/docs/specs/fsi.rst
>> new file mode 100644
>> index 0000000000..73b082afe1
>> --- /dev/null
>> +++ b/docs/specs/fsi.rst
>> @@ -0,0 +1,141 @@
>> +======================================
>> +IBM's Flexible Service Interface (FSI)
>> +======================================
>> +
>> +The QEMU FSI emulation implements hardware interfaces between ASPEED 
>> SOC, FSI
>> +master/slave and the end engine.
>> +
>> +FSI is a point-to-point two wire interface which is capable of 
>> supporting
>> +distances of up to 4 meters. FSI interfaces have been used 
>> successfully for
>> +many years in IBM servers to attach IBM Flexible Support 
>> Processors(FSP) to
>> +CPUs and IBM ASICs.
>> +
>> +FSI allows a service processor access to the internal buses of a 
>> host POWER
>> +processor to perform configuration or debugging. FSI has long 
>> existed in POWER
>> +processes and so comes with some baggage, including how it has been 
>> integrated
>> +into the ASPEED SoC.
>> +
>> +Working backwards from the POWER processor, the fundamental pieces 
>> of interest
>> +for the implementation are:
>> +
>> +1. The Common FRU Access Macro (CFAM), an address space containing 
>> various
>> +   "engines" that drive accesses on buses internal and external to 
>> the POWER
>> +   chip. Examples include the SBEFIFO and I2C masters. The engines 
>> hang off of
>> +   an internal Local Bus (LBUS) which is described by the CFAM 
>> configuration
>> +   block.
>> +
>> +2. The FSI slave: The slave is the terminal point of the FSI bus for 
>> FSI
>> +   symbols addressed to it. Slaves can be cascaded off of one 
>> another. The
>> +   slave's configuration registers appear in address space of the 
>> CFAM to
>> +   which it is attached.
>> +
>> +3. 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.
>> +
>> +4. The On-Chip Peripheral Bus (OPB): A low-speed bus typically found 
>> in POWER
>> +   processors. This now makes an appearance in the ASPEED SoC due to 
>> tight
>> +   integration of the FSI master IP with the OPB, mainly the 
>> existence of an
>> +   MMIO-mapping of the CFAM address straight onto a sub-region of 
>> the OPB
>> +   address space.
>> +
>> +5. An APB-to-OPB bridge enabling access to the OPB from the ARM core 
>> in the
>> +   AST2600. Hardware limitations prevent the OPB from being directly 
>> mapped
>> +   into APB, so all accesses are indirect through the bridge.
>> +
>> +The LBUS is modelled to maintain the qdev bus hierarchy and to take 
>> advantages
>> +of the object model to automatically generate the CFAM configuration 
>> block.
>> +The configuration block presents engines in the order they are 
>> attached to the
>> +CFAM's LBUS. Engine implementations should subclass the LBusDevice 
>> and set the
>> +'config' member of LBusDeviceClass to match the engine's type.
>> +
>> +CFAM designs offer a lot of flexibility, for instance it is possible 
>> for a
>> +CFAM to be simultaneously driven from multiple FSI links. The 
>> modeling is not
>> +so complete; it's assumed that each CFAM is attached to a single FSI 
>> slave (as
>> +a consequence the CFAM subclasses the FSI slave).
>> +
>> +As for FSI, its symbols and wire-protocol are not modelled at all. 
>> This is not
>> +necessary to get FSI off the ground thanks to the mapping of the 
>> CFAM address
>> +space onto the OPB address space - the models follow this directly 
>> and map the
>> +CFAM memory region into the OPB's memory region.
>> +
>> +QEMU files related to FSI interface:
>> + - ``hw/fsi/aspeed-apb2opb.c``
>> + - ``include/hw/fsi/aspeed-apb2opb.h``
>> + - ``hw/fsi/opb.c``
>> + - ``include/hw/fsi/opb.h``
>> + - ``hw/fsi/fsi.c``
>> + - ``include/hw/fsi/fsi.h``
>> + - ``hw/fsi/fsi-master.c``
>> + - ``include/hw/fsi/fsi-master.h``
>> + - ``hw/fsi/fsi-slave.c``
>> + - ``include/hw/fsi/fsi-slave.h``
>> + - ``hw/fsi/cfam.c``
>> + - ``include/hw/fsi/cfam.h``
>> + - ``hw/fsi/engine-scratchpad.c``
>> + - ``include/hw/fsi/engine-scratchpad.h``
>> + - ``include/hw/fsi/lbus.h``
>> +
>> +The following commands start the rainier machine with built-in FSI 
>> model.
>> +There are no model specific arguments.
>> +
>> +.. code-block:: console
>> +
>> +  qemu-system-arm -M rainier-bmc -nographic \
>> +  -kernel fitImage-linux.bin \
>> +  -dtb aspeed-bmc-ibm-rainier.dtb \
>> +  -initrd obmc-phosphor-initramfs.rootfs.cpio.xz \
>> +  -drive file=obmc-phosphor-image.rootfs.wic.qcow2,if=sd,index=2 \
>> +  -append "rootwait console=ttyS4,115200n8 root=PARTLABEL=rofs-a"
>> +
>> +The implementation appears as following in the qemu device tree:
>> +
>> +.. code-block:: console
>> +
>> +  (qemu) info qtree
>> +  bus: main-system-bus
>> +    type System
>> +    ...
>> +    dev: aspeed.apb2opb, id ""
>> +      gpio-out "sysbus-irq" 1
>> +      mmio 000000001e79b000/0000000000001000
>> +      bus: opb.1
>> +        type opb
>> +        dev: fsi.master, id ""
>> +          bus: fsi.bus.1
>> +            type fsi.bus
>> +            dev: cfam.config, id ""
>> +            dev: cfam, id ""
>> +              bus: lbus.1
>> +                type lbus
>> +                dev: scratchpad, id ""
>> +                  address = 0 (0x0)
>> +      bus: opb.0
>> +        type opb
>> +        dev: fsi.master, id ""
>> +          bus: fsi.bus.0
>> +            type fsi.bus
>> +            dev: cfam.config, id ""
>> +            dev: cfam, id ""
>> +              bus: lbus.0
>> +                type lbus
>> +                dev: scratchpad, id ""
>> +                  address = 0 (0x0)
>> +
>> +pdbg is a simple application to allow debugging of the host POWER 
>> processors
>> +from the BMC. (see the `pdbg source repository` for more details)
>
> + from the BMC. (see the  ``pdbg source repository`` for more details)
>
> Please check before sending.

Sorry about that. Fixed it. Checked it using "rstcheck" tool and also 
through web browser.

Thanks for the review.

Regards,

Ninad

>
> Thanks,
>
> C.
>
>
>> +
>> +.. code-block:: console
>> +
>> +  root@p10bmc:~# pdbg -a getcfam 0x0
>> +  p0: 0x0 = 0xc0022d15
>> +
>> +Refer following documents for more details.
>> +
>> +.. _FSI specification:
>> +   https://openpowerfoundation.org/specifications/fsi/
>> + https://wiki.raptorcs.com/w/images/9/97/OpenFSI-spec-20161212.pdf
>> +
>> +.. _pdbg source repository:
>> +   https://github.com/open-power/pdbg
>


  reply	other threads:[~2023-10-26 15:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-21 21:17 [PATCH v6 00/10] Introduce model for IBM's FSI Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 01/10] hw/fsi: Introduce IBM's Local bus Ninad Palsule
2023-10-23 14:58   ` Philippe Mathieu-Daudé
2023-10-23 17:10     ` Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 02/10] hw/fsi: Introduce IBM's scratchpad Ninad Palsule
2023-10-23 15:00   ` Philippe Mathieu-Daudé
2023-10-23 17:08     ` Ninad Palsule
2023-10-24  7:08       ` Philippe Mathieu-Daudé
2023-10-26 15:24         ` Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 03/10] hw/fsi: Introduce IBM's cfam,fsi-slave Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 04/10] hw/fsi: Introduce IBM's FSI Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 05/10] hw/fsi: IBM's On-chip Peripheral Bus Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 06/10] hw/fsi: Aspeed APB2OPB interface Ninad Palsule
2023-10-24  7:46   ` Cédric Le Goater
2023-10-24 15:00     ` Ninad Palsule
2023-10-24 15:21       ` Cédric Le Goater
2023-10-24 18:42         ` Ninad Palsule
2023-10-26 15:27         ` Ninad Palsule
2023-10-27  5:25           ` Andrew Jeffery
2023-10-21 21:17 ` [PATCH v6 07/10] hw/arm: Hook up FSI module in AST2600 Ninad Palsule
2023-10-23 15:03   ` Philippe Mathieu-Daudé
2023-10-21 21:17 ` [PATCH v6 08/10] hw/fsi: Added qtest Ninad Palsule
2023-10-23  6:51   ` Thomas Huth
2023-10-23 15:25     ` Ninad Palsule
2023-10-24  7:34   ` Cédric Le Goater
2023-10-26 15:30     ` Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 09/10] hw/fsi: Added FSI documentation Ninad Palsule
2023-10-24  7:37   ` Cédric Le Goater
2023-10-26 15:32     ` Ninad Palsule [this message]
2023-10-21 21:17 ` [PATCH v6 10/10] hw/fsi: Update MAINTAINER list Ninad Palsule

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=fd4ca25e-a1b2-4ce1-828f-efbc88d00f3c@linux.ibm.com \
    --to=ninad@linux.ibm.com \
    --cc=andrew@codeconstruct.com.au \
    --cc=berrange@redhat.com \
    --cc=clg@kaod.org \
    --cc=joel@jms.id.au \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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).