Hi all,
I'd like to ask whether the following behavior of SDEI_EVENT_0 is
intended, and whether it's a known limitation of the SDEI + GIC SGI
semantics. I've read the code carefully but want to confirm the
intent before relying on or working around it.
## Setup
- TF-A SDEI, event 0 is a "signalable" private event whose backing
interrupt is a Secure SGI (on our platform, SGI 9).
- include/services/sdei.h, SDEI_DEFINE_EVENT_0(_intr)
-> SDEI_PRIVATE_EVENT(SDEI_EVENT_0, _intr, SDEI_MAPF_SIGNALABLE)
- services/std_svc/sdei/sdei_main.c: asserts event 0 must
be a Secure SGI and may only carry SIGNALABLE|PRIVATE.
## What I observe in code
When the PE is SDEI-masked (client called SDEI_PE_MASK) and the SGI
backing event 0 fires, the handler does *not* preserve the trigger:
1. The EL3 FIQ is taken and acked in
bl31/ehf.c ehf_el3_interrupt_handler() via plat_ic_acknowledge_interrupt()
(reads ICC_IAR — interrupt now Active, its Pending bit consumed).
2. It reaches sdei_intr_handler() (services/std_svc/sdei/sdei_intr_mgmt.c).
At L463, state->pe_masked is true, so it calls handle_masked_trigger()
and returns 0.
3. handle_masked_trigger() :
/* Nothing to do for event 0 */
if (map->ev_num == SDEI_EVENT_0)
return;
i.e. for event 0 it does none of the "freeze for replay" steps that a
normal private event takes :
plat_ic_disable_interrupt(intr);
plat_ic_set_interrupt_pending(intr);
plat_ic_end_of_interrupt(intr_raw);
state->pending_enables = true;
So while the PE is masked, an event-0 trigger is acknowledged and then
silently dropped, with nothing stored for replay on the next
SDEI_PE_UNMASK.
## Why I think this happens (and want to confirm)
The "freeze for replay" mechanism for normal private events relies on
re-asserting Pending via plat_ic_set_interrupt_pending(), because the
ack already consumed the Pending bit. But for an SGI this is not
permitted — plat/common/plat_gicv3.c: asserts it out:
void plat_ic_set_interrupt_pending(unsigned int id)
{
/* Disallow setting SGIs pending */
assert(id >= MIN_PPI_ID);
gicv3_set_interrupt_pending(id, plat_my_core_pos());
}
So event 0 (backed by an SGI) cannot have its Pending bit re-asserted in
software, which is consistent with the "Nothing to do for event 0"
early return. Combined with the level/merge semantics of GIC SGIs (a
sender firing the same SGI N times is represented as a single Pending,
not a count), this means a masked-PE client can at most learn "an event
happened while masked", never how many or which — by design.
## My questions
1. Is dropping an event-0 trigger while the PE is masked the intended
behaviour (a consequence of "event 0 is a signalable SGI, counting is
not guaranteed"), rather than a bug? The "Nothing to do for event 0"
comment reads as deliberate, but I'd like explicit confirmation.
2. Is the recommended mitigation simply to avoid firing event 0 while
the PE is masked (buffer on the sender side, deliver after unmask),
or to use a normal explicit event for anything requiring precise
accounting? Or is there a platform hook intended for this case that
I'm missing (e.g. plat_sdei_handle_masked_trigger — though that path
is only taken for shared ANY-PE events , not event 0)?
3. Separately (not the focus of this question): on this masked path
neither handle_masked_trigger() nor sdei_intr_handler() calls
plat_ic_end_of_interrupt() for event 0, and neither the EHF top-level
handler nor the runtime_exceptions.S dispatch macro performs a
fallback EOI. So the acked SGI appears to be left Active with no EOI
on this path. Is there a later EOI for this SGI that I've missed, or
is that also expected here? I don't want to conflate this with the
"drop" question above; I'm just flagging it.
For reference, this is on an in-tree SDEI path; the platform only
defines event 0 via SDEI_DEFINE_EVENT_0(PLAT_SDEI_SGI_PRIVATE) and does
not modify handle_masked_trigger().
Thanks,
Tianliang
This event has been canceled with a note:
"Also cancelling Aug 20th instance as no topic and expected low attendance."
TF-A Tech Forum
Thursday Aug 20, 2026 ⋅ 5pm – 6pm
Central European Time - Paris
Location
https://linaro-org.zoom.us/j/93557863987?pwd=56a1l8cBnetDTZ6eazHGaE1Ctk4W34…https://www.google.com/url?q=https%3A%2F%2Flinaro-org.zoom.us%2Fj%2F9355786…
Trusted Firmware is inviting you to a scheduled Zoom meeting.Topic: TF-A
Tech ForumTime: May 15, 2025 02:00 PM London Every 2 weeks on Thu,
78 occurrence(s)Please download and import the following iCalendar (.ics)
files to your calendar
system.Weekly: https://linaro-org.zoom.us/meeting/tJcocu6gqDgjEtOkyBhSQauR1sUyFwIcNKLa/ics…
Zoom
Meetinghttps://linaro-org.zoom.us/j/93557863987?pwd=56a1l8cBnetDTZ6eazHGaE1Ctk4W34.1Meeting
ID: 935 5786 3987Passcode: 939141---One tap
mobile+12532158782,,93557863987# US (Tacoma)+13017158592,,93557863987# US
(Washington DC)---Dial by your location• +1 253 215 8782 US (Tacoma)• +1
301 715 8592 US (Washington DC)• +1 305 224 1968 US• +1 309 205 3325 US• +1
312 626 6799 US (Chicago)• +1 346 248 7799 US (Houston)• +1 360 209 5623
US• +1 386 347 5053 US• +1 507 473 4847 US• +1 564 217 2000 US• +1 646 558
8656 US (New York)• +1 646 931 3860 US• +1 669 444 9171 US• +1 669 900 9128
US (San Jose)• +1 689 278 1000 US• +1 719 359 4580 US• +1 253 205 0468 US•
833 548 0276 US Toll-free• 833 548 0282 US Toll-free• 833 928 4608 US
Toll-free• 833 928 4609 US Toll-free• 833 928 4610 US Toll-free• 877 853
5247 US Toll-free• 888 788 0099 US Toll-freeMeeting ID: 935 5786 3987Find
your local number: https://linaro-org.zoom.us/u/adoz9mILli
Guests
d82620130(a)gmail.com
namyoon(a)google.com
shaikadnanafrid(a)gmail.com
tf-a(a)lists.trustedfirmware.org
~~//~~
Sent by Google Calendar: https://calendar.google.com/calendar/
You are receiving this email because you are an attendee on the event.
Forwarding this invitation could allow any recipient to send a response to
the organizer, be added to the guest list, invite others regardless of
their own invitation status, or modify your RSVP.
Learn more https://support.google.com/calendar/answer/37135#forwarding
This event has been canceled with a note:
"Hi Cancelling as topic on Aug 6th. Regards, Olivier. "
TF-A Tech Forum
Thursday Aug 6, 2026 ⋅ 5pm – 6pm
Central European Time - Paris
Location
https://linaro-org.zoom.us/j/93557863987?pwd=56a1l8cBnetDTZ6eazHGaE1Ctk4W34…https://www.google.com/url?q=https%3A%2F%2Flinaro-org.zoom.us%2Fj%2F9355786…
Trusted Firmware is inviting you to a scheduled Zoom meeting.Topic: TF-A
Tech ForumTime: May 15, 2025 02:00 PM London Every 2 weeks on Thu,
78 occurrence(s)Please download and import the following iCalendar (.ics)
files to your calendar
system.Weekly: https://linaro-org.zoom.us/meeting/tJcocu6gqDgjEtOkyBhSQauR1sUyFwIcNKLa/ics…
Zoom
Meetinghttps://linaro-org.zoom.us/j/93557863987?pwd=56a1l8cBnetDTZ6eazHGaE1Ctk4W34.1Meeting
ID: 935 5786 3987Passcode: 939141---One tap
mobile+12532158782,,93557863987# US (Tacoma)+13017158592,,93557863987# US
(Washington DC)---Dial by your location• +1 253 215 8782 US (Tacoma)• +1
301 715 8592 US (Washington DC)• +1 305 224 1968 US• +1 309 205 3325 US• +1
312 626 6799 US (Chicago)• +1 346 248 7799 US (Houston)• +1 360 209 5623
US• +1 386 347 5053 US• +1 507 473 4847 US• +1 564 217 2000 US• +1 646 558
8656 US (New York)• +1 646 931 3860 US• +1 669 444 9171 US• +1 669 900 9128
US (San Jose)• +1 689 278 1000 US• +1 719 359 4580 US• +1 253 205 0468 US•
833 548 0276 US Toll-free• 833 548 0282 US Toll-free• 833 928 4608 US
Toll-free• 833 928 4609 US Toll-free• 833 928 4610 US Toll-free• 877 853
5247 US Toll-free• 888 788 0099 US Toll-freeMeeting ID: 935 5786 3987Find
your local number: https://linaro-org.zoom.us/u/adoz9mILli
Guests
d82620130(a)gmail.com
namyoon(a)google.com
shaikadnanafrid(a)gmail.com
tf-a(a)lists.trustedfirmware.org
~~//~~
Sent by Google Calendar: https://calendar.google.com/calendar/
You are receiving this email because you are an attendee on the event.
Forwarding this invitation could allow any recipient to send a response to
the organizer, be added to the guest list, invite others regardless of
their own invitation status, or modify your RSVP.
Learn more https://support.google.com/calendar/answer/37135#forwarding
Hello all,
Please be aware that tomorrow, 06/06/2026, the Lava Lab will be down
due to a UPS replacement.
The time will be 13:00 to 17:00 (UTC+1).
Regards
Ben