]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
spapr/rtas: Reserve space for RTAS blob and log
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 16 Mar 2020 01:18:41 +0000 (12:18 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 17 Mar 2020 04:08:50 +0000 (15:08 +1100)
At the moment SLOF reserves space for RTAS and instantiates the RTAS blob
which is 20 bytes binary blob calling an hypercall. The rest of the RTAS
area is a log which SLOF has no idea about but QEMU does.

This moves RTAS sizing to QEMU and this overrides the size from SLOF.
The only remaining problem is that SLOF copies the number of bytes it
reserved (2KB for now) so QEMU needs to reserve at least this much;
SLOF will be fixed separately to check that rtas-size from QEMU is
enough for those 20 bytes for the H_RTAS hcall.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-Id: <20200316011841.99970-1-aik@ozlabs.ru>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c
include/hw/ppc/spapr.h

index 1038420c4a60bb8eae449ef7217d74237a2930b1..2f9a65b414d9c06e7becca7986c7e59a45980bd7 100644 (file)
@@ -967,6 +967,7 @@ static void spapr_dt_rtas(SpaprMachineState *spapr, void *fdt)
     _FDT(fdt_setprop(fdt, rtas, "ibm,max-associativity-domains",
                      maxdomains, sizeof(maxdomains)));
 
+    _FDT(fdt_setprop_cell(fdt, rtas, "rtas-size", RTAS_SIZE));
     _FDT(fdt_setprop_cell(fdt, rtas, "rtas-error-log-max",
                           RTAS_ERROR_LOG_MAX));
     _FDT(fdt_setprop_cell(fdt, rtas, "rtas-event-scan-rate",
index 2015e37ac5c8e4955a60f8c966f1a66c4b7e9938..35b489a54929595e623c829a79456d5e5eefca23 100644 (file)
@@ -736,6 +736,7 @@ void spapr_load_rtas(SpaprMachineState *spapr, void *fdt, hwaddr addr);
 #define SPAPR_IS_PCI_LIOBN(liobn)   (!!((liobn) & 0x80000000))
 #define SPAPR_PCI_DMA_WINDOW_NUM(liobn) ((liobn) & 0xff)
 
+#define RTAS_SIZE               2048
 #define RTAS_ERROR_LOG_MAX      2048
 
 /* Offset from rtas-base where error log is placed */