On 6/9/19 8:58 PM, Jan Kiszka wrote:
> From: Jan Kiszka <[email protected]>
> 
> U-Boot returns PSCI_NOT_SUPPORTED, rather than the implemented 0.2.
> Filter out all negative return codes.

Oh. We should fix this as bootloaders are out there that do not stick to
the specification. Nevertheless, should this be reported to u-boot?

I remember that I definitely tested the series on a TK1, nothing
exploded there back then. So at least the TK1 seems to behave differently.

Anyway, tested this on a TX1 w/ and w/o firmware mitigations, as well as
on a TK1. All configurations seem to work fine.

> 
> Fixes: ea924a3fec98 ("arm64: Initialise SMCCC backend")
> Signed-off-by: Jan Kiszka <[email protected]>

Tested-by: Ralf Ramsauer <[email protected]>

  Ralf

> ---
>  hypervisor/arch/arm-common/smccc.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/hypervisor/arch/arm-common/smccc.c 
> b/hypervisor/arch/arm-common/smccc.c
> index 5affa965..7734b999 100644
> --- a/hypervisor/arch/arm-common/smccc.c
> +++ b/hypervisor/arch/arm-common/smccc.c
> @@ -23,8 +23,9 @@ void smccc_discover(void)
> 
>       ret = smc(PSCI_0_2_FN_VERSION);
> 
> -     /* We need >=PSCIv1.0 for SMCCC */
> -     if (PSCI_VERSION_MAJOR(ret) < 1)
> +     /* We need >=PSCIv1.0 for SMCCC. Against the spec, U-Boot may also
> +      * return a negative error code. */
> +     if (ret < 0 || PSCI_VERSION_MAJOR(ret) < 1)
>               return;
> 
>       /* Check if PSCI supports SMCCC version call */
> --
> 2.16.4
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/4a7ef1a0-b21c-b224-7768-2b0929349bec%40oth-regensburg.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to