diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm/arm/vm_machdep.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index cc87bbe..22a209b 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -398,6 +398,12 @@ cpu_thread_alloc(struct thread *td) PAGE_SIZE) - 1; td->td_frame = (struct trapframe *) ((u_int)td->td_kstack + USPACE_SVC_STACK_TOP - sizeof(struct pcb)) - 1; + /* + * Ensure td_frame is aligned to an 8 byte boundary as it will be + * placed into the stack pointer which must be 8 byte aligned in + * the ARM EABI. + */ + td->td_frame = (struct trapframe *)((u_int)td->td_frame & ~7); #ifdef __XSCALE__ #ifndef CPU_XSCALE_CORE3 pmap_use_minicache(td->td_kstack, td->td_kstack_pages * PAGE_SIZE); |