diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2019-07-16 15:08:49 +1000 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2019-07-18 16:36:03 +1000 |
commit | 5e4ed1fd0f39e7e6c6a05021451fc2e6a98a8b72 (patch) | |
tree | f8b86a22c48d46f7e4519603a19f0a7c80fd292c /lib/libhvcall/hvcall.code | |
parent | ba1ab360eebe6338bb8d7d83a9220ccf7e213af3 (diff) | |
download | SLOF-5e4ed1fd0f39e7e6c6a05021451fc2e6a98a8b72.zip SLOF-5e4ed1fd0f39e7e6c6a05021451fc2e6a98a8b72.tar.gz SLOF-5e4ed1fd0f39e7e6c6a05021451fc2e6a98a8b72.tar.bz2 |
rtas: Integrate RTAS blob
We implement RTAS as a simple binary blob which calls directly into QEMU
via a custom hcall. So far we were relying on QEMU putting the RTAS blob
to the guest memory with its location in linux,rtas-base/rtas-size.
The problems with this are:
1. we need to peek a location in the guest ram in addition to slof, FDT
and sometime kernel and init ram disk; having one less image makes QEMU's
life easier.
2. for secure VMs, it is yet another image which needs to be signed and
verified.
This implements "instantiate-rtas" completely in SLOF, including KVM PR
support ("broken sc1").
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'lib/libhvcall/hvcall.code')
-rw-r--r-- | lib/libhvcall/hvcall.code | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/libhvcall/hvcall.code b/lib/libhvcall/hvcall.code index 5918c90..7e8536a 100644 --- a/lib/libhvcall/hvcall.code +++ b/lib/libhvcall/hvcall.code @@ -128,3 +128,17 @@ PRIM(hv_X2d_update_X2d_dt) unsigned long dt = TOS.u; TOS.u = hv_generic(KVMPPC_H_UPDATE_DT, dt); MIRP + +PRIM(hv_X2d_rtas_X2d_get) + if (check_broken_sc1()) { + PUSH; + TOS.u = (unsigned long) hv_rtas_broken_sc1; + PUSH; + TOS.u = hv_rtas_broken_sc1_size; + } else { + PUSH; + TOS.u = (unsigned long) hv_rtas; + PUSH; + TOS.u = hv_rtas_size; + } +MIRP |