xemu/include/hw/ppc
Michael Roth b20b7b7add spapr_ovec: initial implementation of option vector helpers
PAPR guests advertise their capabilities to the platform by passing
an ibm,architecture-vec structure via an
ibm,client-architecture-support hcall as described by LoPAPR v11,
B.6.2.3. during early boot.

Using this information, the platform enables the capabilities it
supports, then encodes a subset of those enabled capabilities (the
5th option vector of the ibm,architecture-vec structure passed to
ibm,client-architecture-support) into the guest device tree via
"/chosen/ibm,architecture-vec-5".

The logical format of these these option vectors is a bit-vector,
where individual bits are addressed/documented based on the byte-wise
offset from the beginning of the bit-vector, followed by the bit-wise
index starting from the byte-wise offset. Thus the bits of each of
these bytes are stored in reverse order. Additionally, the first
byte of each option vector is encodes the length of the option vector,
so byte offsets begin at 1, and bit offset at 0.

This is not very intuitive for the purposes of mapping these bits to
a particular documented capability, so this patch introduces a set
of abstractions that encapsulate the work of parsing/encoding these
options vectors and testing for individual capabilities.

Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
[dwg: Tweaked double-include protection to not trigger a checkpatch
 false positive]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-28 09:38:26 +11:00
..
fdt.h ppc: do not redefine CPUPPCState 2016-09-13 19:09:44 +02:00
mac_dbdma.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
openpic.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
pnv_core.h ppc/pnv: add XSCOM handlers to PnvCore 2016-10-28 09:38:25 +11:00
pnv_lpc.h ppc/pnv: add a LPC controller 2016-10-28 09:38:25 +11:00
pnv_xscom.h ppc/pnv: add a LPC controller 2016-10-28 09:38:25 +11:00
pnv.h ppc/pnv: add a ISA bus 2016-10-28 09:38:25 +11:00
ppc4xx.h Remove unused function declarations 2016-09-15 15:32:22 +03:00
ppc_e500.h intc/openpic: Build openpic only once 2013-07-09 21:33:02 +02:00
ppc.h ppc: parse cpu features once 2016-08-13 17:32:58 +10:00
spapr_cpu_core.h spapr: Introduce sPAPRCPUCoreClass 2016-09-23 12:39:06 +10:00
spapr_drc.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
spapr_ovec.h spapr_ovec: initial implementation of option vector helpers 2016-10-28 09:38:26 +11:00
spapr_rtas.h tests: add RTAS command in the protocol 2016-09-23 10:29:40 +10:00
spapr_vio.h pseries: Consolidate construction of /vdevice device tree node 2016-10-28 09:38:26 +11:00
spapr.h pseries: Remove spapr_create_fdt_skel() 2016-10-28 09:38:26 +11:00
xics.h pseries: Move construction of /interrupt-controller fdt node 2016-10-28 09:38:26 +11:00