]> Git Repo - qemu.git/commit
spapr: Improve handling of fdt buffer size
authorDavid Gibson <[email protected]>
Fri, 18 Oct 2019 10:25:49 +0000 (21:25 +1100)
committerDavid Gibson <[email protected]>
Mon, 16 Dec 2019 23:39:48 +0000 (10:39 +1100)
commit97b32a6afa78ae68fb16344b9a144b6f433f42a2
tree9f3bbf7bd430726aee7e6177c3aca4daa9492527
parent8deb8019d696c75e6ecaee7545026b62aba2f1bb
spapr: Improve handling of fdt buffer size

Previously, spapr_build_fdt() constructed the device tree in a fixed
buffer of size FDT_MAX_SIZE.  This is a bit inflexible, but more
importantly it's awkward for the case where we use it during CAS.  In
that case the guest firmware supplies a buffer and we have to
awkwardly check that what we generated fits into it afterwards, after
doing a lot of size checks during spapr_build_fdt().

Simplify this by having spapr_build_fdt() take a 'space' parameter.
For the CAS case, we pass in the buffer size provided by SLOF, for the
machine init case, we continue to pass FDT_MAX_SIZE.

Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Cedric Le Goater <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
hw/ppc/spapr.c
This page took 0.02526 seconds and 4 git commands to generate.