Attention is currently required from: Arthur Heymans, David Hendricks, Jérémy Compostella, Kapil Porwal, Nico Huber, Patrick Rudolph, Subrata Banik, Werner Zeh.
Julius Werner 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 14:
(2 comments)
Patchset:
PS14:
Reading MSRs which can indicate whether a system is in long mode, I think, can be done mode agnostic […]
Designing a single entry point that can work for both modes is interesting, I don't think anybody had suggested that yet. (I wonder why Linux isn't doing that and does the hardcoded 0x200 offset thing instead. Are you sure the binary representation for all instructions up to reading the MSR, checking the bit and branching based off the output can be 100% the same?)
So you're basically saying that we should write 64-bit payloads such that they can be entered in both modes, but continue having coreboot always transition back down to 32-bit for the handoff (meaning we'd always switch modes twice on every 64-to-64 handoff). Later once X86S chips come along they'll always enter the payload in 64-bit instead and the 64-bit payloads we start building now will already work with that then. (And if they try booting a 32-bit payload then, well, I guess it will probably crash at some point? That doesn't seem ideal but if everyone here thinks keeping the 64-bit payloads compatible to older coreboot is more important than clear error messages for older payloads on X86S, I can go along with that.)
I agree that that maintains a bit more compatibility than the other suggestions, although there's a bit of waste that comes with it, but I don't know how much that matters in practice. Does anyone know how much time the mode switch down and back up again takes? And how complicated is the page table setup code? (I hope we won't need full 32-bit C files and can handle this all in assembly?)
PS14:
Sidenote: https://www.coreboot. […]
I think that has never really been used, and been officially deprecated with CB:74965.