xref: /freebsd/sys/contrib/device-tree/Bindings/arm/firmware/sdei.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* Software Delegated Exception Interface (SDEI)
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotFirmware implementing the SDEI functions described in ARM document number
4*c66ec88fSEmmanuel VadotARM DEN 0054A ("Software Delegated Exception Interface") can be used by
5*c66ec88fSEmmanuel VadotLinux to receive notification of events such as those generated by
6*c66ec88fSEmmanuel Vadotfirmware-first error handling, or from an IRQ that has been promoted to
7*c66ec88fSEmmanuel Vadota firmware-assisted NMI.
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel VadotThe interface provides a number of API functions for registering callbacks
10*c66ec88fSEmmanuel Vadotand enabling/disabling events. Functions are invoked by trapping to the
11*c66ec88fSEmmanuel Vadotprivilege level of the SDEI firmware (specified as part of the binding
12*c66ec88fSEmmanuel Vadotbelow) and passing arguments in a manner specified by the "SMC Calling
13*c66ec88fSEmmanuel VadotConvention (ARM DEN 0028B):
14*c66ec88fSEmmanuel Vadot
15*c66ec88fSEmmanuel Vadot	 r0		=> 32-bit Function ID / return value
16*c66ec88fSEmmanuel Vadot	{r1 - r3}	=> Parameters
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel VadotNote that the immediate field of the trapping instruction must be set
19*c66ec88fSEmmanuel Vadotto #0.
20*c66ec88fSEmmanuel Vadot
21*c66ec88fSEmmanuel VadotThe SDEI_EVENT_REGISTER function registers a callback in the kernel
22*c66ec88fSEmmanuel Vadottext to handle the specified event number.
23*c66ec88fSEmmanuel Vadot
24*c66ec88fSEmmanuel VadotThe sdei node should be a child node of '/firmware' and have required
25*c66ec88fSEmmanuel Vadotproperties:
26*c66ec88fSEmmanuel Vadot
27*c66ec88fSEmmanuel Vadot - compatible    : should contain:
28*c66ec88fSEmmanuel Vadot	* "arm,sdei-1.0" : For implementations complying to SDEI version 1.x.
29*c66ec88fSEmmanuel Vadot
30*c66ec88fSEmmanuel Vadot - method        : The method of calling the SDEI firmware. Permitted
31*c66ec88fSEmmanuel Vadot                   values are:
32*c66ec88fSEmmanuel Vadot	* "smc" : SMC #0, with the register assignments specified in this
33*c66ec88fSEmmanuel Vadot	          binding.
34*c66ec88fSEmmanuel Vadot	* "hvc" : HVC #0, with the register assignments specified in this
35*c66ec88fSEmmanuel Vadot	          binding.
36*c66ec88fSEmmanuel VadotExample:
37*c66ec88fSEmmanuel Vadot	firmware {
38*c66ec88fSEmmanuel Vadot		sdei {
39*c66ec88fSEmmanuel Vadot			compatible	= "arm,sdei-1.0";
40*c66ec88fSEmmanuel Vadot			method		= "smc";
41*c66ec88fSEmmanuel Vadot		};
42*c66ec88fSEmmanuel Vadot	};
43