[PATCH 2/2] efi_loader: Fix kernel panic when FTRACE is enabled
Patrick Rudolph
patrick.rudolph at 9elements.com
Wed Dec 17 08:25:57 CET 2025
When FTRACE is enabled the EFI runtime will call the tracing functions
that are not marked as __efi_runtime and cause a kernel panic since
the functions have been previously unmapped by the kernel.
Resolve this issue by adding the 'notrace' attribute to '__efi_runtime'
attribute and thus disable tracing the EFI runtime. If required this
can be worked out latter.
TEST=Can boot a UEFI compatible linux OS on qemu-q35 when U-Boot was
built with FTRACE=1.
Signed-off-by: Patrick Rudolph <patrick.rudolph at 9elements.com>
---
include/efi_loader.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 3e70ac07055..7a13c390cbe 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -66,7 +66,7 @@ struct bootflow;
*
* static __efi_runtime compute_my_table(void);
*/
-#define __efi_runtime __section(".text.efi_runtime")
+#define __efi_runtime __section(".text.efi_runtime") notrace
/*
* Call this with mmio_ptr as the _pointer_ to a pointer to an MMIO region
--
2.52.0
More information about the U-Boot
mailing list