From: Nathan Fontenot <nf...@linux.vnet.ibm.com> This add entries to the root OF node to advertise our PHBs as being DR-capable in accordance with PAPR specification.
Signed-off-by: Nathan Fontenot <nf...@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdr...@linux.vnet.ibm.com> --- hw/ppc/spapr.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index c539932..a7af332 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -57,6 +57,7 @@ #include "qemu/error-report.h" #include "trace.h" #include "hw/nmi.h" +#include "hw/ppc/spapr_drc.h" #include "hw/compat.h" @@ -745,6 +746,7 @@ static void spapr_finalize_fdt(sPAPREnvironment *spapr, size_t cb = 0; char *bootlist; void *fdt; + int fdt_offset; sPAPRPHBState *phb; fdt = g_malloc(FDT_MAX_SIZE); @@ -804,6 +806,13 @@ static void spapr_finalize_fdt(sPAPREnvironment *spapr, spapr_populate_chosen_stdout(fdt, spapr->vio_bus); } + fdt_offset = fdt_path_offset(fdt, "/"); + ret = spapr_drc_populate_dt(fdt, fdt_offset, NULL, + SPAPR_DR_CONNECTOR_TYPE_PHB); + if (ret < 0) { + fprintf(stderr, "Couldn't set up RTAS device tree properties\n"); + } + _FDT((fdt_pack(fdt))); if (fdt_totalsize(fdt) > FDT_MAX_SIZE) { -- 1.9.1