Attention is currently required from: Jakub Czapiga, Paul Menzel, Jan Dabros. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/57708 )
Change subject: libpayload: Add mock architecture ......................................................................
Patch Set 8:
(6 comments)
File payloads/libpayload/Kconfig:
https://review.coreboot.org/c/coreboot/+/57708/comment/dcc369ae_42bb375e PS7, Line 480: default y
Done. However I have no idea, how to make BIG_ENDIAN=y possible. […]
That's because this doesn't have prompt string (after the `bool`) so it's not a "visible"/user-changeable option for Kconfig. It's not supposed to be either because usually this is a hard dependency on the architecture that cannot change, but the mock architecture is a special case, so you can model this with an extra ARCH_MOCK_BIG_ENDIAN option in arch/mock/Kconfig that does have a prompt string (and will then cause it to `select` the right option here).
File payloads/libpayload/Kconfig:
https://review.coreboot.org/c/coreboot/+/57708/comment/40ad35b3_6f77055f PS8, Line 125: MOCK This could look a bit nicer (e.g. "Mock architecture (for unit tests)").
File payloads/libpayload/Makefile:
https://review.coreboot.org/c/coreboot/+/57708/comment/4b7de264_fa6231df PS8, Line 162: host mock
https://review.coreboot.org/c/coreboot/+/57708/comment/b7daccd8_9d989631 PS8, Line 164: host ditto
File payloads/libpayload/arch/mock/head.c:
https://review.coreboot.org/c/coreboot/+/57708/comment/77d7139a_9ddfc247 PS8, Line 3: /* This file is empty on purpose. It should not be used. */ Then why does it exist? I still don't get it. Just take it out of the Makefile?
File payloads/libpayload/include/mock/arch/io.h:
https://review.coreboot.org/c/coreboot/+/57708/comment/d31a9ed7_faef6d2b PS8, Line 7: Maybe explain that tests are expected to implement mocks for these if they want to test code that calls them.