ANDROID: vendor_hooks:vendor hook for fiq

A hardware exception interrupt will be routed to kernel as fiq by atf,
we need to save logs/regs info to ddr when the fiq ocurred.
Therefore, a hook point is added before the fiq handler.

Bug: 335522774
Change-Id: I18fa76425cbc39b0f895d3907475c2dfc04c247f
Signed-off-by: qiusanming <qiusanming@xiaomi.com>
(cherry picked from commit f052f87d33f9f26ae0d420503a5043fd3f42dbf8)
This commit is contained in:
qiusanming
2024-04-13 13:11:53 +08:00
committed by Todd Kjos
parent 6fa673a171
commit 7153c2cc2f
3 changed files with 8 additions and 0 deletions
+3
View File
@@ -29,6 +29,7 @@
#include <asm/system_misc.h>
#include <trace/hooks/traps.h>
#include <trace/hooks/gic.h>
/*
* Handle IRQ/context state management when entering from kernel mode.
@@ -584,6 +585,7 @@ asmlinkage void noinstr el1h_64_irq_handler(struct pt_regs *regs)
asmlinkage void noinstr el1h_64_fiq_handler(struct pt_regs *regs)
{
trace_android_rvh_fiq_dump(regs);
el1_interrupt(regs, handle_arch_fiq);
}
@@ -841,6 +843,7 @@ static void noinstr __el0_fiq_handler_common(struct pt_regs *regs)
asmlinkage void noinstr el0t_64_fiq_handler(struct pt_regs *regs)
{
trace_android_rvh_fiq_dump(regs);
__el0_fiq_handler_common(regs);
}
+1
View File
@@ -617,3 +617,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_remove_migration_pte_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_split_huge_page_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_try_split_folio_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_scmi_limit_notify_cb);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_fiq_dump);
+4
View File
@@ -15,6 +15,10 @@ DECLARE_HOOK(android_vh_gic_set_affinity,
bool force, u8 *gic_cpu_map, void __iomem *reg),
TP_ARGS(d, mask_val, force, gic_cpu_map, reg));
DECLARE_RESTRICTED_HOOK(android_rvh_fiq_dump,
TP_PROTO(struct pt_regs *regs),
TP_ARGS(regs), 1);
#endif /* _TRACE_HOOK_GIC_H */
/* This part must be outside protection */
#include <trace/define_trace.h>