Message ID | 20171024013153.28200-6-aik@ozlabs.ru |
---|---|
State | Accepted |
Headers | show |
Series | fdt: Pass the resulting device tree to QEMU + related fixes | expand |
diff --git a/board-qemu/slof/rtas.fs b/board-qemu/slof/rtas.fs index f1a4abe..092f5b1 100644 --- a/board-qemu/slof/rtas.fs +++ b/board-qemu/slof/rtas.fs @@ -176,7 +176,14 @@ rtas-node set-node : open true ; : close ; +: store-rtas-loc ( adr ) + s" /rtas" find-node >r + encode-int s" slof,rtas-base" r@ set-property + rtas-size encode-int s" slof,rtas-size" r> set-property +; + : instantiate-rtas ( adr -- entry ) + dup store-rtas-loc dup rtas-base swap rtas-size move rtas-entry rtas-base - + ;
At the moment we count on the guest kernel to update or create device tree properties pointing to the instantiated RTAS copy which is not very reliable. This stores rtas-base and rtas-size in the DT at the instantiation point so later on the H_UPDATE_DT hcall can supply QEMU with an updated location of RTAS. This superseeds f9a60de30 "Add private HCALL to inform updated RTAS base and entry". Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> --- Changes: v5: * ditched rtas-entry, added rtas-size (which is always 20 bytes though) --- board-qemu/slof/rtas.fs | 7 +++++++ 1 file changed, 7 insertions(+)