AGESA: Common laterunaptask()

Change-Id: I580f975aa987a333074de3d63744ad5f9008377d
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/7821
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
Kyösti Mälkki 2014-12-16 07:32:06 +02:00
parent 94dd14f035
commit 25c27359d1
7 changed files with 21 additions and 125 deletions

View File

@ -92,3 +92,24 @@ void *agesawrapper_getlateinitptr(int pick)
}
#endif /* __PRE_RAM__ */
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
{
AGESA_STATUS status;
AP_EXE_PARAMS ApExeParams;
memset(&ApExeParams, 0, sizeof(AP_EXE_PARAMS));
ApExeParams.StdHeader.AltImageBasePtr = 0;
ApExeParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
ApExeParams.StdHeader.Func = 0;
ApExeParams.StdHeader.ImageBasePtr = 0;
ApExeParams.FunctionNumber = Func;
ApExeParams.RelatedDataBlock = ConfigPtr;
status = AmdLateRunApTask(&ApExeParams);
AGESA_EVENTLOG(status, &ApExeParams.StdHeader);
ASSERT(status == AGESA_SUCCESS);
return status;
}

View File

@ -155,22 +155,3 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
return status;
}
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
{
AGESA_STATUS status;
AP_EXE_PARAMS ApExeParams;
memset(&ApExeParams, 0, sizeof(AP_EXE_PARAMS));
ApExeParams.StdHeader.AltImageBasePtr = 0;
ApExeParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
ApExeParams.StdHeader.Func = 0;
ApExeParams.StdHeader.ImageBasePtr = 0;
status = AmdLateRunApTask(&ApExeParams);
AGESA_EVENTLOG(status, &ApExeParams.StdHeader);
ASSERT(status == AGESA_SUCCESS);
return status;
}

View File

@ -155,24 +155,3 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
return status;
}
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
{
AGESA_STATUS status;
AP_EXE_PARAMS ApExeParams;
memset(&ApExeParams, 0, sizeof(AP_EXE_PARAMS));
ApExeParams.StdHeader.AltImageBasePtr = 0;
ApExeParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
ApExeParams.StdHeader.Func = 0;
ApExeParams.StdHeader.ImageBasePtr = 0;
ApExeParams.FunctionNumber = Func;
ApExeParams.RelatedDataBlock = ConfigPtr;
status = AmdLateRunApTask(&ApExeParams);
AGESA_EVENTLOG(status, &ApExeParams.StdHeader);
ASSERT(status == AGESA_SUCCESS);
return status;
}

View File

@ -203,28 +203,3 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
return status;
}
/**
* @param[in] UINTN ApicIdOfCore,
* @param[in] AP_EXE_PARAMS *LaunchApParams
*/
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
{
AGESA_STATUS status;
AMD_LATE_PARAMS AmdLateParams;
memset(&AmdLateParams, 0, sizeof(AMD_LATE_PARAMS));
AmdLateParams.StdHeader.AltImageBasePtr = 0;
AmdLateParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
AmdLateParams.StdHeader.Func = 0;
AmdLateParams.StdHeader.ImageBasePtr = 0;
AmdLateParams.StdHeader.HeapStatus = HEAP_TEMP_MEM;
printk(BIOS_DEBUG, "AmdLateRunApTask on Core: %x\n", (uint32_t) Data);
status = AmdLateRunApTask((AP_EXE_PARAMS *) ConfigPtr);
AGESA_EVENTLOG(status, &AmdLateParams.StdHeader);
ASSERT((status == AGESA_SUCCESS) || (status == AGESA_UNSUPPORTED));
return status;
}

View File

@ -165,23 +165,3 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
return status;
}
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
{
AGESA_STATUS status;
AP_EXE_PARAMS ApExeParams;
memset(&ApExeParams, 0, sizeof(AP_EXE_PARAMS));
ApExeParams.StdHeader.AltImageBasePtr = 0;
ApExeParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
ApExeParams.StdHeader.Func = 0;
ApExeParams.StdHeader.ImageBasePtr = 0;
ApExeParams.FunctionNumber = Func;
ApExeParams.RelatedDataBlock = ConfigPtr;
status = AmdLateRunApTask(&ApExeParams);
ASSERT(status == AGESA_SUCCESS);
return status;
}

View File

@ -165,23 +165,3 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
return status;
}
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
{
AGESA_STATUS status;
AP_EXE_PARAMS ApExeParams;
memset(&ApExeParams, 0, sizeof(AP_EXE_PARAMS));
ApExeParams.StdHeader.AltImageBasePtr = 0;
ApExeParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
ApExeParams.StdHeader.Func = 0;
ApExeParams.StdHeader.ImageBasePtr = 0;
ApExeParams.FunctionNumber = Func;
ApExeParams.RelatedDataBlock = ConfigPtr;
status = AmdLateRunApTask(&ApExeParams);
ASSERT(status == AGESA_SUCCESS);
return status;
}

View File

@ -165,23 +165,3 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
return status;
}
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
{
AGESA_STATUS status;
AP_EXE_PARAMS ApExeParams;
memset(&ApExeParams, 0, sizeof(AP_EXE_PARAMS));
ApExeParams.StdHeader.AltImageBasePtr = 0;
ApExeParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
ApExeParams.StdHeader.Func = 0;
ApExeParams.StdHeader.ImageBasePtr = 0;
ApExeParams.FunctionNumber = Func;
ApExeParams.RelatedDataBlock = ConfigPtr;
status = AmdLateRunApTask(&ApExeParams);
ASSERT(status == AGESA_SUCCESS);
return status;
}