Hi,

Just to be clear is your platform implementing GICv3 (as opposed to GICv2)?
Is this mixing secure and non-secure interrupts on the same interrupt line? For the given INTID you can set the security state to either secure or non-secure in the GIC. How is it configured in this case?

If configured non-secure, then OP-TEE would perform a normal world exit anyways.
So on the return path, the OP-TEE dispatcher at EL3 can check whether an interrupt is pending for it and process it. It should then continue with the normal world exit , to which the driver will return to OP-TEE because of the NS interrupt.
All this doesn't look conventional though.

Regards,
Olivier.



From: Neely, Brian <Brian.Neely@analog.com>
Sent: 25 September 2023 13:55
To: Jens Wiklander <jens.wiklander@linaro.org>; Olivier Deprez <Olivier.Deprez@arm.com>
Cc: tf-a@lists.trustedfirmware.org <tf-a@lists.trustedfirmware.org>
Subject: RE: [TF-A] EHF + OP-TEE
 
Hi Oliver, Jens,

Thanks for the info. Yes, that's correct. We have a single interrupt that is the OR of several interrupt sources, some that are destined for EL3 and some that are destined for non-secure EL1. SDEI seemed like a good method for handling this, but won't work for us (since SDEI requires EHF, and EHF/OP-TEE are incompatible). Do you know of any alternative?

Thanks,
Brian

-----Original Message-----
From: Jens Wiklander <jens.wiklander@linaro.org>
Sent: Monday, September 25, 2023 7:12 AM
To: Olivier Deprez <Olivier.Deprez@arm.com>
Cc: tf-a@lists.trustedfirmware.org; Neely, Brian <Brian.Neely@analog.com>
Subject: Re: [TF-A] EHF + OP-TEE

[External]

Hi,

On Mon, Sep 25, 2023 at 9:26 AM Olivier Deprez <Olivier.Deprez@arm.com> wrote:
>
> Hi,
>
> Are EHF and OP-TEE (opteed) designed to work together?
>
> AFAIK this isn't supported. @Jens Wiklander please correct if this evolved.

None that I'm aware of.

Cheers,
Jens

> You'd need to implement some special logic in the optee SPD to handle the case of Group1NS interrupts (perform a synchronous entry back into OP-TEE for it to perform its housekeeping before returning to the normal world).
>
> has some "aggregated interrupts" that contain both secure and
> non-secure sources
>
> By secure interrupt, do you mean Group0 interrupt?
>
> See an earlier thread on this topic:
>
> https://urldefense.com/v3/__https://lists.trustedfirmware.org/archives
> /list/op-tee@lists.trustedfirmware.org/message/G3MR5J7NVFPTPSIEPEEG2P6
> KBAX7UZUL/__;!!A3Ni8CS0y2Y!-BfKeGap4ebdJ7WaDlF7u5C0XxRTOq98VqU8DXGDW64
> x06gsX85Zid3ZFtNvj2ZtzEQfNS0DJ1JzXYfi8fsZ0l8GFjI$
> As I understand it this was somewhat investigated and then abandoned.
>
> Regards,
> Olivier.
>
> ________________________________
> From: Brian Neely via TF-A <tf-a@lists.trustedfirmware.org>
> Sent: 22 September 2023 22:43
> To: tf-a@lists.trustedfirmware.org <tf-a@lists.trustedfirmware.org>
> Subject: [TF-A] EHF + OP-TEE
>
> Hello,
>
> Are EHF and OP-TEE (opteed) designed to work together? I'm seeing some strange behavior when NS interrupts are routed to EL3 as FIQs (due to EHF), but before I dig into it further I wanted to confirm if EHF + OP-TEE is a valid combination.
>
> Some background: Our system, which uses OP-TEE, has some "aggregated interrupts" that contain both secure and non-secure sources, for which we wanted to use SDEI to filter and dispatch to Linux (and SDEI requires EHF).
>
> Thanks!
>
> -Brian
> --
> TF-A mailing list -- tf-a@lists.trustedfirmware.org To unsubscribe
> send an email to tf-a-leave@lists.trustedfirmware.org