Hi, I am studying how coreboot loads the SELF format payload. From load_payload_segments() in src/lib/self_boot.c, the SELF payload is not relocated to a range of free memory. Which means the SELF payload should pick proper "segment.load_addr" for each segment, otherwise the payload may corrupt the critical memory region. coreboot may not run in background when control is transferred to payload, but before that, 1. the coreboot code that does the payload loading 2. stack may overlap with segment.load_addr of payload.
Is my understanding correct?
If yes, is there a recommended memory map (where is stack, where is coreboot ramstage, where is payload)?
Thanks, Ray