Change the panic code is stack has been smashed. This allows platform specific handlers to send new panic code to host if stack is smashed.
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- src/include/reef/debug.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/include/reef/debug.h b/src/include/reef/debug.h index 6554a51..672fa5b 100644 --- a/src/include/reef/debug.h +++ b/src/include/reef/debug.h @@ -128,7 +128,7 @@ #endif
/* dump stack as part of panic */ -static inline void dump_stack(uint32_t p, void *addr, size_t offset, +static inline uint32_t dump_stack(uint32_t p, void *addr, size_t offset, size_t limit) { extern void *__stack; @@ -142,7 +142,7 @@ static inline void dump_stack(uint32_t p, void *addr, size_t offset, if (stack_top - offset <= stack_limit) { stack_bottom = stack_limit; p = SOF_IPC_PANIC_STACK; - platform_panic(p); + return p; }
/* make sure stack size won't overflow dump area */ @@ -152,6 +152,7 @@ static inline void dump_stack(uint32_t p, void *addr, size_t offset, /* copy stack contents and writeback */ rmemcpy(addr, stack_top, size - sizeof(void *)); dcache_writeback_region(addr, size - sizeof(void *)); + return p; }
#endif