summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/amd/dinar/BiosCallOuts.c13
-rw-r--r--src/mainboard/amd/inagua/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/amd/olivehill/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/amd/parmer/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/amd/persimmon/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/amd/south_station/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/amd/thatcher/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/amd/torpedo/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/amd/union_station/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/asrock/e350m1/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/asrock/imb-a180/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/asus/f2a85-m/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/gizmosphere/gizmo/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/gizmosphere/gizmo2/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/hp/pavilion_m6_1035dx/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c8
-rw-r--r--src/mainboard/lenovo/g505s/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/lippert/frontrunner-af/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/lippert/toucan-af/PlatformGnbPcie.c11
-rw-r--r--src/mainboard/supermicro/h8qgi/BiosCallOuts.c4
-rw-r--r--src/mainboard/supermicro/h8scm/BiosCallOuts.c4
-rw-r--r--src/mainboard/tyan/s8226/BiosCallOuts.c4
-rw-r--r--src/northbridge/amd/agesa/agesawrapper.h22
-rw-r--r--src/northbridge/amd/agesa/family15/agesawrapper.c14
24 files changed, 171 insertions, 85 deletions
diff --git a/src/mainboard/amd/dinar/BiosCallOuts.c b/src/mainboard/amd/dinar/BiosCallOuts.c
index 4e0e3b905a..dee4920b53 100644
--- a/src/mainboard/amd/dinar/BiosCallOuts.c
+++ b/src/mainboard/amd/dinar/BiosCallOuts.c
@@ -19,6 +19,7 @@
#include "AGESA.h"
#include "amdlib.h"
+#include <northbridge/amd/agesa/agesawrapper.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include "Ids.h"
#include "OptionsIds.h"
@@ -115,3 +116,15 @@ static AGESA_STATUS board_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
return Status;
}
+
+static AGESA_STATUS OemInitPost(AMD_POST_PARAMS *InitPost)
+{
+ InitPost->MemConfig.UmaMode = UMA_AUTO;
+ InitPost->MemConfig.BottomIo = 0xE0;
+ InitPost->MemConfig.UmaSize = 0xE0-0xC0;
+ return AGESA_SUCCESS;
+}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitPost = OemInitPost,
+};
diff --git a/src/mainboard/amd/inagua/PlatformGnbPcie.c b/src/mainboard/amd/inagua/PlatformGnbPcie.c
index b7d9d5b81e..c3f9d9ad07 100644
--- a/src/mainboard/amd/inagua/PlatformGnbPcie.c
+++ b/src/mainboard/amd/inagua/PlatformGnbPcie.c
@@ -41,10 +41,8 @@
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
VOID *BrazosPcieComplexListPtr;
@@ -132,4 +130,9 @@ OemCustomizeInitEarly (
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
InitEarly->GnbConfig.PsppPolicy = 0;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/amd/olivehill/PlatformGnbPcie.c b/src/mainboard/amd/olivehill/PlatformGnbPcie.c
index e9eef35b56..e9599253ed 100644
--- a/src/mainboard/amd/olivehill/PlatformGnbPcie.c
+++ b/src/mainboard/amd/olivehill/PlatformGnbPcie.c
@@ -123,10 +123,8 @@ static const PCIe_COMPLEX_DESCRIPTOR PcieComplex = {
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
@@ -148,4 +146,9 @@ OemCustomizeInitEarly (
PcieComplexListPtr = (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;
LibAmdMemCopy (PcieComplexListPtr, &PcieComplex, sizeof(PcieComplex), &InitEarly->StdHeader);
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/amd/parmer/PlatformGnbPcie.c b/src/mainboard/amd/parmer/PlatformGnbPcie.c
index e8d1b074a5..91326effcd 100644
--- a/src/mainboard/amd/parmer/PlatformGnbPcie.c
+++ b/src/mainboard/amd/parmer/PlatformGnbPcie.c
@@ -160,10 +160,8 @@ static const PCIe_DDI_DESCRIPTOR DdiList [] = {
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
@@ -195,4 +193,9 @@ OemCustomizeInitEarly (
PcieComplexListPtr->DdiLinkList = DdiList;
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/amd/persimmon/PlatformGnbPcie.c b/src/mainboard/amd/persimmon/PlatformGnbPcie.c
index 6357021e28..c13a383f99 100644
--- a/src/mainboard/amd/persimmon/PlatformGnbPcie.c
+++ b/src/mainboard/amd/persimmon/PlatformGnbPcie.c
@@ -39,10 +39,8 @@
* @retval VOID
*
**/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
VOID *BrazosPcieComplexListPtr;
@@ -138,4 +136,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
InitEarly->GnbConfig.PsppPolicy = 0;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/amd/south_station/PlatformGnbPcie.c b/src/mainboard/amd/south_station/PlatformGnbPcie.c
index ee7f90cb77..ca33c6b2d8 100644
--- a/src/mainboard/amd/south_station/PlatformGnbPcie.c
+++ b/src/mainboard/amd/south_station/PlatformGnbPcie.c
@@ -41,10 +41,8 @@
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
VOID *BrazosPcieComplexListPtr;
@@ -140,4 +138,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
InitEarly->GnbConfig.PsppPolicy = 0;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/amd/thatcher/PlatformGnbPcie.c b/src/mainboard/amd/thatcher/PlatformGnbPcie.c
index 28f168778d..4a985d154e 100644
--- a/src/mainboard/amd/thatcher/PlatformGnbPcie.c
+++ b/src/mainboard/amd/thatcher/PlatformGnbPcie.c
@@ -166,10 +166,8 @@ static const PCIe_COMPLEX_DESCRIPTOR Trinity = {
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
VOID *TrinityPcieComplexListPtr;
@@ -221,4 +219,9 @@ OemCustomizeInitEarly (
((PCIe_COMPLEX_DESCRIPTOR*)TrinityPcieComplexListPtr)->DdiLinkList = (PCIe_DDI_DESCRIPTOR*)TrinityPcieDdiPtr;
InitEarly->GnbConfig.PcieComplexList = TrinityPcieComplexListPtr;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/amd/torpedo/PlatformGnbPcie.c b/src/mainboard/amd/torpedo/PlatformGnbPcie.c
index 7a69fd6197..893b48b070 100644
--- a/src/mainboard/amd/torpedo/PlatformGnbPcie.c
+++ b/src/mainboard/amd/torpedo/PlatformGnbPcie.c
@@ -108,10 +108,8 @@ static const PCIe_COMPLEX_DESCRIPTOR Llano = {
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
VOID *LlanoPcieComplexListPtr;
@@ -165,4 +163,9 @@ OemCustomizeInitEarly (
InitEarly->GnbConfig.PcieComplexList = LlanoPcieComplexListPtr;
InitEarly->GnbConfig.PsppPolicy = 0;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/amd/union_station/PlatformGnbPcie.c b/src/mainboard/amd/union_station/PlatformGnbPcie.c
index 1bd602df87..68ac8b630b 100644
--- a/src/mainboard/amd/union_station/PlatformGnbPcie.c
+++ b/src/mainboard/amd/union_station/PlatformGnbPcie.c
@@ -45,10 +45,8 @@
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
VOID *BrazosPcieComplexListPtr;
@@ -146,4 +144,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
InitEarly->GnbConfig.PsppPolicy = 0;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/asrock/e350m1/PlatformGnbPcie.c b/src/mainboard/asrock/e350m1/PlatformGnbPcie.c
index 21d0f8dffc..b591642001 100644
--- a/src/mainboard/asrock/e350m1/PlatformGnbPcie.c
+++ b/src/mainboard/asrock/e350m1/PlatformGnbPcie.c
@@ -45,10 +45,8 @@
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
VOID *BrazosPcieComplexListPtr;
@@ -146,4 +144,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
InitEarly->GnbConfig.PsppPolicy = 0;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/asrock/imb-a180/PlatformGnbPcie.c b/src/mainboard/asrock/imb-a180/PlatformGnbPcie.c
index 4f8bc82f40..cd3fdd6609 100644
--- a/src/mainboard/asrock/imb-a180/PlatformGnbPcie.c
+++ b/src/mainboard/asrock/imb-a180/PlatformGnbPcie.c
@@ -123,10 +123,8 @@ static const PCIe_COMPLEX_DESCRIPTOR PcieComplex = {
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
@@ -148,4 +146,9 @@ OemCustomizeInitEarly (
PcieComplexListPtr = (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;
LibAmdMemCopy (PcieComplexListPtr, &PcieComplex, sizeof(PcieComplex), &InitEarly->StdHeader);
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/asus/f2a85-m/PlatformGnbPcie.c b/src/mainboard/asus/f2a85-m/PlatformGnbPcie.c
index 84936eaa92..ecfe926a82 100644
--- a/src/mainboard/asus/f2a85-m/PlatformGnbPcie.c
+++ b/src/mainboard/asus/f2a85-m/PlatformGnbPcie.c
@@ -142,10 +142,8 @@ static const PCIe_COMPLEX_DESCRIPTOR Trinity = {
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
VOID *TrinityPcieComplexListPtr;
@@ -196,4 +194,9 @@ OemCustomizeInitEarly (
((PCIe_COMPLEX_DESCRIPTOR*)TrinityPcieComplexListPtr)->DdiLinkList = (PCIe_DDI_DESCRIPTOR*)TrinityPcieDdiPtr;
InitEarly->GnbConfig.PcieComplexList = TrinityPcieComplexListPtr;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/gizmosphere/gizmo/PlatformGnbPcie.c b/src/mainboard/gizmosphere/gizmo/PlatformGnbPcie.c
index aae1c1034e..3e868173f9 100644
--- a/src/mainboard/gizmosphere/gizmo/PlatformGnbPcie.c
+++ b/src/mainboard/gizmosphere/gizmo/PlatformGnbPcie.c
@@ -44,10 +44,8 @@
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
VOID *BrazosPcieComplexListPtr;
@@ -143,4 +141,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
InitEarly->GnbConfig.PsppPolicy = 0;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/gizmosphere/gizmo2/PlatformGnbPcie.c b/src/mainboard/gizmosphere/gizmo2/PlatformGnbPcie.c
index d48aa9fb87..f27a1c3e24 100644
--- a/src/mainboard/gizmosphere/gizmo2/PlatformGnbPcie.c
+++ b/src/mainboard/gizmosphere/gizmo2/PlatformGnbPcie.c
@@ -117,10 +117,8 @@ static const PCIe_COMPLEX_DESCRIPTOR PcieComplex = {
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
@@ -142,4 +140,9 @@ OemCustomizeInitEarly (
PcieComplexListPtr = (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;
LibAmdMemCopy (PcieComplexListPtr, &PcieComplex, sizeof(PcieComplex), &InitEarly->StdHeader);
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/PlatformGnbPcie.c b/src/mainboard/hp/pavilion_m6_1035dx/PlatformGnbPcie.c
index 920afc47ba..452237905b 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/PlatformGnbPcie.c
+++ b/src/mainboard/hp/pavilion_m6_1035dx/PlatformGnbPcie.c
@@ -159,10 +159,8 @@ static const PCIe_DDI_DESCRIPTOR DdiList [] = {
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
@@ -194,4 +192,9 @@ OemCustomizeInitEarly (
PcieComplexListPtr->DdiLinkList = DdiList;
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c b/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c
index aa1e4ae548..66152a63fb 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c
@@ -38,7 +38,8 @@
* @param[in] *InitEarly
*
**/
-void OemCustomizeInitEarly (IN OUT AMD_EARLY_PARAMS *InitEarly)
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
void *BrazosPcieComplexListPtr;
@@ -181,4 +182,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
InitEarly->GnbConfig.PsppPolicy = 0;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/lenovo/g505s/PlatformGnbPcie.c b/src/mainboard/lenovo/g505s/PlatformGnbPcie.c
index 920afc47ba..452237905b 100644
--- a/src/mainboard/lenovo/g505s/PlatformGnbPcie.c
+++ b/src/mainboard/lenovo/g505s/PlatformGnbPcie.c
@@ -159,10 +159,8 @@ static const PCIe_DDI_DESCRIPTOR DdiList [] = {
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
@@ -194,4 +192,9 @@ OemCustomizeInitEarly (
PcieComplexListPtr->DdiLinkList = DdiList;
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/lippert/frontrunner-af/PlatformGnbPcie.c b/src/mainboard/lippert/frontrunner-af/PlatformGnbPcie.c
index 6bd2b1ca19..ae79dc8ba9 100644
--- a/src/mainboard/lippert/frontrunner-af/PlatformGnbPcie.c
+++ b/src/mainboard/lippert/frontrunner-af/PlatformGnbPcie.c
@@ -45,10 +45,8 @@
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
VOID *BrazosPcieComplexListPtr;
@@ -144,4 +142,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
InitEarly->GnbConfig.PsppPolicy = 0;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/lippert/toucan-af/PlatformGnbPcie.c b/src/mainboard/lippert/toucan-af/PlatformGnbPcie.c
index 358428020a..16d1b4afc1 100644
--- a/src/mainboard/lippert/toucan-af/PlatformGnbPcie.c
+++ b/src/mainboard/lippert/toucan-af/PlatformGnbPcie.c
@@ -45,10 +45,8 @@
*
**/
/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+
+static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
{
AGESA_STATUS Status;
VOID *BrazosPcieComplexListPtr;
@@ -144,4 +142,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
InitEarly->GnbConfig.PsppPolicy = 0;
+ return AGESA_SUCCESS;
}
+
+const struct OEM_HOOK OemCustomize = {
+ .InitEarly = OemInitEarly,
+};
diff --git a/src/mainboard/supermicro/h8qgi/BiosCallOuts.c b/src/mainboard/supermicro/h8qgi/BiosCallOuts.c
index 15244b519c..06b2f3e4f2 100644
--- a/src/mainboard/supermicro/h8qgi/BiosCallOuts.c
+++ b/src/mainboard/supermicro/h8qgi/BiosCallOuts.c
@@ -19,6 +19,7 @@
#include "AGESA.h"
#include "amdlib.h"
+#include <northbridge/amd/agesa/agesawrapper.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include "Ids.h"
#include "OptionsIds.h"
@@ -109,3 +110,6 @@ static AGESA_STATUS board_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
return Status;
}
+
+const struct OEM_HOOK OemCustomize = {
+};
diff --git a/src/mainboard/supermicro/h8scm/BiosCallOuts.c b/src/mainboard/supermicro/h8scm/BiosCallOuts.c
index 5d5b1bdf78..58908c90c8 100644
--- a/src/mainboard/supermicro/h8scm/BiosCallOuts.c
+++ b/src/mainboard/supermicro/h8scm/BiosCallOuts.c
@@ -19,6 +19,7 @@
#include "AGESA.h"
#include "amdlib.h"
+#include <northbridge/amd/agesa/agesawrapper.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include "Ids.h"
#include "OptionsIds.h"
@@ -40,3 +41,6 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess },
};
const int BiosCalloutsLen = ARRAY_SIZE(BiosCallouts);
+
+const struct OEM_HOOK OemCustomize = {
+};
diff --git a/src/mainboard/tyan/s8226/BiosCallOuts.c b/src/mainboard/tyan/s8226/BiosCallOuts.c
index 19f0b4f3d4..7fe90c5dab 100644
--- a/src/mainboard/tyan/s8226/BiosCallOuts.c
+++ b/src/mainboard/tyan/s8226/BiosCallOuts.c
@@ -19,6 +19,7 @@
#include "AGESA.h"
#include "amdlib.h"
+#include <northbridge/amd/agesa/agesawrapper.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include "Ids.h"
#include "OptionsIds.h"
@@ -117,3 +118,6 @@ static AGESA_STATUS board_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
return Status;
}
+
+const struct OEM_HOOK OemCustomize = {
+};
diff --git a/src/northbridge/amd/agesa/agesawrapper.h b/src/northbridge/amd/agesa/agesawrapper.h
index dfb8c740bc..8147f85546 100644
--- a/src/northbridge/amd/agesa/agesawrapper.h
+++ b/src/northbridge/amd/agesa/agesawrapper.h
@@ -59,7 +59,25 @@ void *agesawrapper_getlateinitptr (int pick);
AGESA_STATUS agesawrapper_fchs3earlyrestore(void);
AGESA_STATUS agesawrapper_fchs3laterestore(void);
-void OemCustomizeInitEarly(AMD_EARLY_PARAMS *InitEarly);
-void OemCustomizeInitPost(AMD_POST_PARAMS *InitPost);
+struct OEM_HOOK
+{
+ /* romstage */
+ AGESA_STATUS (*InitEarly)(AMD_EARLY_PARAMS *);
+ AGESA_STATUS (*InitPost)(AMD_POST_PARAMS *);
+};
+
+extern const struct OEM_HOOK OemCustomize;
+
+static inline void OemCustomizeInitEarly(AMD_EARLY_PARAMS *EarlyParams)
+{
+ if (OemCustomize.InitEarly)
+ OemCustomize.InitEarly(EarlyParams);
+}
+
+static inline void OemCustomizeInitPost(AMD_POST_PARAMS *PostParams)
+{
+ if (OemCustomize.InitPost)
+ OemCustomize.InitPost(PostParams);
+}
#endif /* _AGESAWRAPPER_H_ */
diff --git a/src/northbridge/amd/agesa/family15/agesawrapper.c b/src/northbridge/amd/agesa/family15/agesawrapper.c
index 9b62d3fac8..e7ce838e4b 100644
--- a/src/northbridge/amd/agesa/family15/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family15/agesawrapper.c
@@ -35,20 +35,6 @@
#define FILECODE UNASSIGNED_FILE_FILECODE
-/* TODO: Function body should be in mainboard directory. */
-void OemCustomizeInitEarly(AMD_EARLY_PARAMS *InitEarly)
-{
-}
-
-void OemCustomizeInitPost(AMD_POST_PARAMS *InitPost)
-{
-#if IS_ENABLED(CONFIG_BOARD_AMD_DINAR)
- InitPost->MemConfig.UmaMode = UMA_AUTO;
- InitPost->MemConfig.BottomIo = 0xE0;
- InitPost->MemConfig.UmaSize = 0xE0-0xC0;
-#endif
-}
-
AGESA_STATUS agesawrapper_amdinitreset(void)
{
AGESA_STATUS status = AGESA_SUCCESS;