diff --git a/arch/x86_64/src/intel64/intel64_head.S b/arch/x86_64/src/intel64/intel64_head.S index 488f487fa69..355974e8e98 100644 --- a/arch/x86_64/src/intel64/intel64_head.S +++ b/arch/x86_64/src/intel64/intel64_head.S @@ -398,6 +398,13 @@ ap_start: /* Jump to ap_start routine */ movabs $x86_64_ap_boot, %rbx + + /* We need to simulate the behavior of the call instruction, which by + * default pushes 8 bytes of the RIP. Otherwise, the function's stack + * won't be 16-byte aligned. + */ + + pushq $0 jmp *%rbx #endif