From dd2c7b12bba6f7949a9b557f3d1d3060630bbd86 Mon Sep 17 00:00:00 2001 From: Marshall Dawson Date: Wed, 13 Dec 2017 22:36:52 -0700 Subject: soc/amd/common: Replace missing AmdReleaseStruct() calls The AGESA spec states that "Failure to release a structure can cause undesired outcomes." Uncomment the one in AmdInitLate(). The function only dealocates the structure used for the AGESA entry point, and not the internal data used by coreboot. Release the structure in AmdInitEnv(). This appears to have been an omission years ago when duplicating agesawrapper.c for every mainboard was still common. BUG=b:70671742 TEST=Build and boot Kahlee, inspect console log Change-Id: Ib1ff94ec2acdc845c5e4b4ed7088061cfc0c55f3 Signed-off-by: Marshall Dawson Reviewed-on: https://review.coreboot.org/22888 Reviewed-by: Martin Roth Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/pi/agesawrapper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/soc') diff --git a/src/soc/amd/common/block/pi/agesawrapper.c b/src/soc/amd/common/block/pi/agesawrapper.c index d454e32289..66928fba25 100644 --- a/src/soc/amd/common/block/pi/agesawrapper.c +++ b/src/soc/amd/common/block/pi/agesawrapper.c @@ -243,6 +243,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void) if (status != AGESA_SUCCESS) agesawrapper_readeventlog(EnvParams->StdHeader.HeapStatus); + AmdReleaseStruct(&AmdParamStruct); return status; } @@ -345,7 +346,7 @@ AGESA_STATUS agesawrapper_amdinitlate(void) AcpiSlit, AcpiWheaMce, AcpiWheaCmc, AcpiAlib, AcpiIvrs, __func__); - /* AmdReleaseStruct (&AmdParamStruct); */ + AmdReleaseStruct(&AmdParamStruct); return Status; } -- cgit v1.2.3