[Skiboot] [PATCH v5 5/7] vas: Create device tree node
benh at au1.ibm.com
Mon Apr 24 16:15:32 AEST 2017
On Mon, 2017-04-03 at 13:44 -0700, Sukadev Bhattiprolu wrote:
> return 0;
> diff --git a/doc/device-tree/vas.rst b/doc/device-tree/vas.rst
> new file mode 100644
> index 0000000..01bb2e1
> --- /dev/null
> +++ b/doc/device-tree/vas.rst
> @@ -0,0 +1,23 @@
> +Virtual Accelerator Switchboard (VAS)
> +VAS is present in P9 or later processors. In P9, each chip has one
> +instance of VAS. Each instance of VAS is represented by a node in
> +the device tree, under the xsccom node associated with the P9 chip.
> + /xscom@<xscom_addr>/vas@<vas_addr>
> +with unique xscom and vas addresses.
> +Each VAS node contains: ::
> + compatible: "ibm,vas"
> + reg: contains 6 64-bit values. The first two contain the Hypervisor
> + Window Context BAR start and length values and the next two
> + contain the OS/User Window Context BAR start and length values.
> + The last two contain the "window base address" and "window id
> + shift" values, which are used to compute the hardware paste
> + address for a send window on this instance of VAS.
> + vas-id: unique identifier for each instance of VAS in the system.
This is bogus. You can't have a node with powerbus addresses under
the XSCOM node. Devices below the XSCOM nodes have "reg" properties
that contain XSCOM addresses.
"reg" properties aren't made of arbitrary stuff. They have a well
defined format based on the parent device.
I also object of creating them from init_one_chip(). We shouldn't
be creating devices there.
Instead, look at how we do for other devices that exist both on the
XSCOM bus and the powerbus. We create a device under xscom whose
reg property is the XSCOM base address of the device. This gets done
in the HDAT parsing code.
Then the skiboot code detects those, attaches to them, and in turn
create the powerbus device (mmio) at the *root* of the device-tree
since that represents the powerbus.
More information about the Skiboot