Hi Venkata,
I’m unclear about the intent of your email—are you asking a question, or are you requesting feedback on your patch? https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/43868
In the meantime I will review your patch.
Thanks Manish ________________________________ From: Venkata Pokkuluri via TF-A tf-a@lists.trustedfirmware.org Sent: 06 October 2025 21:27 To: tf-a@lists.trustedfirmware.org tf-a@lists.trustedfirmware.org Subject: [TF-A] Rethrow SEA from EL3 to lower EL on arm64
In Firmware First Handling (FFH), all external aborts are trapped to EL3, they can be notified to OS/VM using SDEI or by reinjecting SEA. SDEI is imprecise exception and asynchronous. GHES driver defines SEA as the only synchronous mechanism (https://github.com/torvalds/linux/blob/master/drivers/acpi/apei/ghes.c#L118), hence SEA reinjection is useful for SEA's where OS/VM takes appropriate action.
For example when an user space application running at EL0 consumes a poisoned memory by re-throwing SEA the kernel can terminate the individual application.
For SEA Reinjection we need to figure out the right EL to reinject the SEA to and then copy ESR_EL3, SPSR_EL3, ELR_EL3 and FAR_EL3 to target ELs respective registers and calculate new PSTATE for EL3.
To find target_el reference code is provided in SyncExternalAbortTarget (J1.3.2.7) in ARM DDI 0487L.a.