1*54fd6939SJiyong ParkSDEI: Software Delegated Exception Interface 2*54fd6939SJiyong Park============================================ 3*54fd6939SJiyong Park 4*54fd6939SJiyong ParkThis document provides an overview of the SDEI dispatcher implementation in 5*54fd6939SJiyong ParkTrusted Firmware-A (TF-A). 6*54fd6939SJiyong Park 7*54fd6939SJiyong ParkIntroduction 8*54fd6939SJiyong Park------------ 9*54fd6939SJiyong Park 10*54fd6939SJiyong ParkSoftware Delegated Exception Interface (|SDEI|) is an Arm specification for 11*54fd6939SJiyong ParkNon-secure world to register handlers with firmware to receive notifications 12*54fd6939SJiyong Parkabout system events. Firmware will first receive the system events by way of 13*54fd6939SJiyong Parkasynchronous exceptions and, in response, arranges for the registered handler to 14*54fd6939SJiyong Parkexecute in the Non-secure EL. 15*54fd6939SJiyong Park 16*54fd6939SJiyong ParkNormal world software that interacts with the SDEI dispatcher (makes SDEI 17*54fd6939SJiyong Parkrequests and receives notifications) is referred to as the *SDEI Client*. A 18*54fd6939SJiyong Parkclient receives the event notification at the registered handler even when it 19*54fd6939SJiyong Parkwas executing with exceptions masked. The list of SDEI events available to the 20*54fd6939SJiyong Parkclient are specific to the platform [#std-event]_. See also `Determining client 21*54fd6939SJiyong ParkEL`_. 22*54fd6939SJiyong Park 23*54fd6939SJiyong Park.. _general SDEI dispatch: 24*54fd6939SJiyong Park 25*54fd6939SJiyong ParkThe following figure depicts a general sequence involving SDEI client executing 26*54fd6939SJiyong Parkat EL2 and an event dispatch resulting from the triggering of a bound interrupt. 27*54fd6939SJiyong ParkA commentary is provided below: 28*54fd6939SJiyong Park 29*54fd6939SJiyong Park.. uml:: ../resources/diagrams/plantuml/sdei_general.puml 30*54fd6939SJiyong Park 31*54fd6939SJiyong ParkAs part of initialisation, the SDEI client binds a Non-secure interrupt [1], and 32*54fd6939SJiyong Parkthe SDEI dispatcher returns a platform dynamic event number [2]. The client then 33*54fd6939SJiyong Parkregisters a handler for that event [3], enables the event [5], and unmasks all 34*54fd6939SJiyong Parkevents on the current PE [7]. This sequence is typical of an SDEI client, but it 35*54fd6939SJiyong Parkmay involve additional SDEI calls. 36*54fd6939SJiyong Park 37*54fd6939SJiyong ParkAt a later point in time, when the bound interrupt triggers [9], it's trapped to 38*54fd6939SJiyong ParkEL3. The interrupt is handed over to the SDEI dispatcher, which then arranges to 39*54fd6939SJiyong Parkexecute the registered handler [10]. The client terminates its execution with 40*54fd6939SJiyong Park``SDEI_EVENT_COMPLETE`` [11], following which the dispatcher resumes the 41*54fd6939SJiyong Parkoriginal EL2 execution [13]. Note that the SDEI interrupt remains active until 42*54fd6939SJiyong Parkthe client handler completes, at which point EL3 does EOI [12]. 43*54fd6939SJiyong Park 44*54fd6939SJiyong ParkOther than events bound to interrupts, as depicted in the sequence above, SDEI 45*54fd6939SJiyong Parkevents can be explicitly dispatched in response to other exceptions, for 46*54fd6939SJiyong Parkexample, upon receiving an *SError* or *Synchronous External Abort*. See 47*54fd6939SJiyong Park`Explicit dispatch of events`_. 48*54fd6939SJiyong Park 49*54fd6939SJiyong ParkThe remainder of this document only discusses the design and implementation of 50*54fd6939SJiyong ParkSDEI dispatcher in TF-A, and assumes that the reader is familiar with the SDEI 51*54fd6939SJiyong Parkspecification, the interfaces, and their requirements. 52*54fd6939SJiyong Park 53*54fd6939SJiyong ParkDefining events 54*54fd6939SJiyong Park--------------- 55*54fd6939SJiyong Park 56*54fd6939SJiyong ParkA platform choosing to include the SDEI dispatcher must also define the events 57*54fd6939SJiyong Parkavailable on the platform, along with their attributes. 58*54fd6939SJiyong Park 59*54fd6939SJiyong ParkThe platform is expected to provide two arrays of event descriptors: one for 60*54fd6939SJiyong Parkprivate events, and another for shared events. The SDEI dispatcher provides 61*54fd6939SJiyong Park``SDEI_PRIVATE_EVENT()`` and ``SDEI_SHARED_EVENT()`` macros to populate the 62*54fd6939SJiyong Parkevent descriptors. Both macros take 3 arguments: 63*54fd6939SJiyong Park 64*54fd6939SJiyong Park- The event number: this must be a positive 32-bit integer. 65*54fd6939SJiyong Park 66*54fd6939SJiyong Park- For an event that has a backing interrupt, the interrupt number the event is 67*54fd6939SJiyong Park bound to: 68*54fd6939SJiyong Park 69*54fd6939SJiyong Park - If it's not applicable to an event, this shall be left as ``0``. 70*54fd6939SJiyong Park 71*54fd6939SJiyong Park - If the event is dynamic, this should be specified as ``SDEI_DYN_IRQ``. 72*54fd6939SJiyong Park 73*54fd6939SJiyong Park- A bit map of `Event flags`_. 74*54fd6939SJiyong Park 75*54fd6939SJiyong ParkTo define event 0, the macro ``SDEI_DEFINE_EVENT_0()`` should be used. This 76*54fd6939SJiyong Parkmacro takes only one parameter: an SGI number to signal other PEs. 77*54fd6939SJiyong Park 78*54fd6939SJiyong ParkTo define an event that's meant to be explicitly dispatched (i.e., not as a 79*54fd6939SJiyong Parkresult of receiving an SDEI interrupt), the macro ``SDEI_EXPLICIT_EVENT()`` 80*54fd6939SJiyong Parkshould be used. It accepts two parameters: 81*54fd6939SJiyong Park 82*54fd6939SJiyong Park- The event number (as above); 83*54fd6939SJiyong Park 84*54fd6939SJiyong Park- Event priority: ``SDEI_MAPF_CRITICAL`` or ``SDEI_MAPF_NORMAL``, as described 85*54fd6939SJiyong Park below. 86*54fd6939SJiyong Park 87*54fd6939SJiyong ParkOnce the event descriptor arrays are defined, they should be exported to the 88*54fd6939SJiyong ParkSDEI dispatcher using the ``REGISTER_SDEI_MAP()`` macro, passing it the pointers 89*54fd6939SJiyong Parkto the private and shared event descriptor arrays, respectively. Note that the 90*54fd6939SJiyong Park``REGISTER_SDEI_MAP()`` macro must be used in the same file where the arrays are 91*54fd6939SJiyong Parkdefined. 92*54fd6939SJiyong Park 93*54fd6939SJiyong ParkRegarding event descriptors: 94*54fd6939SJiyong Park 95*54fd6939SJiyong Park- For Event 0: 96*54fd6939SJiyong Park 97*54fd6939SJiyong Park - There must be exactly one descriptor in the private array, and none in the 98*54fd6939SJiyong Park shared array. 99*54fd6939SJiyong Park 100*54fd6939SJiyong Park - The event should be defined using ``SDEI_DEFINE_EVENT_0()``. 101*54fd6939SJiyong Park 102*54fd6939SJiyong Park - Must be bound to a Secure SGI on the platform. 103*54fd6939SJiyong Park 104*54fd6939SJiyong Park- Explicit events should only be used in the private array. 105*54fd6939SJiyong Park 106*54fd6939SJiyong Park- Statically bound shared and private interrupts must be bound to shared and 107*54fd6939SJiyong Park private interrupts on the platform, respectively. See the section on 108*54fd6939SJiyong Park `Configuration within Exception Handling Framework`_. 109*54fd6939SJiyong Park 110*54fd6939SJiyong Park- Both arrays should be one-dimensional. The ``REGISTER_SDEI_MAP()`` macro 111*54fd6939SJiyong Park takes care of replicating private events for each PE on the platform. 112*54fd6939SJiyong Park 113*54fd6939SJiyong Park- Both arrays must be sorted in the increasing order of event number. 114*54fd6939SJiyong Park 115*54fd6939SJiyong ParkThe SDEI specification doesn't have provisions for discovery of available events 116*54fd6939SJiyong Parkon the platform. The list of events made available to the client, along with 117*54fd6939SJiyong Parktheir semantics, have to be communicated out of band; for example, through 118*54fd6939SJiyong ParkDevice Trees or firmware configuration tables. 119*54fd6939SJiyong Park 120*54fd6939SJiyong ParkSee also `Event definition example`_. 121*54fd6939SJiyong Park 122*54fd6939SJiyong ParkEvent flags 123*54fd6939SJiyong Park~~~~~~~~~~~ 124*54fd6939SJiyong Park 125*54fd6939SJiyong ParkEvent flags describe the properties of the event. They are bit maps that can be 126*54fd6939SJiyong Park``OR``\ ed to form parameters to macros that define events (see 127*54fd6939SJiyong Park`Defining events`_). 128*54fd6939SJiyong Park 129*54fd6939SJiyong Park- ``SDEI_MAPF_DYNAMIC``: Marks the event as dynamic. Dynamic events can be 130*54fd6939SJiyong Park bound to (or released from) any Non-secure interrupt at runtime via the 131*54fd6939SJiyong Park ``SDEI_INTERRUPT_BIND`` and ``SDEI_INTERRUPT_RELEASE`` calls. 132*54fd6939SJiyong Park 133*54fd6939SJiyong Park- ``SDEI_MAPF_BOUND``: Marks the event as statically bound to an interrupt. 134*54fd6939SJiyong Park These events cannot be re-bound at runtime. 135*54fd6939SJiyong Park 136*54fd6939SJiyong Park- ``SDEI_MAPF_NORMAL``: Marks the event as having *Normal* priority. This is 137*54fd6939SJiyong Park the default priority. 138*54fd6939SJiyong Park 139*54fd6939SJiyong Park- ``SDEI_MAPF_CRITICAL``: Marks the event as having *Critical* priority. 140*54fd6939SJiyong Park 141*54fd6939SJiyong ParkEvent definition example 142*54fd6939SJiyong Park------------------------ 143*54fd6939SJiyong Park 144*54fd6939SJiyong Park.. code:: c 145*54fd6939SJiyong Park 146*54fd6939SJiyong Park static sdei_ev_map_t plat_private_sdei[] = { 147*54fd6939SJiyong Park /* Event 0 definition */ 148*54fd6939SJiyong Park SDEI_DEFINE_EVENT_0(8), 149*54fd6939SJiyong Park 150*54fd6939SJiyong Park /* PPI */ 151*54fd6939SJiyong Park SDEI_PRIVATE_EVENT(8, 23, SDEI_MAPF_BOUND), 152*54fd6939SJiyong Park 153*54fd6939SJiyong Park /* Dynamic private events */ 154*54fd6939SJiyong Park SDEI_PRIVATE_EVENT(100, SDEI_DYN_IRQ, SDEI_MAPF_DYNAMIC), 155*54fd6939SJiyong Park SDEI_PRIVATE_EVENT(101, SDEI_DYN_IRQ, SDEI_MAPF_DYNAMIC) 156*54fd6939SJiyong Park 157*54fd6939SJiyong Park /* Events for explicit dispatch */ 158*54fd6939SJiyong Park SDEI_EXPLICIT_EVENT(2000, SDEI_MAPF_NORMAL); 159*54fd6939SJiyong Park SDEI_EXPLICIT_EVENT(2000, SDEI_MAPF_CRITICAL); 160*54fd6939SJiyong Park }; 161*54fd6939SJiyong Park 162*54fd6939SJiyong Park /* Shared event mappings */ 163*54fd6939SJiyong Park static sdei_ev_map_t plat_shared_sdei[] = { 164*54fd6939SJiyong Park SDEI_SHARED_EVENT(804, 0, SDEI_MAPF_DYNAMIC), 165*54fd6939SJiyong Park 166*54fd6939SJiyong Park /* Dynamic shared events */ 167*54fd6939SJiyong Park SDEI_SHARED_EVENT(3000, SDEI_DYN_IRQ, SDEI_MAPF_DYNAMIC), 168*54fd6939SJiyong Park SDEI_SHARED_EVENT(3001, SDEI_DYN_IRQ, SDEI_MAPF_DYNAMIC) 169*54fd6939SJiyong Park }; 170*54fd6939SJiyong Park 171*54fd6939SJiyong Park /* Export SDEI events */ 172*54fd6939SJiyong Park REGISTER_SDEI_MAP(plat_private_sdei, plat_shared_sdei); 173*54fd6939SJiyong Park 174*54fd6939SJiyong ParkConfiguration within Exception Handling Framework 175*54fd6939SJiyong Park------------------------------------------------- 176*54fd6939SJiyong Park 177*54fd6939SJiyong ParkThe SDEI dispatcher functions alongside the Exception Handling Framework. This 178*54fd6939SJiyong Parkmeans that the platform must assign priorities to both Normal and Critical SDEI 179*54fd6939SJiyong Parkinterrupts for the platform: 180*54fd6939SJiyong Park 181*54fd6939SJiyong Park- Install priority descriptors for Normal and Critical SDEI interrupts. 182*54fd6939SJiyong Park 183*54fd6939SJiyong Park- For those interrupts that are statically bound (i.e. events defined as having 184*54fd6939SJiyong Park the ``SDEI_MAPF_BOUND`` property), enumerate their properties for the GIC 185*54fd6939SJiyong Park driver to configure interrupts accordingly. 186*54fd6939SJiyong Park 187*54fd6939SJiyong Park The interrupts must be configured to target EL3. This means that they should 188*54fd6939SJiyong Park be configured as *Group 0*. Additionally, on GICv2 systems, the build option 189*54fd6939SJiyong Park ``GICV2_G0_FOR_EL3`` must be set to ``1``. 190*54fd6939SJiyong Park 191*54fd6939SJiyong ParkSee also :ref:`porting_guide_sdei_requirements`. 192*54fd6939SJiyong Park 193*54fd6939SJiyong ParkDetermining client EL 194*54fd6939SJiyong Park--------------------- 195*54fd6939SJiyong Park 196*54fd6939SJiyong ParkThe SDEI specification requires that the *physical* SDEI client executes in the 197*54fd6939SJiyong Parkhighest Non-secure EL implemented on the system. This means that the dispatcher 198*54fd6939SJiyong Parkwill only allow SDEI calls to be made from: 199*54fd6939SJiyong Park 200*54fd6939SJiyong Park- EL2, if EL2 is implemented. The Hypervisor is expected to implement a 201*54fd6939SJiyong Park *virtual* SDEI dispatcher to support SDEI clients in Guest Operating Systems 202*54fd6939SJiyong Park executing in Non-secure EL1. 203*54fd6939SJiyong Park 204*54fd6939SJiyong Park- Non-secure EL1, if EL2 is not implemented or disabled. 205*54fd6939SJiyong Park 206*54fd6939SJiyong ParkSee the function ``sdei_client_el()`` in ``sdei_private.h``. 207*54fd6939SJiyong Park 208*54fd6939SJiyong Park.. _explicit-dispatch-of-events: 209*54fd6939SJiyong Park 210*54fd6939SJiyong ParkExplicit dispatch of events 211*54fd6939SJiyong Park--------------------------- 212*54fd6939SJiyong Park 213*54fd6939SJiyong ParkTypically, an SDEI event dispatch is caused by the PE receiving interrupts that 214*54fd6939SJiyong Parkare bound to an SDEI event. However, there are cases where the Secure world 215*54fd6939SJiyong Parkrequires dispatch of an SDEI event as a direct or indirect result of a past 216*54fd6939SJiyong Parkactivity, such as receiving a Secure interrupt or an exception. 217*54fd6939SJiyong Park 218*54fd6939SJiyong ParkThe SDEI dispatcher implementation provides ``sdei_dispatch_event()`` API for 219*54fd6939SJiyong Parkthis purpose. The API has the following signature: 220*54fd6939SJiyong Park 221*54fd6939SJiyong Park.. code:: c 222*54fd6939SJiyong Park 223*54fd6939SJiyong Park int sdei_dispatch_event(int ev_num); 224*54fd6939SJiyong Park 225*54fd6939SJiyong ParkThe parameter ``ev_num`` is the event number to dispatch. The API returns ``0`` 226*54fd6939SJiyong Parkon success, or ``-1`` on failure. 227*54fd6939SJiyong Park 228*54fd6939SJiyong ParkThe following figure depicts a scenario involving explicit dispatch of SDEI 229*54fd6939SJiyong Parkevent. A commentary is provided below: 230*54fd6939SJiyong Park 231*54fd6939SJiyong Park.. uml:: ../resources/diagrams/plantuml/sdei_explicit_dispatch.puml 232*54fd6939SJiyong Park 233*54fd6939SJiyong ParkAs part of initialisation, the SDEI client registers a handler for a platform 234*54fd6939SJiyong Parkevent [1], enables the event [3], and unmasks the current PE [5]. Note that, 235*54fd6939SJiyong Parkunlike in `general SDEI dispatch`_, this doesn't involve interrupt binding, as 236*54fd6939SJiyong Parkbound or dynamic events can't be explicitly dispatched (see the section below). 237*54fd6939SJiyong Park 238*54fd6939SJiyong ParkAt a later point in time, a critical event [#critical-event]_ is trapped into 239*54fd6939SJiyong ParkEL3 [7]. EL3 performs a first-level triage of the event, and a RAS component 240*54fd6939SJiyong Parkassumes further handling [8]. The dispatch completes, but intends to involve 241*54fd6939SJiyong ParkNon-secure world in further handling, and therefore decides to explicitly 242*54fd6939SJiyong Parkdispatch an event [10] (which the client had already registered for [1]). The 243*54fd6939SJiyong Parkrest of the sequence is similar to that in the `general SDEI dispatch`_: the 244*54fd6939SJiyong Parkrequested event is dispatched to the client (assuming all the conditions are 245*54fd6939SJiyong Parkmet), and when the handler completes, the preempted execution resumes. 246*54fd6939SJiyong Park 247*54fd6939SJiyong ParkConditions for event dispatch 248*54fd6939SJiyong Park~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 249*54fd6939SJiyong Park 250*54fd6939SJiyong ParkAll of the following requirements must be met for the API to return ``0`` and 251*54fd6939SJiyong Parkevent to be dispatched: 252*54fd6939SJiyong Park 253*54fd6939SJiyong Park- SDEI events must be unmasked on the PE. I.e. the client must have called 254*54fd6939SJiyong Park ``PE_UNMASK`` beforehand. 255*54fd6939SJiyong Park 256*54fd6939SJiyong Park- Event 0 can't be dispatched. 257*54fd6939SJiyong Park 258*54fd6939SJiyong Park- The event must be declared using the ``SDEI_EXPLICIT_EVENT()`` macro 259*54fd6939SJiyong Park described above. 260*54fd6939SJiyong Park 261*54fd6939SJiyong Park- The event must be private to the PE. 262*54fd6939SJiyong Park 263*54fd6939SJiyong Park- The event must have been registered for and enabled. 264*54fd6939SJiyong Park 265*54fd6939SJiyong Park- A dispatch for the same event must not be outstanding. I.e. it hasn't already 266*54fd6939SJiyong Park been dispatched and is yet to be completed. 267*54fd6939SJiyong Park 268*54fd6939SJiyong Park- The priority of the event (either Critical or Normal, as configured by the 269*54fd6939SJiyong Park platform at build-time) shouldn't cause priority inversion. This means: 270*54fd6939SJiyong Park 271*54fd6939SJiyong Park - If it's of Normal priority, neither Normal nor Critical priority dispatch 272*54fd6939SJiyong Park must be outstanding on the PE. 273*54fd6939SJiyong Park 274*54fd6939SJiyong Park - If it's of a Critical priority, no Critical priority dispatch must be 275*54fd6939SJiyong Park outstanding on the PE. 276*54fd6939SJiyong Park 277*54fd6939SJiyong ParkFurther, the caller should be aware of the following assumptions made by the 278*54fd6939SJiyong Parkdispatcher: 279*54fd6939SJiyong Park 280*54fd6939SJiyong Park- The caller of the API is a component running in EL3; for example, a RAS 281*54fd6939SJiyong Park driver. 282*54fd6939SJiyong Park 283*54fd6939SJiyong Park- The requested dispatch will be permitted by the Exception Handling Framework. 284*54fd6939SJiyong Park I.e. the caller must make sure that the requested dispatch has sufficient 285*54fd6939SJiyong Park priority so as not to cause priority level inversion within Exception 286*54fd6939SJiyong Park Handling Framework. 287*54fd6939SJiyong Park 288*54fd6939SJiyong Park- The caller must be prepared for the SDEI dispatcher to restore the Non-secure 289*54fd6939SJiyong Park context, and mark that the active context. 290*54fd6939SJiyong Park 291*54fd6939SJiyong Park- The call will block until the SDEI client completes the event (i.e. when the 292*54fd6939SJiyong Park client calls either ``SDEI_EVENT_COMPLETE`` or ``SDEI_COMPLETE_AND_RESUME``). 293*54fd6939SJiyong Park 294*54fd6939SJiyong Park- The caller must be prepared for this API to return failure and handle 295*54fd6939SJiyong Park accordingly. 296*54fd6939SJiyong Park 297*54fd6939SJiyong ParkPorting requirements 298*54fd6939SJiyong Park-------------------- 299*54fd6939SJiyong Park 300*54fd6939SJiyong ParkThe porting requirements of the SDEI dispatcher are outlined in the 301*54fd6939SJiyong Park:ref:`Porting Guide <porting_guide_sdei_requirements>`. 302*54fd6939SJiyong Park 303*54fd6939SJiyong ParkNote on writing SDEI event handlers 304*54fd6939SJiyong Park----------------------------------- 305*54fd6939SJiyong Park 306*54fd6939SJiyong Park*This section pertains to SDEI event handlers in general, not just when using 307*54fd6939SJiyong Parkthe TF-A SDEI dispatcher.* 308*54fd6939SJiyong Park 309*54fd6939SJiyong ParkThe SDEI specification requires that event handlers preserve the contents of all 310*54fd6939SJiyong Parkregisters except ``x0`` to ``x17``. This has significance if event handler is 311*54fd6939SJiyong Parkwritten in C: compilers typically adjust the stack frame at the beginning and 312*54fd6939SJiyong Parkend of C functions. For example, AArch64 GCC typically produces the following 313*54fd6939SJiyong Parkfunction prologue and epilogue: 314*54fd6939SJiyong Park 315*54fd6939SJiyong Park:: 316*54fd6939SJiyong Park 317*54fd6939SJiyong Park c_event_handler: 318*54fd6939SJiyong Park stp x29, x30, [sp,#-32]! 319*54fd6939SJiyong Park mov x29, sp 320*54fd6939SJiyong Park 321*54fd6939SJiyong Park ... 322*54fd6939SJiyong Park 323*54fd6939SJiyong Park bl ... 324*54fd6939SJiyong Park 325*54fd6939SJiyong Park ... 326*54fd6939SJiyong Park 327*54fd6939SJiyong Park ldp x29, x30, [sp],#32 328*54fd6939SJiyong Park ret 329*54fd6939SJiyong Park 330*54fd6939SJiyong ParkThe register ``x29`` is used as frame pointer in the prologue. Because neither a 331*54fd6939SJiyong Parkvalid ``SDEI_EVENT_COMPLETE`` nor ``SDEI_EVENT_COMPLETE_AND_RESUME`` calls 332*54fd6939SJiyong Parkreturn to the handler, the epilogue never gets executed, and registers ``x29`` 333*54fd6939SJiyong Parkand ``x30`` (in the case above) are inadvertently corrupted. This violates the 334*54fd6939SJiyong ParkSDEI specification, and the normal execution thereafter will result in 335*54fd6939SJiyong Parkunexpected behaviour. 336*54fd6939SJiyong Park 337*54fd6939SJiyong ParkTo work this around, it's advised that the top-level event handlers are 338*54fd6939SJiyong Parkimplemented in assembly, following a similar pattern as below: 339*54fd6939SJiyong Park 340*54fd6939SJiyong Park:: 341*54fd6939SJiyong Park 342*54fd6939SJiyong Park asm_event_handler: 343*54fd6939SJiyong Park /* Save link register whilst maintaining stack alignment */ 344*54fd6939SJiyong Park stp xzr, x30, [sp, #-16]! 345*54fd6939SJiyong Park bl c_event_handler 346*54fd6939SJiyong Park 347*54fd6939SJiyong Park /* Restore link register */ 348*54fd6939SJiyong Park ldp xzr, x30, [sp], #16 349*54fd6939SJiyong Park 350*54fd6939SJiyong Park /* Complete call */ 351*54fd6939SJiyong Park ldr x0, =SDEI_EVENT_COMPLETE 352*54fd6939SJiyong Park smc #0 353*54fd6939SJiyong Park b . 354*54fd6939SJiyong Park 355*54fd6939SJiyong Park-------------- 356*54fd6939SJiyong Park 357*54fd6939SJiyong Park*Copyright (c) 2017-2019, Arm Limited and Contributors. All rights reserved.* 358*54fd6939SJiyong Park 359*54fd6939SJiyong Park.. rubric:: Footnotes 360*54fd6939SJiyong Park 361*54fd6939SJiyong Park.. [#std-event] Except event 0, which is defined by the SDEI specification as a 362*54fd6939SJiyong Park standard event. 363*54fd6939SJiyong Park 364*54fd6939SJiyong Park.. [#critical-event] Examples of critical events are *SError*, *Synchronous 365*54fd6939SJiyong Park External Abort*, *Fault Handling interrupt* or *Error 366*54fd6939SJiyong Park Recovery interrupt* from one of RAS nodes in the system. 367*54fd6939SJiyong Park 368*54fd6939SJiyong Park.. _SDEI specification: http://infocenter.arm.com/help/topic/com.arm.doc.den0054a/ARM_DEN0054A_Software_Delegated_Exception_Interface.pdf 369*54fd6939SJiyong Park.. _Software Delegated Exception Interface: `SDEI specification`_ 370