summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/stacktrace.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-12-09 12:10:13 +0100
committerArd Biesheuvel <ardb@kernel.org>2023-01-16 15:27:31 +0100
commit7ea55715c421d22c1b63f7129cae6a654091b695 (patch)
tree19143b664c146967573eee1aa22c4c3b5daacde7 /arch/arm64/include/asm/stacktrace.h
parentarm64: efi: Avoid workqueue to check whether EFI runtime is live (diff)
downloadlinux-7ea55715c421d22c1b63f7129cae6a654091b695.tar.xz
linux-7ea55715c421d22c1b63f7129cae6a654091b695.zip
arm64: efi: Account for the EFI runtime stack in stack unwinder
The EFI runtime services run from a dedicated stack now, and so the stack unwinder needs to be informed about this. Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/stacktrace.h')
-rw-r--r--arch/arm64/include/asm/stacktrace.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/stacktrace.h b/arch/arm64/include/asm/stacktrace.h
index 4e5354beafb0..66ec8caa6ac0 100644
--- a/arch/arm64/include/asm/stacktrace.h
+++ b/arch/arm64/include/asm/stacktrace.h
@@ -106,4 +106,19 @@ static inline struct stack_info stackinfo_get_sdei_critical(void)
#define stackinfo_get_sdei_critical() stackinfo_get_unknown()
#endif
+#ifdef CONFIG_EFI
+extern u64 *efi_rt_stack_top;
+
+static inline struct stack_info stackinfo_get_efi(void)
+{
+ unsigned long high = (u64)efi_rt_stack_top;
+ unsigned long low = high - THREAD_SIZE;
+
+ return (struct stack_info) {
+ .low = low,
+ .high = high,
+ };
+}
+#endif
+
#endif /* __ASM_STACKTRACE_H */