Hi Ray,
Am Fr., 17. Sept. 2021 um 18:43 Uhr schrieb Ni, Ray ray.ni@intel.com:
If yes, is there a recommended memory map (where is stack, where is coreboot ramstage, where is payload)?
ramstage is relocatable these days: romstage/postcar loads it near the top of memory. ramstage's stack is kept in the ramstage's .bss section so close to the top of memory, too.
Payloads aren't relocatable (some relocate themselves, but that happens after coreboot finished, so no conflict there) so they're loaded to a fixed address. This is usually a relatively low address (16MB, for example) as there can be little assumption about the available amount of memory.
So as long as RAM is a bit larger than payload size + ramstage size + 16MB (and that's normally the case these days) there's no risk of overlap.
Patrick