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