Attention is currently required from: Julius Werner, Jérémy Compostella, Kapil Porwal, Nico Huber.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81960?usp=email )
Change subject: arch/x86: Enable long mode entry into payload for x86_64 support ......................................................................
Patch Set 2:
(1 comment)
File src/arch/x86/boot.c:
https://review.coreboot.org/c/coreboot/+/81960/comment/558e9a38_38396150 : PS1, Line 25: if (CONFIG(PAYLOAD_X86_64_SUPPORT)) {
[Subrata] I don't under why all of sudden the "multiple entry point approach" considered critical. The problem of supporting 64-bit direct entry can be handled w/o that as well. Having multiple entry point approach like kernel may not be that critical at this stage. we can jump into 64-bit entry point using boot.c code (CB:81960). For that we don't need to support multiple entry point approach. If you wish to implement multiple entry point approach, please do that w/o blocking the current task is my request.
So multiple entry points is for sure not a must to proceed I'd say. The point I tried to make was that you don't want different ways to inform coreboot ramstage to straight jump to 64bit payload entry (even if there is only one 64bit entry). So we should carefully discuss the route we want to take.
So what do you think of the following suggestion:
- Add a 64bit entry (maybe call it x86_long_mode, to avoid confusion?) in cbfs_payload_segment_type: maybe PAYLOAD_SEGMENT_X86_LONG_MODE_ENTRY ? - Add a way to cbfstool to mark the entry of the payload as such (similar to your --64 patch, but then not with file attr, but as payload segment) - 64bit ramstage coreboot at runtime decides to jump to PAYLOAD_SEGMENT_X86_LONG_MODE_ENTRY directly if found - If not found keep the old 32bit entering code
Then later iterations (that are unimportant to your use case, I assume): - cbfstool can detect multiple entry points and make the --64 code obsolete - Add multiple entry points to libpayload - More flexibility in coreboot: i.e. trampoline to 64bit payload with 32bit coreboot ramstage?
This allows you to move forward with jumping straight to a 64bit payload, while also allowing for some flexible backwards compatibility in some cases.