Attention is currently required from: Paul Fagerburg, 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 4:
(4 comments)
File tests/lib/bootmem-test.c:
https://review.coreboot.org/c/coreboot/+/43510/comment/7e74a71f_17f90771 PS2, Line 171: static int setup_bootmem_walk(void **state)
This is because in my concept I would need to use non-constant initializers (linker symbols), which […]
Done. Only required regions symbols are set now from inside of the test source.
https://review.coreboot.org/c/coreboot/+/43510/comment/513c40dc_23b12874 PS2, Line 212: struct lb_memory *lb_mem; : : will_return_always(search_global_resources, &mem_device_mock); : : /* Allocate space for 5 lb_mem entries to be safe */ : lb_mem = malloc(sizeof(*lb_mem) + 5 * sizeof(struct lb_memory_range)); : : /* We need to call this only to initialize library */ : bootmem_write_memory_table(lb_mem); : free(lb_mem); :
Makes sense.
Done. Less code, more readability.
https://review.coreboot.org/c/coreboot/+/43510/comment/e417f85e_fe72104e PS2, Line 267: (
To be fixed.
Done
File tests/lib/bootmem-test.ld:
https://review.coreboot.org/c/coreboot/+/43510/comment/d28c498a_7b86875c PS2, Line 3: /*
Nice trick with using asm() here. […]
File removed. Symbol setup moved to the test source file.