Skip to content

Commit

Permalink
sof: Align interrupt stacks
Browse files Browse the repository at this point in the history
Xtensa ABI requires the stack to always be aligned to a multiple of 16
bytes. This commit aligns the stacks used for interrupt handling.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
  • Loading branch information
Paul Olaru authored and dbaluta committed Nov 21, 2019
1 parent a25d50e commit 9b5dc8c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/arch/xtensa/xtos/xtos-structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define __XTOS_XTOS_STRUCTS_H__

#include "xtos-internal.h"
#include <sof/common.h>
#include <sof/lib/memory.h>
#include <config.h>
#include <xtensa/xtruntime-frames.h>
Expand All @@ -29,19 +30,19 @@ struct xtos_core_data {
struct XtosInterruptStructure xtos_int_data;
#endif
#if CONFIG_INTERRUPT_LEVEL_1
uint8_t xtos_stack_for_interrupt_1[SOF_STACK_SIZE];
uint8_t xtos_stack_for_interrupt_1[SOF_STACK_SIZE] __aligned(16);
#endif
#if CONFIG_INTERRUPT_LEVEL_2
uint8_t xtos_stack_for_interrupt_2[SOF_STACK_SIZE];
uint8_t xtos_stack_for_interrupt_2[SOF_STACK_SIZE] __aligned(16);
#endif
#if CONFIG_INTERRUPT_LEVEL_3
uint8_t xtos_stack_for_interrupt_3[SOF_STACK_SIZE];
uint8_t xtos_stack_for_interrupt_3[SOF_STACK_SIZE] __aligned(16);
#endif
#if CONFIG_INTERRUPT_LEVEL_4
uint8_t xtos_stack_for_interrupt_4[SOF_STACK_SIZE];
uint8_t xtos_stack_for_interrupt_4[SOF_STACK_SIZE] __aligned(16);
#endif
#if CONFIG_INTERRUPT_LEVEL_5
uint8_t xtos_stack_for_interrupt_5[SOF_STACK_SIZE];
uint8_t xtos_stack_for_interrupt_5[SOF_STACK_SIZE] __aligned(16);
#endif
xtos_task_context xtos_interrupt_ctx;
uintptr_t xtos_saved_sp;
Expand Down

0 comments on commit 9b5dc8c

Please sign in to comment.