binaryPI: Move EmptyHeap() call

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 <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/19270
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
This commit is contained in:
Kyösti Mälkki 2017-03-25 22:45:18 +02:00
parent 17b1a69c52
commit 4c1e41c636
1 changed files with 3 additions and 2 deletions

View File

@ -179,8 +179,6 @@ AGESA_STATUS agesawrapper_amdinitpost(void)
); );
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(PostParams->StdHeader.HeapStatus); if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(PostParams->StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct); AmdReleaseStruct (&AmdParamStruct);
/* Initialize heap space */
EmptyHeap();
return status; return status;
} }
@ -191,6 +189,9 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
AMD_INTERFACE_PARAMS AmdParamStruct; AMD_INTERFACE_PARAMS AmdParamStruct;
AMD_ENV_PARAMS *EnvParam; AMD_ENV_PARAMS *EnvParam;
/* Initialize heap space */
EmptyHeap();
LibAmdMemFill (&AmdParamStruct, LibAmdMemFill (&AmdParamStruct,
0, 0,
sizeof(AMD_INTERFACE_PARAMS), sizeof(AMD_INTERFACE_PARAMS),