summaryrefslogtreecommitdiff
path: root/src/northbridge/amd/agesa
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2017-07-28 04:48:35 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2017-08-02 04:41:14 +0000
commitc7dcec6a1bd082513161fd2966da41a23beebcc6 (patch)
tree5f81bd77e6bddbc434c4ed67cbce5564a562557f /src/northbridge/amd/agesa
parent0a7cab8de85d205bb4193e797f5987a6a68e6348 (diff)
AGESA: Move agesawrapper_laterunaptask()
Change-Id: I916d808d1b2ecc4b70b5dfebff62c4a18119f157 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/20816 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/northbridge/amd/agesa')
-rw-r--r--src/northbridge/amd/agesa/agesawrapper.c21
-rw-r--r--src/northbridge/amd/agesa/agesawrapper.h1
-rw-r--r--src/northbridge/amd/agesa/def_callouts.c21
3 files changed, 17 insertions, 26 deletions
diff --git a/src/northbridge/amd/agesa/agesawrapper.c b/src/northbridge/amd/agesa/agesawrapper.c
index 8006a7f182..b3dc69a6ed 100644
--- a/src/northbridge/amd/agesa/agesawrapper.c
+++ b/src/northbridge/amd/agesa/agesawrapper.c
@@ -303,24 +303,3 @@ AGESA_STATUS agesawrapper_amdinitlate(void)
}
#endif /* __PRE_RAM__ */
-
-AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINTN Data, VOID * ConfigPtr)
-{
- AGESA_STATUS status;
- AP_EXE_PARAMS ApExeParams;
-
- memset(&ApExeParams, 0, sizeof(AP_EXE_PARAMS));
-
- 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);
- AGESA_EVENTLOG(status, &ApExeParams.StdHeader);
- ASSERT(status == AGESA_SUCCESS);
-
- return status;
-}
diff --git a/src/northbridge/amd/agesa/agesawrapper.h b/src/northbridge/amd/agesa/agesawrapper.h
index b1509a447c..ab7db339f0 100644
--- a/src/northbridge/amd/agesa/agesawrapper.h
+++ b/src/northbridge/amd/agesa/agesawrapper.h
@@ -30,7 +30,6 @@ AGESA_STATUS agesawrapper_amdinitmid(void);
AGESA_STATUS agesawrapper_amdinitresume(void);
AGESA_STATUS agesawrapper_amdS3Save(void);
AGESA_STATUS agesawrapper_amds3laterestore(void);
-AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINTN Data, VOID *ConfigPtr);
AGESA_STATUS agesawrapper_fchs3earlyrestore(void);
AGESA_STATUS agesawrapper_fchs3laterestore(void);
diff --git a/src/northbridge/amd/agesa/def_callouts.c b/src/northbridge/amd/agesa/def_callouts.c
index 5aaa49c59a..4a5f693e51 100644
--- a/src/northbridge/amd/agesa/def_callouts.c
+++ b/src/northbridge/amd/agesa/def_callouts.c
@@ -16,11 +16,12 @@
#include <cbfs.h>
#include <spd_bin.h>
+#include <string.h>
#include "AGESA.h"
#include "amdlib.h"
#include "Ids.h"
-#include <northbridge/amd/agesa/agesawrapper.h>
+#include <northbridge/amd/agesa/state_machine.h>
#include "BiosCallOuts.h"
#include "dimmSpd.h"
@@ -107,10 +108,22 @@ AGESA_STATUS agesa_Reset (UINT32 Func, UINTN Data, VOID *ConfigPtr)
AGESA_STATUS agesa_RunFuncOnAp (UINT32 Func, UINTN Data, VOID *ConfigPtr)
{
- AGESA_STATUS Status;
+ AGESA_STATUS status;
+ AP_EXE_PARAMS ApExeParams;
- Status = agesawrapper_amdlaterunaptask (Func, Data, ConfigPtr);
- return Status;
+ memset(&ApExeParams, 0, sizeof(AP_EXE_PARAMS));
+
+ 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);
+ ASSERT(status == AGESA_SUCCESS);
+
+ return status;
}
#if defined(AGESA_GNB_GFX_GET_VBIOS_IMAGE)