AGESA: Add OemCustomize hooks structure
We should potentially provide an OEM platform hook to manipulate parameters around any entry point to AGESA. Use structure for such ops to avoid weak functions and lots of empty function stubs. Change-Id: I99bf7de8a1e2f183399d2216520a45d0c24fd64c Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7824 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
parent
1ef67e166a
commit
6e74b2cbac
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "AGESA.h"
|
#include "AGESA.h"
|
||||||
#include "amdlib.h"
|
#include "amdlib.h"
|
||||||
|
#include <northbridge/amd/agesa/agesawrapper.h>
|
||||||
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
||||||
#include "Ids.h"
|
#include "Ids.h"
|
||||||
#include "OptionsIds.h"
|
#include "OptionsIds.h"
|
||||||
@ -115,3 +116,15 @@ static AGESA_STATUS board_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
|||||||
|
|
||||||
return Status;
|
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,
|
||||||
|
};
|
||||||
|
@ -41,10 +41,8 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
VOID *BrazosPcieComplexListPtr;
|
VOID *BrazosPcieComplexListPtr;
|
||||||
@ -132,4 +130,9 @@ OemCustomizeInitEarly (
|
|||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
||||||
InitEarly->GnbConfig.PsppPolicy = 0;
|
InitEarly->GnbConfig.PsppPolicy = 0;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -123,10 +123,8 @@ static const PCIe_COMPLEX_DESCRIPTOR PcieComplex = {
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
|
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
|
||||||
@ -148,4 +146,9 @@ OemCustomizeInitEarly (
|
|||||||
PcieComplexListPtr = (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;
|
PcieComplexListPtr = (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;
|
||||||
LibAmdMemCopy (PcieComplexListPtr, &PcieComplex, sizeof(PcieComplex), &InitEarly->StdHeader);
|
LibAmdMemCopy (PcieComplexListPtr, &PcieComplex, sizeof(PcieComplex), &InitEarly->StdHeader);
|
||||||
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -160,10 +160,8 @@ static const PCIe_DDI_DESCRIPTOR DdiList [] = {
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
|
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
|
||||||
@ -195,4 +193,9 @@ OemCustomizeInitEarly (
|
|||||||
PcieComplexListPtr->DdiLinkList = DdiList;
|
PcieComplexListPtr->DdiLinkList = DdiList;
|
||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -39,10 +39,8 @@
|
|||||||
* @retval VOID
|
* @retval VOID
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
VOID *BrazosPcieComplexListPtr;
|
VOID *BrazosPcieComplexListPtr;
|
||||||
@ -138,4 +136,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
|
|||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
||||||
InitEarly->GnbConfig.PsppPolicy = 0;
|
InitEarly->GnbConfig.PsppPolicy = 0;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -41,10 +41,8 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
VOID *BrazosPcieComplexListPtr;
|
VOID *BrazosPcieComplexListPtr;
|
||||||
@ -140,4 +138,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
|
|||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
||||||
InitEarly->GnbConfig.PsppPolicy = 0;
|
InitEarly->GnbConfig.PsppPolicy = 0;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -166,10 +166,8 @@ static const PCIe_COMPLEX_DESCRIPTOR Trinity = {
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
VOID *TrinityPcieComplexListPtr;
|
VOID *TrinityPcieComplexListPtr;
|
||||||
@ -221,4 +219,9 @@ OemCustomizeInitEarly (
|
|||||||
((PCIe_COMPLEX_DESCRIPTOR*)TrinityPcieComplexListPtr)->DdiLinkList = (PCIe_DDI_DESCRIPTOR*)TrinityPcieDdiPtr;
|
((PCIe_COMPLEX_DESCRIPTOR*)TrinityPcieComplexListPtr)->DdiLinkList = (PCIe_DDI_DESCRIPTOR*)TrinityPcieDdiPtr;
|
||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = TrinityPcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = TrinityPcieComplexListPtr;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -108,10 +108,8 @@ static const PCIe_COMPLEX_DESCRIPTOR Llano = {
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
VOID *LlanoPcieComplexListPtr;
|
VOID *LlanoPcieComplexListPtr;
|
||||||
@ -165,4 +163,9 @@ OemCustomizeInitEarly (
|
|||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = LlanoPcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = LlanoPcieComplexListPtr;
|
||||||
InitEarly->GnbConfig.PsppPolicy = 0;
|
InitEarly->GnbConfig.PsppPolicy = 0;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -45,10 +45,8 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
VOID *BrazosPcieComplexListPtr;
|
VOID *BrazosPcieComplexListPtr;
|
||||||
@ -146,4 +144,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
|
|||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
||||||
InitEarly->GnbConfig.PsppPolicy = 0;
|
InitEarly->GnbConfig.PsppPolicy = 0;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -45,10 +45,8 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
VOID *BrazosPcieComplexListPtr;
|
VOID *BrazosPcieComplexListPtr;
|
||||||
@ -146,4 +144,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
|
|||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
||||||
InitEarly->GnbConfig.PsppPolicy = 0;
|
InitEarly->GnbConfig.PsppPolicy = 0;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -123,10 +123,8 @@ static const PCIe_COMPLEX_DESCRIPTOR PcieComplex = {
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
|
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
|
||||||
@ -148,4 +146,9 @@ OemCustomizeInitEarly (
|
|||||||
PcieComplexListPtr = (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;
|
PcieComplexListPtr = (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;
|
||||||
LibAmdMemCopy (PcieComplexListPtr, &PcieComplex, sizeof(PcieComplex), &InitEarly->StdHeader);
|
LibAmdMemCopy (PcieComplexListPtr, &PcieComplex, sizeof(PcieComplex), &InitEarly->StdHeader);
|
||||||
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -142,10 +142,8 @@ static const PCIe_COMPLEX_DESCRIPTOR Trinity = {
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
VOID *TrinityPcieComplexListPtr;
|
VOID *TrinityPcieComplexListPtr;
|
||||||
@ -196,4 +194,9 @@ OemCustomizeInitEarly (
|
|||||||
((PCIe_COMPLEX_DESCRIPTOR*)TrinityPcieComplexListPtr)->DdiLinkList = (PCIe_DDI_DESCRIPTOR*)TrinityPcieDdiPtr;
|
((PCIe_COMPLEX_DESCRIPTOR*)TrinityPcieComplexListPtr)->DdiLinkList = (PCIe_DDI_DESCRIPTOR*)TrinityPcieDdiPtr;
|
||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = TrinityPcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = TrinityPcieComplexListPtr;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -44,10 +44,8 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
VOID *BrazosPcieComplexListPtr;
|
VOID *BrazosPcieComplexListPtr;
|
||||||
@ -143,4 +141,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
|
|||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
||||||
InitEarly->GnbConfig.PsppPolicy = 0;
|
InitEarly->GnbConfig.PsppPolicy = 0;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -117,10 +117,8 @@ static const PCIe_COMPLEX_DESCRIPTOR PcieComplex = {
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
|
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
|
||||||
@ -142,4 +140,9 @@ OemCustomizeInitEarly (
|
|||||||
PcieComplexListPtr = (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;
|
PcieComplexListPtr = (PCIe_COMPLEX_DESCRIPTOR *) AllocHeapParams.BufferPtr;
|
||||||
LibAmdMemCopy (PcieComplexListPtr, &PcieComplex, sizeof(PcieComplex), &InitEarly->StdHeader);
|
LibAmdMemCopy (PcieComplexListPtr, &PcieComplex, sizeof(PcieComplex), &InitEarly->StdHeader);
|
||||||
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -159,10 +159,8 @@ static const PCIe_DDI_DESCRIPTOR DdiList [] = {
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
|
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
|
||||||
@ -194,4 +192,9 @@ OemCustomizeInitEarly (
|
|||||||
PcieComplexListPtr->DdiLinkList = DdiList;
|
PcieComplexListPtr->DdiLinkList = DdiList;
|
||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -38,7 +38,8 @@
|
|||||||
* @param[in] *InitEarly
|
* @param[in] *InitEarly
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
void OemCustomizeInitEarly (IN OUT AMD_EARLY_PARAMS *InitEarly)
|
|
||||||
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
void *BrazosPcieComplexListPtr;
|
void *BrazosPcieComplexListPtr;
|
||||||
@ -181,4 +182,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
|
|||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
||||||
InitEarly->GnbConfig.PsppPolicy = 0;
|
InitEarly->GnbConfig.PsppPolicy = 0;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -159,10 +159,8 @@ static const PCIe_DDI_DESCRIPTOR DdiList [] = {
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
|
PCIe_COMPLEX_DESCRIPTOR *PcieComplexListPtr;
|
||||||
@ -194,4 +192,9 @@ OemCustomizeInitEarly (
|
|||||||
PcieComplexListPtr->DdiLinkList = DdiList;
|
PcieComplexListPtr->DdiLinkList = DdiList;
|
||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = PcieComplexListPtr;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -45,10 +45,8 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
VOID *BrazosPcieComplexListPtr;
|
VOID *BrazosPcieComplexListPtr;
|
||||||
@ -144,4 +142,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
|
|||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
||||||
InitEarly->GnbConfig.PsppPolicy = 0;
|
InitEarly->GnbConfig.PsppPolicy = 0;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -45,10 +45,8 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
/*---------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------*/
|
||||||
VOID
|
|
||||||
OemCustomizeInitEarly (
|
static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
|
||||||
IN OUT AMD_EARLY_PARAMS *InitEarly
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
VOID *BrazosPcieComplexListPtr;
|
VOID *BrazosPcieComplexListPtr;
|
||||||
@ -144,4 +142,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
|
|||||||
|
|
||||||
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
InitEarly->GnbConfig.PcieComplexList = BrazosPcieComplexListPtr;
|
||||||
InitEarly->GnbConfig.PsppPolicy = 0;
|
InitEarly->GnbConfig.PsppPolicy = 0;
|
||||||
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
.InitEarly = OemInitEarly,
|
||||||
|
};
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "AGESA.h"
|
#include "AGESA.h"
|
||||||
#include "amdlib.h"
|
#include "amdlib.h"
|
||||||
|
#include <northbridge/amd/agesa/agesawrapper.h>
|
||||||
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
||||||
#include "Ids.h"
|
#include "Ids.h"
|
||||||
#include "OptionsIds.h"
|
#include "OptionsIds.h"
|
||||||
@ -109,3 +110,6 @@ static AGESA_STATUS board_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
|||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
};
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "AGESA.h"
|
#include "AGESA.h"
|
||||||
#include "amdlib.h"
|
#include "amdlib.h"
|
||||||
|
#include <northbridge/amd/agesa/agesawrapper.h>
|
||||||
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
||||||
#include "Ids.h"
|
#include "Ids.h"
|
||||||
#include "OptionsIds.h"
|
#include "OptionsIds.h"
|
||||||
@ -40,3 +41,6 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] =
|
|||||||
{AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess },
|
{AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess },
|
||||||
};
|
};
|
||||||
const int BiosCalloutsLen = ARRAY_SIZE(BiosCallouts);
|
const int BiosCalloutsLen = ARRAY_SIZE(BiosCallouts);
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
};
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "AGESA.h"
|
#include "AGESA.h"
|
||||||
#include "amdlib.h"
|
#include "amdlib.h"
|
||||||
|
#include <northbridge/amd/agesa/agesawrapper.h>
|
||||||
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
||||||
#include "Ids.h"
|
#include "Ids.h"
|
||||||
#include "OptionsIds.h"
|
#include "OptionsIds.h"
|
||||||
@ -117,3 +118,6 @@ static AGESA_STATUS board_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
|||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct OEM_HOOK OemCustomize = {
|
||||||
|
};
|
||||||
|
@ -59,7 +59,25 @@ void *agesawrapper_getlateinitptr (int pick);
|
|||||||
AGESA_STATUS agesawrapper_fchs3earlyrestore(void);
|
AGESA_STATUS agesawrapper_fchs3earlyrestore(void);
|
||||||
AGESA_STATUS agesawrapper_fchs3laterestore(void);
|
AGESA_STATUS agesawrapper_fchs3laterestore(void);
|
||||||
|
|
||||||
void OemCustomizeInitEarly(AMD_EARLY_PARAMS *InitEarly);
|
struct OEM_HOOK
|
||||||
void OemCustomizeInitPost(AMD_POST_PARAMS *InitPost);
|
{
|
||||||
|
/* 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_ */
|
#endif /* _AGESAWRAPPER_H_ */
|
||||||
|
@ -35,20 +35,6 @@
|
|||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
#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 agesawrapper_amdinitreset(void)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status = AGESA_SUCCESS;
|
AGESA_STATUS status = AGESA_SUCCESS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user