firmware: arm_sdei: Add driver for Software Delegated Exceptions
The Software Delegated Exception Interface (SDEI) is an ARM standard
for registering callbacks from the platform firmware into the OS.
This is typically used to implement firmware notifications (such as
firmware-first RAS) or promote an IRQ that has been promoted to a
firmware-assisted NMI.
Add the code for detecting the SDEI version and the framework for
registering and unregistering events. Subsequent patches will add the
arch-specific backend code and the necessary power management hooks.
Only shared events are supported, power management, private events and
discovery for ACPI systems will be added by later patches.
Signed-off-by:
James Morse <james.morse@arm.com>
CC: bogus bogus bogus
Changes since v4:
* Ripped out passed in gfp_t, it was masking a bug, all allocations are now
GFP_KERNEL.
* Switched spin_lock for a mutex and added a spin_lock around the list, this
fixes the bug and makes a later cpu-hotplug interaction easier.
* Dropped Catalin's ack
Changes since v3:
* Depend on arm64 from the beginning, add a placeholder arch asm file.
* Added MAINTAINER record
* Renamed sdei.h files to arm_sdei.h
* Removed IS_SDEI_CALL(), KVM won't need this...
Changes since v2:
* Copy the priority into the structure the arch asm handler gets. This
is used for VMAP stacks where we can't know if a critical event interrupted
a normal priority event, thus they need separate stacks.
Changes since v1:
* Changed entry point to unsigned long, if we support non-vhe systems this
won't be a valid pointer
* Made invoke_sdei_fn() pass the only register we are interested in, instead
of the whole arm_smccc_res
* Made all the locking WARN_ON()s lockdep_assert_held()s.
* Moved more messages from 'err' to 'warn'.
* Made IS_SDEI_CALL() not depend on whether the config option is selected.
* Made 'event failed' messages rate limited.
Loading
Please register or sign in to comment