Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34872 )
Change subject: google/kukui: Load and run dram init blob ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34872/1/src/mainboard/google/kukui/... File src/mainboard/google/kukui/romstage.c:
https://review.coreboot.org/c/coreboot/+/34872/1/src/mainboard/google/kukui/... PS1, Line 44: memset(_dram_init_code + blob_size, 0, region_size - blob_size);
I thought there was no pure ELF (non-stage, non-payload) support in Coreboot? But maybe I missed som […]
Both stages and payloads get built as ELFs. cbfstool converts them to the respective stage or SELF format. It can do that just as well with any other ELF that fits the requirements (e.g. for stages all program data from .text through .bss needs to be contiguous in memory, which I assume we can do for this blob?). See src/soc/qualcomm/common/qclib.c for an example where we treat a Qualcomm blob as a stage.
Returning from a stage is the same as returning from a blob, makes no difference ("stage" just means that the binary is encoded in CBFS in a special way so that we can use our existing CBFS and prog_loader functions on it and they can handle things like zeroing out BSS automatically).