I noticed TF-A currently supports passing in 4 parameters and returning up to 8. But SMCCC 1.1+ supports passing up to 18 and returning 18 in AArch64 mode, and passing in/out 8 in AArch32.
I was wondering if there are any plans to add support for handling the full set of parameters?
Hi Rebecca,
The standard SMC handler defines 4 parameters. https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/services/st... This is probably not meant to change as this is entangled with the AAPCS convention and the way the asm entry jumps to the C handler. Although a service handler can use more input parms by extracting GP regs from the cpu context, e.g. for the SPMD: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/services/st... For the specific case of the SPMD/SPMC the FF-A ABIs conform to SMCCCv1.2 (7 input parameters, 8 return values). So there is no rationale in implementing SMCCCv1.3 for this service at the moment.
If you think of another use case for a standard service to use SMCCCv1.3, it can use the technique mentioned above for input parameters. The return values may indeed miss few helpers in TF-A beyond the SMC_RET8 macro if necessary, but that shouldn't be too complicated to add.
Let us know if this clarifies.
Regards, Olivier.
________________________________________ From: TF-A tf-a-bounces@lists.trustedfirmware.org on behalf of Rebecca Cran via TF-A tf-a@lists.trustedfirmware.org Sent: 15 October 2021 18:57 To: tf-a@lists.trustedfirmware.org Subject: [TF-A] Support for passing 18 parameters to/from an SMC call in AArch64
I noticed TF-A currently supports passing in 4 parameters and returning up to 8. But SMCCC 1.1+ supports passing up to 18 and returning 18 in AArch64 mode, and passing in/out 8 in AArch32.
I was wondering if there are any plans to add support for handling the full set of parameters?
-- Rebecca Cran
-- TF-A mailing list TF-A@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/tf-a
Hi,
A bit of correction after further checking, SMCCCv1.2 already introduced a possible 17 input parameters / 18 output values.
IIUC, FF-A restricts the usage to 7 input parameters / 8 output values even in AArch64, to keep the compatibility with AArch32 endpoints (Achin please chime in if this looks wrong).
Regards, Olivier.
________________________________________ From: TF-A tf-a-bounces@lists.trustedfirmware.org on behalf of Olivier Deprez via TF-A tf-a@lists.trustedfirmware.org Sent: 18 October 2021 11:48 To: tf-a@lists.trustedfirmware.org; Rebecca Cran Subject: Re: [TF-A] Support for passing 18 parameters to/from an SMC call in AArch64
Hi Rebecca,
The standard SMC handler defines 4 parameters. https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/services/st... This is probably not meant to change as this is entangled with the AAPCS convention and the way the asm entry jumps to the C handler. Although a service handler can use more input parms by extracting GP regs from the cpu context, e.g. for the SPMD: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/services/st... For the specific case of the SPMD/SPMC the FF-A ABIs conform to SMCCCv1.2 (7 input parameters, 8 return values). So there is no rationale in implementing SMCCCv1.3 for this service at the moment.
If you think of another use case for a standard service to use SMCCCv1.3, it can use the technique mentioned above for input parameters. The return values may indeed miss few helpers in TF-A beyond the SMC_RET8 macro if necessary, but that shouldn't be too complicated to add.
Let us know if this clarifies.
Regards, Olivier.
________________________________________ From: TF-A tf-a-bounces@lists.trustedfirmware.org on behalf of Rebecca Cran via TF-A tf-a@lists.trustedfirmware.org Sent: 15 October 2021 18:57 To: tf-a@lists.trustedfirmware.org Subject: [TF-A] Support for passing 18 parameters to/from an SMC call in AArch64
I noticed TF-A currently supports passing in 4 parameters and returning up to 8. But SMCCC 1.1+ supports passing up to 18 and returning 18 in AArch64 mode, and passing in/out 8 in AArch32.
I was wondering if there are any plans to add support for handling the full set of parameters?
-- Rebecca Cran
-- TF-A mailing list TF-A@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/tf-a -- TF-A mailing list TF-A@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/tf-a
tf-a@lists.trustedfirmware.org