From 4c1e41c636c96d3cdf185e660861bb2d7ddd5187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sat, 25 Mar 2017 22:45:18 +0200 Subject: binaryPI: Move EmptyHeap() call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Specification says to do CAR teardown as part of AmdInitPost(). Move initializing the final AGESA heap storage to AmdInitEnv() so that its work is not lost even if AMD_DISABLE_STACK does invalidation without writeback. Change-Id: Icf0ec74c390e60122d0b312b5f09f46bb930e085 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/19270 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Philippe Mathieu-Daudé --- src/northbridge/amd/pi/agesawrapper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/northbridge/amd') diff --git a/src/northbridge/amd/pi/agesawrapper.c b/src/northbridge/amd/pi/agesawrapper.c index d4b9984f81..050d683573 100644 --- a/src/northbridge/amd/pi/agesawrapper.c +++ b/src/northbridge/amd/pi/agesawrapper.c @@ -179,8 +179,6 @@ AGESA_STATUS agesawrapper_amdinitpost(void) ); if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(PostParams->StdHeader.HeapStatus); AmdReleaseStruct (&AmdParamStruct); - /* Initialize heap space */ - EmptyHeap(); return status; } @@ -191,6 +189,9 @@ AGESA_STATUS agesawrapper_amdinitenv(void) AMD_INTERFACE_PARAMS AmdParamStruct; AMD_ENV_PARAMS *EnvParam; + /* Initialize heap space */ + EmptyHeap(); + LibAmdMemFill (&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS), -- cgit v1.2.3