diff options
author | Marshall Dawson <marshalldawson3rd@gmail.com> | 2017-12-13 22:36:52 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-02-12 17:00:30 +0000 |
commit | dd2c7b12bba6f7949a9b557f3d1d3060630bbd86 (patch) | |
tree | 57289495c18e7f2470e66bc66d424a19735fcf88 /src | |
parent | 52f5cdce17f6ef4e37984e098d186cefe3950eb4 (diff) |
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 <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22888
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/amd/common/block/pi/agesawrapper.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |