qemu-patch-raspberry4/include
Benjamin Herrenschmidt 4f9924c4d4 ppc/pnv: Add models for POWER9 PHB4 PCIe Host bridge
These changes introduces models for the PCIe Host Bridge (PHB4) of the
POWER9 processor. It includes the PowerBus logic interface (PBCQ),
IOMMU support, a single PCIe Gen.4 Root Complex, and support for MSI
and LSI interrupt sources as found on a POWER9 system using the XIVE
interrupt controller.

POWER9 processor comes with 3 PHB4 PEC (PCI Express Controller) and
each PEC can have several PHBs. By default,

  * PEC0 provides 1 PHB  (PHB0)
  * PEC1 provides 2 PHBs (PHB1 and PHB2)
  * PEC2 provides 3 PHBs (PHB3, PHB4 and PHB5)

Each PEC has a set  "global" registers and some "per-stack" (per-PHB)
registers. Those are organized in two XSCOM ranges, the "Nest" range
and the "PCI" range, each range contains both some "PEC" registers and
some "per-stack" registers.

No default device layout is provided and PCI devices can be added on
any of the available PCIe Root Port (pcie.0 .. 2 of a Power9 chip)
with address 0x0 as the firwware (skiboot) only accepts a single
device per root port. To run a simple system with a network and a
storage adapters, use a command line options such as :

  -device e1000e,netdev=net0,mac=C0:FF:EE:00:00:02,bus=pcie.0,addr=0x0
  -netdev bridge,id=net0,helper=/usr/libexec/qemu-bridge-helper,br=virbr0,id=hostnet0

  -device megasas,id=scsi0,bus=pcie.1,addr=0x0
  -drive file=$disk,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none
  -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=2

If more are needed, include a bridge.

Multi chip is supported, each chip adding its set of PHB4 controllers
and its PCI busses. The model doesn't emulate the EEH error handling.

This model is not ready for hotplug yet.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[ clg: - numerous cleanups
       - commit log
       - fix for broken LSI support
       - PHB pic printinfo
       - large QOM rework ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20200127144506.11132-2-clg@kaod.org>
[dwg: Use device_class_set_props()]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-02-02 14:07:57 +11:00
..
authz Include generated QAPI headers less 2019-08-16 13:31:51 +02:00
block blockdev: adds bdrv_parse_aio to use io_uring 2020-01-30 20:59:41 +00:00
chardev chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
crypto crypto: Fix typo in QCryptoTLSSession's <example> comment 2019-12-18 08:36:15 +01:00
disas disas: Add a field for target-dependant data to disassemble_info 2020-01-29 19:28:52 +01:00
exec ram_addr: Split RAMBlock definition 2020-01-29 11:28:59 +01:00
fpu fpu: make softfloat-macros "self-contained" 2019-08-19 12:07:13 +01:00
hw ppc/pnv: Add models for POWER9 PHB4 PCIe Host bridge 2020-02-02 14:07:57 +11:00
io io: Fix Error usage in a comment <example> 2019-12-18 08:36:15 +01:00
libdecnumber include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
migration migration: Support QLIST migration 2020-01-20 09:10:23 +01:00
monitor hmp: drop Error pointer indirection in hmp_handle_error 2019-12-18 08:36:16 +01:00
net Include qemu/queue.h slightly less 2019-08-16 13:31:52 +02:00
qapi qstring: add qstring_free() 2020-01-24 20:59:13 +01:00
qemu migration: Simplify get_qlist 2020-01-29 11:28:59 +01:00
qom qom: introduce object_property_help() 2020-01-24 20:59:16 +01:00
scsi scsi: explicitly list guest-recoverable sense codes 2019-07-15 11:20:42 +02:00
standard-headers virtiofsd: Pull in kernel's fuse.h 2020-01-23 16:41:36 +00:00
sysemu tpm_spapr: Support TPM for ppc64 using CRQ based interface 2020-02-02 14:07:57 +11:00
tcg tcg: Move TCG headers to include/tcg/ 2020-01-15 15:13:10 -10:00
ui display/gtk: get proper refreshrate 2020-01-14 07:26:36 +01:00
user linux-user: Include trace-root.h in syscall-trace.h 2020-01-15 15:13:09 -10:00
elf.h target/arm/arch_dump: Add SVE notes 2020-01-23 15:34:04 +00:00
glib-compat.h glib: bump min required glib library version to 2.48 2019-08-22 10:46:34 +01:00
qemu-common.h exec: Split out variable page size support to exec-vary.c 2019-10-28 10:26:02 +01:00
qemu-io.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00