Attention is currently required from: Nico Huber, Martin L Roth, Angel Pons, Felix Held.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68648 )
Change subject: lib/Kconfig: Disable `DECOMPRESS_OFAST` for x86_64 ......................................................................
Patch Set 1:
(1 comment)
File src/lib/Kconfig:
https://review.coreboot.org/c/coreboot/+/68648/comment/e11e364a_c7e1a28d PS1, Line 121: USE_EXP_X86_64_SUPPORT
It wouldn't make sense, though: the problem seems to be that `-Ofast` breaks the decompression algorithm itself when it's built for x86_64, which is part of postcar.
The decompression algoritm is in postcar and ramstage.
It just uses SSE instructions which are not enabled for qemu 64 bit. The compiler often assumes they are.
Even though coreboot doesn't support it yet, one could do something similar to UEFI: SEC and PEI stages (bootblock till postcar) are 32-bit code, whereas DXE onwards (ramstage onwards) are 64-bit code. In such a configuration, postcar would be 32-bit code and would still work, although decompressing the payload would likely fail.
It's by design that everything is run in 64bit from the start. Having incompatible structs between stages is too much of a pain to deal with. Partial 32/64 bit makes little sense.
Moreover, this could or could not be an issue for non-x86 platforms. If an x86_64 platform is ever introduced that only uses 64-bit mode, then this issue should be revisited.