Attention is currently required from: Nico Huber, Tim Wawrzynczak. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63748 )
Change subject: libpayload: Support x86 payload loaded via Linux Boot Protocol ......................................................................
Patch Set 1:
(2 comments)
File payloads/libpayload/arch/x86/head.S:
https://review.coreboot.org/c/coreboot/+/63748/comment/d42c2898_e033751a PS1, Line 86: jne 1f
Good to know. I only had a quick look at it and couldn't find that CB_MAGIC […]
We do, but it looks like it's not actually used on x86 (it is on Arm). I think since the existing mechanism works well enough and trying to make use of that passed-in pointer would always risk introducing compatibility issues (it has been in coreboot for a long time, but for example libpayload's selfboot() still doesn't pass it along to the next payload), it's probably left to leave those things as they are.
We should probably get rid of this "Payload API" thing here, though.
https://review.coreboot.org/c/coreboot/+/63748/comment/b77d8c30_cc206d0b PS1, Line 105: esi
The caller points to a configuration struct (aka. zero page) in %esi. […]
Yeah, I think we should never try to dereference a potentially random memory address, even with some safety checks. If a Kconfig works for your use case I think that would be the best solution.