From 4a6e00fd365bee06e2860f813c0fc05c5f4c22b9 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Sat, 25 Mar 2017 22:45:18 +0200 Subject: AGESA: 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 the buffer is not invalidated without writeback. Change-Id: I3a5d497d0e25ec291f722e9f089bc8928238c3f9 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/19024 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/northbridge/amd/agesa/agesawrapper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/northbridge/amd/agesa') diff --git a/src/northbridge/amd/agesa/agesawrapper.c b/src/northbridge/amd/agesa/agesawrapper.c index 0a6f2a3370..d21c9c371a 100644 --- a/src/northbridge/amd/agesa/agesawrapper.c +++ b/src/northbridge/amd/agesa/agesawrapper.c @@ -111,9 +111,6 @@ AGESA_STATUS agesawrapper_amdinitpost(void) AmdReleaseStruct(&AmdParamStruct); - /* Initialize heap space */ - EmptyHeap(); - return status; } @@ -153,6 +150,9 @@ AGESA_STATUS agesawrapper_amdinitenv(void) AMD_INTERFACE_PARAMS AmdParamStruct; AMD_ENV_PARAMS *EnvParam; + /* Initialize heap space */ + EmptyHeap(); + memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS)); AmdParamStruct.AgesaFunctionName = AMD_INIT_ENV; -- cgit v1.2.3