debug: stack: fix stack dump lower limit.

Don't try and dump data outside of the stack.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2018-02-23 13:49:32 +00:00
parent bcb8b1abeb
commit bbad6ec982
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ static inline void dump_stack(uint32_t p, void *addr, size_t offset,
{
extern void *__stack;
extern void *_stack_sentry;
void *stack_bottom = (void *)&__stack;
void *stack_bottom = (void *)&__stack - sizeof(void *);
void *stack_limit = (void *)&_stack_sentry;
void *stack_top = arch_get_stack_ptr() + offset;
size_t size = stack_bottom - stack_top;