[PATCH v2 5/6] aarch64: Support PSCI for Armv8-R AArch64
Luca Fancellu
Luca.Fancellu at arm.com
Tue Jul 30 04:31:14 PDT 2024
Hi Mark,
>> -
>> -AS_IF([test "x$USE_PSCI" != "xyes" -a "x$KERNEL_ES" = "x32"],
>> + [case "${enableval}" in
>> + yes|smc) USE_PSCI=smc ;;
>> + hvc) USE_PSCI=hvc ;;
>> + no) ;;
>> + *) AC_MSG_ERROR([Bad value "${enableval}" for --enable-psci. Use "smc" or "hvc"]) ;;
>> + esac])
>> +AM_CONDITIONAL([PSCI], [test "x$USE_PSCI" = "xyes" -o "x$USE_PSCI" = "xsmc" -o "x$USE_PSCI" = "xhvc"])
>> +AM_CONDITIONAL([PSCI_HVC], [test "x$USE_PSCI" = "xhvc"])
>> +
>> +AS_IF([test "x$USE_PSCI" = "xno" -a "x$KERNEL_ES" = "x32"],
>> [AC_MSG_ERROR([With an AArch32 kernel, boot method must be PSCI.])]
>> )
>> +AC_SUBST([PSCI_METHOD], [$USE_PSCI])
>
> As of this patch, if I build with --enable-psci=hvc, and boot on
> ARMv8-A, it'll fail at boot time, since the boot-wrapper won't fix up
> the SPSR (and will enter the kernel at EL2), and HVC will go to that
> kernel.
>
> I think that we either need to add support for dropping to EL1 in
> ARMv8-A, or we should have an option to build for ARMv8-R specifically,
> where we can automatically fix up the PSCI conduit.
True, maybe the best option is to have a flag to build for armv8r?
Would --armv8r64 be ok?
The behaviour would be:
--armv8r64 without XEN -> starting at EL2 only, setting conduit to hvc, psci_vector to VBAR_EL2, drop to EL1 and start kernel
--armv8r64 with XEN -> starting at EL2 only, psci not supported, keep xen at EL2
Cheers,
Luca
More information about the linux-arm-kernel
mailing list