[SLOF] [PATCH slof v5 5/6] rtas: Store RTAS address and entry in the device tree

Alexey Kardashevskiy aik at ozlabs.ru
Mon Oct 16 16:16:52 AEDT 2017


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 at 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(+)

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 - +
 ;
-- 
2.11.0



More information about the SLOF mailing list