Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/27277 )
Change subject: soc/amd/common: Fix AmdLateRunApTask() ......................................................................
soc/amd/common: Fix AmdLateRunApTask()
Third parameter ConfigPtr of the callout is of type AP_EXE_PARAMS and needs to be passed back to AGESA with AmdLateRunApTask() call.
Change-Id: I1dad64b955b53bd19363737665235f95aa3d451e Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/27277 Reviewed-by: Richard Spiegel richard.spiegel@silverbackltd.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/amd/common/block/include/amdblocks/agesawrapper.h M src/soc/amd/common/block/pi/agesawrapper.c M src/soc/amd/common/block/pi/def_callouts.c 3 files changed, 6 insertions(+), 26 deletions(-)
Approvals: build bot (Jenkins): Verified Richard Spiegel: Looks good to me, approved
diff --git a/src/soc/amd/common/block/include/amdblocks/agesawrapper.h b/src/soc/amd/common/block/include/amdblocks/agesawrapper.h index 43bd8de..2f3b8a6 100644 --- a/src/soc/amd/common/block/include/amdblocks/agesawrapper.h +++ b/src/soc/amd/common/block/include/amdblocks/agesawrapper.h @@ -34,6 +34,8 @@ /* Return current dispatcher or NULL on error. */ MODULE_ENTRY agesa_get_dispatcher(void);
+AGESA_STATUS amd_late_run_ap_task(AP_EXE_PARAMS *ApExeParams); + AGESA_STATUS agesawrapper_amdinitreset(void); AGESA_STATUS agesawrapper_amdinitearly(void); AGESA_STATUS agesawrapper_amdinitenv(void); @@ -41,8 +43,6 @@ AGESA_STATUS agesawrapper_amdinitpost(void); AGESA_STATUS agesawrapper_amdinitmid(void); void *agesawrapper_getlateinitptr(int pick); -AGESA_STATUS agesawrapper_amdlaterunaptask(uint32_t Func, uintptr_t Data, - void *ConfigPtr); AGESA_STATUS agesawrapper_amdinitrtb(void); AGESA_STATUS agesawrapper_amdinitresume(void); AGESA_STATUS agesawrapper_amds3laterestore(void); diff --git a/src/soc/amd/common/block/pi/agesawrapper.c b/src/soc/amd/common/block/pi/agesawrapper.c index 92153ee..fc69b46 100644 --- a/src/soc/amd/common/block/pi/agesawrapper.c +++ b/src/soc/amd/common/block/pi/agesawrapper.c @@ -353,28 +353,9 @@ return Status; }
-AGESA_STATUS agesawrapper_amdlaterunaptask(uint32_t Func, uintptr_t Data, - void *ConfigPtr) +AGESA_STATUS amd_late_run_ap_task(AP_EXE_PARAMS *ApExeParams) { - AGESA_STATUS Status; - AP_EXE_PARAMS ApExeParams; - - memset(&ApExeParams, 0, sizeof(ApExeParams)); - - ApExeParams.StdHeader.AltImageBasePtr = 0; - ApExeParams.StdHeader.CalloutPtr = &GetBiosCallout; - ApExeParams.StdHeader.Func = 0; - ApExeParams.StdHeader.ImageBasePtr = 0; - ApExeParams.FunctionNumber = Func; - ApExeParams.RelatedDataBlock = ConfigPtr; - - Status = AmdLateRunApTask(&ApExeParams); - if (Status != AGESA_SUCCESS) { - /* agesawrapper_readeventlog(); */ - ASSERT(Status == AGESA_SUCCESS); - } - - return Status; + return AmdLateRunApTask(ApExeParams); }
AGESA_STATUS agesawrapper_amdinitrtb(void) diff --git a/src/soc/amd/common/block/pi/def_callouts.c b/src/soc/amd/common/block/pi/def_callouts.c index 693c7c5..0b119b7 100644 --- a/src/soc/amd/common/block/pi/def_callouts.c +++ b/src/soc/amd/common/block/pi/def_callouts.c @@ -186,7 +186,7 @@ static struct agesa_data { uint32_t Func; uintptr_t Data; - void *ConfigPtr; + AP_EXE_PARAMS *ConfigPtr; } agesadata;
/* @@ -205,8 +205,7 @@ (agesadata.Data == lapicid()))) return;
- Status = agesawrapper_amdlaterunaptask(agesadata.Func, agesadata.Data, - agesadata.ConfigPtr); + Status = amd_late_run_ap_task(agesadata.ConfigPtr);
if (Status) printk(BIOS_DEBUG, "There was a problem with %lx returned %s\n",