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