diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2018-06-14 06:49:38 +0300 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-06-21 09:42:27 +0000 |
commit | 4cdd2f8ce112bdad7f9db9d2feec171e45ca24f6 (patch) | |
tree | cb575e729fde7f5f5858646f720a5e7382600512 /src/soc/amd/common | |
parent | de31587a3a4834c18eab49aa7fd979a01f1fd3d1 (diff) |
soc/amd/common: Always set GetBiosCallout
The entire StdHeader field is really supposed to
be forked from a template for each entry into the
AGESA API. Current code assumes only Callout would
be relevant, which is not quite the case.
Change-Id: I0cc66d01d62fa8dc6bb7c9f9fab6fa4753827554
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/27111
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Garrett Kirkendall <garrett.kirkendall@amd.corp-partner.google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r-- | src/soc/amd/common/block/pi/agesawrapper.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/soc/amd/common/block/pi/agesawrapper.c b/src/soc/amd/common/block/pi/agesawrapper.c index 436bf8f253..a05614151e 100644 --- a/src/soc/amd/common/block/pi/agesawrapper.c +++ b/src/soc/amd/common/block/pi/agesawrapper.c @@ -2,6 +2,7 @@ * This file is part of the coreboot project. * * Copyright (C) 2012 - 2017 Advanced Micro Devices, Inc. + * Copyright (C) 2018 Kyösti Mälkki * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -75,6 +76,9 @@ static AGESA_STATUS agesawrapper_readeventlog(UINT8 HeapStatus) static AGESA_STATUS create_struct(AMD_INTERFACE_PARAMS *interface_struct) { + /* Should clone entire StdHeader here. */ + interface_struct->StdHeader.CalloutPtr = &GetBiosCallout; + AGESA_STATUS status = AmdCreateStruct(interface_struct); if (status == AGESA_SUCCESS) return status; @@ -98,7 +102,6 @@ AGESA_STATUS agesawrapper_amdinitreset(void) .AllocationMethod = ByHost, .NewStructSize = sizeof(AMD_RESET_PARAMS), .NewStructPtr = &ResetParams, - .StdHeader.CalloutPtr = &GetBiosCallout }; create_struct(&AmdParamStruct); SetFchResetParams(&ResetParams.FchInterface); @@ -120,7 +123,6 @@ AGESA_STATUS agesawrapper_amdinitearly(void) AMD_INTERFACE_PARAMS AmdParamStruct = { .AgesaFunctionName = AMD_INIT_EARLY, .AllocationMethod = PreMemHeap, - .StdHeader.CalloutPtr = &GetBiosCallout, }; create_struct(&AmdParamStruct); @@ -180,7 +182,6 @@ AGESA_STATUS agesawrapper_amdinitpost(void) AMD_INTERFACE_PARAMS AmdParamStruct = { .AgesaFunctionName = AMD_INIT_POST, .AllocationMethod = PreMemHeap, - .StdHeader.CalloutPtr = &GetBiosCallout, }; AMD_POST_PARAMS *PostParams; @@ -238,7 +239,6 @@ AGESA_STATUS agesawrapper_amdinitenv(void) AMD_INTERFACE_PARAMS AmdParamStruct = { .AgesaFunctionName = AMD_INIT_ENV, .AllocationMethod = PostMemDram, - .StdHeader.CalloutPtr = &GetBiosCallout, }; AMD_ENV_PARAMS *EnvParams; @@ -291,7 +291,6 @@ AGESA_STATUS agesawrapper_amdinitmid(void) AMD_INTERFACE_PARAMS AmdParamStruct = { .AgesaFunctionName = AMD_INIT_MID, .AllocationMethod = PostMemDram, - .StdHeader.CalloutPtr = &GetBiosCallout, }; AMD_MID_PARAMS *MidParams; @@ -321,7 +320,6 @@ AGESA_STATUS agesawrapper_amdinitlate(void) AMD_INTERFACE_PARAMS AmdParamStruct = { .AgesaFunctionName = AMD_INIT_LATE, .AllocationMethod = PostMemDram, - .StdHeader.CalloutPtr = &GetBiosCallout, }; AMD_LATE_PARAMS *LateParams; @@ -391,7 +389,6 @@ AGESA_STATUS agesawrapper_amdinitrtb(void) AMD_INTERFACE_PARAMS AmdParamStruct = { .AgesaFunctionName = AMD_INIT_RTB, .AllocationMethod = PostMemDram, - .StdHeader.CalloutPtr = &GetBiosCallout, }; AMD_RTB_PARAMS *RtbParams; @@ -425,7 +422,6 @@ AGESA_STATUS agesawrapper_amdinitresume(void) AMD_INTERFACE_PARAMS AmdParamStruct = { .AgesaFunctionName = AMD_INIT_RESUME, .AllocationMethod = PreMemHeap, - .StdHeader.CalloutPtr = &GetBiosCallout, }; AMD_RESUME_PARAMS *InitResumeParams; size_t nv_size; @@ -457,7 +453,6 @@ AGESA_STATUS agesawrapper_amds3laterestore(void) AMD_INTERFACE_PARAMS AmdParamStruct = { .AgesaFunctionName = AMD_S3LATE_RESTORE, .AllocationMethod = ByHost, - .StdHeader.CalloutPtr = &GetBiosCallout, }; AMD_S3LATE_PARAMS *S3LateParams; size_t vol_size; @@ -493,7 +488,6 @@ AGESA_STATUS agesawrapper_amds3finalrestore(void) AMD_INTERFACE_PARAMS AmdParamStruct = { .AgesaFunctionName = AMD_S3FINAL_RESTORE, .AllocationMethod = ByHost, - .StdHeader.CalloutPtr = &GetBiosCallout, }; AMD_S3FINAL_PARAMS *S3FinalParams; size_t vol_size; |