arm64: a few alignment fixes

The structure for the arm64_cpu_init array has to carry the cache
alignment on the whole structure and not on some internal padding
to achieve the desired effect.

And align struct __esf to a 16-byte boundary which will also align
its size accordingly. This structure is allocated on the stack on
exception entry and the ABI prescribed 16-byte stack alignment
should be preserved.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
Nicolas Pitre 2021-04-08 17:56:28 -04:00 committed by Anas Nashif
commit fc8c53ff0e
2 changed files with 2 additions and 3 deletions

View file

@ -30,8 +30,7 @@ volatile struct {
void *sp; /* Fixed at the first entry */
arch_cpustart_t fn;
void *arg;
char pad[] __aligned(L1_CACHE_BYTES);
} arm64_cpu_init[CONFIG_MP_NUM_CPUS];
} __aligned(L1_CACHE_BYTES) arm64_cpu_init[CONFIG_MP_NUM_CPUS];
extern void __start(void);

View file

@ -50,7 +50,7 @@ struct __esf {
#ifdef CONFIG_USERSPACE
uint64_t tpidrro_el0;
#endif
};
} __aligned(16);
typedef struct __esf z_arch_esf_t;