handoff: Use call instead of jmp to maintain proper stack alignment.

When calling into a function, the ABI says that the RSP + 8 should be 16 byte
aligned. When in handoff_common_asm the RSP was itself 16 byte aligned, which
would result in the correct alignment if a call was made which would push a
return address on the stack.

The mechanism used to go from handoff_common_asm to handoff_common was a jmp
instruction since the later should never return to the former, and it seemed
like a waste to put a return address on the stack that would never be used.
That was technically incorrect though, since it threw off stack alignment
from that point forward. Most of the time that doesn't matter and things still
work anyway, but on a particular machine that prevents calls into UEFI from
working properly/at all.

Since we're compelled to waste the 8 bytes regardless, we might as well use a
call instruction instead of the jmp and maintain the correct alignment.

Change-Id: Iff5e8e1184e435b82c18c20ed39f95e2dd7c7b27
1 file changed