Krystian Hebel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30118 )
Change subject: arch/x86/boot: Call payload in protected mode ......................................................................
Patch Set 13:
(1 comment)
https://review.coreboot.org/#/c/30118/8/src/arch/x86/c_start.S File src/arch/x86/c_start.S:
https://review.coreboot.org/#/c/30118/8/src/arch/x86/c_start.S@387 PS8, Line 387: push %rsp This should be `push %rdx`, then restoration in setCodeSelectorLongJump32 is not required. IRET does not align RSP, neither does it check if it is aligned. In the long mode RSP is aligned by hardware when interrupt happens, before values are pushed on stack.
Actually, the new RIP could be loaded from the stack (the return instruction pointer), then setCodeSelectorLongJump32 should not be needed at all.