On Fri, Sep 11, 2015 at 3:36 PM, Paul Menzel paulepanter@users.sourceforge.net wrote:
Dear coreboot folks,
Am Donnerstag, den 10.09.2015, 16:25 -0700 schrieb Julius Werner:
I'd bet it's just a single large allocation somewhere. You can try adding
CFLAGS_ramstage += -Wstack-usage=1024
somewhere in coreboot/Makefile.inc and then clean+rebuild your code while passing '-k' to make. You'll get a bunch of compiler warnings, and one of them is likely to be the culprit.
It looks like that Julius was dead on! Building the similar ASRock E350M1 with the modification proposed by Julius, building stops with the error below.
$ make […] CC northbridge/amd/agesa/oem_s3.ramstage.o src/northbridge/amd/agesa/oem_s3.c: In function 'OemS3Save': src/northbridge/amd/agesa/oem_s3.c:118:14: error: stack usage might be 4144 bytes [-Werror=stack-usage=] AGESA_STATUS OemS3Save(void *vS3SaveParams) ^
Fun. 4KiB buffer on the stack for the win.
$ git grep S3_DATA_MTRR_SIZE -- src/northbridge/amd/agesa/ | grep define src/northbridge/amd/agesa/oem_s3.c:#define S3_DATA_MTRR_SIZE 0x1000
Thanks,
Paul