diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-05-05 13:20:56 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-06-06 13:30:52 +0200 |
commit | 6025efa3472f38d719d850d2143dae0b215db0f3 (patch) | |
tree | f324d7b97a5c3fe488d2d3d67ad8cc1296b9128e /src/northbridge | |
parent | 83cc3b0ed5f522e8ab23b9a9cab8f89bbb65c9c3 (diff) | |
download | coreboot-6025efa3472f38d719d850d2143dae0b215db0f3.tar.xz |
AGESA: Use common GetBiosCallout()
Change-Id: I9c8f7cc98c65102486e17ec49fa2246211dffc4f
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5688
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/northbridge')
-rw-r--r-- | src/northbridge/amd/agesa/def_callouts.c | 15 | ||||
-rw-r--r-- | src/northbridge/amd/agesa/def_callouts.h | 11 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/northbridge/amd/agesa/def_callouts.c b/src/northbridge/amd/agesa/def_callouts.c index b9a5330e15..f813c49e93 100644 --- a/src/northbridge/amd/agesa/def_callouts.c +++ b/src/northbridge/amd/agesa/def_callouts.c @@ -24,6 +24,21 @@ #include <cbfs.h> #include "def_callouts.h" + +AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +{ + UINTN i; + + for (i = 0; i < BiosCalloutsLen; i++) { + if (BiosCallouts[i].CalloutName == Func) + break; + } + if(i >= BiosCalloutsLen) + return AGESA_UNSUPPORTED; + + return BiosCallouts[i].CalloutPtr (Func, Data, ConfigPtr); +} + AGESA_STATUS agesa_NoopUnsupported (UINT32 Func, UINT32 Data, VOID *ConfigPtr) { return AGESA_UNSUPPORTED; diff --git a/src/northbridge/amd/agesa/def_callouts.h b/src/northbridge/amd/agesa/def_callouts.h index b540bdd836..3b14cbf03e 100644 --- a/src/northbridge/amd/agesa/def_callouts.h +++ b/src/northbridge/amd/agesa/def_callouts.h @@ -21,6 +21,7 @@ #ifndef CALLOUTS_AMD_AGESA_H #define CALLOUTS_AMD_AGESA_H +#include "agesawrapper.h" #include "Porting.h" #include "AGESA.h" @@ -32,4 +33,14 @@ AGESA_STATUS agesa_Reset (UINT32 Func, UINT32 Data, VOID *ConfigPtr); AGESA_STATUS agesa_RunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr); AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINT32 FchData, VOID *ConfigPrt); +AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr); + +typedef struct { + UINT32 CalloutName; + AGESA_STATUS (*CalloutPtr) (UINT32 Func, UINT32 Data, VOID* ConfigPtr); +} BIOS_CALLOUT_STRUCT; + +extern const BIOS_CALLOUT_STRUCT BiosCallouts[]; +extern const int BiosCalloutsLen; + #endif /* CALLOUTS_AMD_AGESA_H */ |