scripts: gen_priv_stacks.py: use the right alignment for priv stacks
The privilege stacks are not sandboxed inside an MPU region, so they do not have to be aligned with the stack buffer size. We fix this by using the PRIVILEGE_STACK_ALIGN macro, which is defined in arch.h and reflects the minimum alignment requirement for privilege stack buffers. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
723aae9503
commit
88959e75dd
1 changed files with 3 additions and 1 deletions
|
@ -39,8 +39,10 @@ header = """%compare-lengths
|
|||
"""
|
||||
|
||||
|
||||
# Each privilege stack buffer needs to respect the alignment
|
||||
# constraints as specified in arm/arch.h.
|
||||
priv_stack_decl_temp = ("static u8_t __used"
|
||||
" __aligned(CONFIG_PRIVILEGED_STACK_SIZE)"
|
||||
" __aligned(Z_PRIVILEGE_STACK_ALIGN)"
|
||||
" priv_stack_%x[CONFIG_PRIVILEGED_STACK_SIZE];\n")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue