Attention is currently required from: Julius Werner, Jan Dabros. Jakub Czapiga has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43510 )
Change subject: tests: Add lib/bootmem-test test case ......................................................................
Patch Set 5:
(2 comments)
File tests/lib/bootmem-test.c:
https://review.coreboot.org/c/coreboot/+/43510/comment/e35f656d_10fe276e PS5, Line 29: to avoid problems with compile-time expressions containing symbols. */
What problems did you have with this? Ideally we can solve them rather than needing to duplicate so […]
I had problems with `#define STACK_END_TO_RESERVED_START_SIZE (RESERVED_START - STACK_END)` and similar cases. This macro contains expresion with linker symbol value and constant value (#define or const int, does not matter). If you try to do this you will get an error telling that it cannot be put in global structure, because value is not computable at load-time.
I was thinking about defining separate symbols with this value but there are problems with symbol size. Default size is 32-bit and I do not want to use compiler flags like `-mcmodel=large` you suggested, because it would give an impression that it is required to make lib/bootmem work correctly.
https://review.coreboot.org/c/coreboot/+/43510/comment/e6cd709b_2aa42022 PS5, Line 36: TEST_SYMBOL(_eprogram, _program + _program_size);
Looking at this again I really think we should introduce another wrapper macro for this use case, e. […]
Yes, macro like that would make tests code more readable. I will introduce it in separate change. :)