[SLOF] [PATCH slof v4 3/3] rtas: Store RTAS address and entry in the device tree

David Gibson david at gibson.dropbear.id.au
Fri Oct 6 21:16:45 AEDT 2017


On Wed, Oct 04, 2017 at 04:40:01PM +1100, Alexey Kardashevskiy wrote:
> 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-entry 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>

As discussed in another thread, I don't think you actually need
rtas-entry here, just rtas-base.  And including the size would
probably be safer, although I guess qemu already pretty much assumes
the RTAS blob it passes into SLOF will be used unmodified by SLOF.

> ---
>  board-qemu/slof/rtas.fs | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/board-qemu/slof/rtas.fs b/board-qemu/slof/rtas.fs
> index 219bcda..7f3b4c0 100644
> --- a/board-qemu/slof/rtas.fs
> +++ b/board-qemu/slof/rtas.fs
> @@ -178,8 +178,13 @@ rtas-node set-node
>  : close ;
>  
>  : instantiate-rtas ( adr -- entry )
> +    s" /rtas" find-node >r
> +    dup encode-int s" slof,rtas-base" r@ set-property
> +
>      dup rtas-base swap rtas-size move
>      rtas-entry rtas-base - +
> +
> +    dup encode-int s" slof,rtas-entry" r> set-property
>  ;
>  
>  device-end

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/slof/attachments/20171006/48d0d8c3/attachment.sig>


More information about the SLOF mailing list