On 6/10/19 12:07 AM, Ralf Ramsauer wrote:
>
>
> 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.
Oh wait -- the TK1 in deed returns -1 for the version call, but the next
call will fail. This is why it didn't break there.
Ralf
>
> 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/b76f46a9-afd3-216d-55fc-026651ad9bd7%40oth-regensburg.de.
For more options, visit https://groups.google.com/d/optout.