AGESA: Use common agesawrapper
Callout FCH_OEM_CONFIG is made during AMD_INIT_RESET, so it was required to provide GetBiosCallOut here too. Change-Id: I0eab858677d14536293385ca37daab3e538132e6 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7826 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
parent
296696d697
commit
e4db49730e
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of the coreboot project.
|
* This file is part of the coreboot project.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Advanced Micro Devices, Inc.
|
* Copyright (C) 2011-2012 Advanced Micro Devices, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -25,8 +25,156 @@
|
||||||
|
|
||||||
#include "heapManager.h"
|
#include "heapManager.h"
|
||||||
|
|
||||||
#if !defined(__PRE_RAM__)
|
static const struct OEM_HOOK *OemHook = &OemCustomize;
|
||||||
|
|
||||||
|
#if defined(__PRE_RAM__)
|
||||||
|
|
||||||
|
AGESA_STATUS agesawrapper_amdinitreset(void)
|
||||||
|
{
|
||||||
|
AGESA_STATUS status;
|
||||||
|
AMD_INTERFACE_PARAMS AmdParamStruct;
|
||||||
|
AMD_RESET_PARAMS AmdResetParams;
|
||||||
|
|
||||||
|
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
||||||
|
memset(&AmdResetParams, 0, sizeof(AMD_RESET_PARAMS));
|
||||||
|
|
||||||
|
AmdParamStruct.AgesaFunctionName = AMD_INIT_RESET;
|
||||||
|
AmdParamStruct.AllocationMethod = ByHost;
|
||||||
|
AmdParamStruct.NewStructSize = sizeof(AMD_RESET_PARAMS);
|
||||||
|
AmdParamStruct.NewStructPtr = &AmdResetParams;
|
||||||
|
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
||||||
|
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
||||||
|
AmdParamStruct.StdHeader.Func = 0;
|
||||||
|
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
||||||
|
|
||||||
|
AmdCreateStruct(&AmdParamStruct);
|
||||||
|
AmdResetParams.HtConfig.Depth = 0;
|
||||||
|
|
||||||
|
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
|
||||||
|
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
||||||
|
AmdReleaseStruct(&AmdParamStruct);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
AGESA_STATUS agesawrapper_amdinitearly(void)
|
||||||
|
{
|
||||||
|
AGESA_STATUS status;
|
||||||
|
AMD_INTERFACE_PARAMS AmdParamStruct;
|
||||||
|
AMD_EARLY_PARAMS *AmdEarlyParamsPtr;
|
||||||
|
|
||||||
|
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
||||||
|
|
||||||
|
AmdParamStruct.AgesaFunctionName = AMD_INIT_EARLY;
|
||||||
|
AmdParamStruct.AllocationMethod = PreMemHeap;
|
||||||
|
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
||||||
|
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
||||||
|
AmdParamStruct.StdHeader.Func = 0;
|
||||||
|
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
||||||
|
AmdCreateStruct(&AmdParamStruct);
|
||||||
|
|
||||||
|
/* OEM Should Customize the defaults through this hook. */
|
||||||
|
AmdEarlyParamsPtr = (AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr;
|
||||||
|
if (OemHook->InitEarly)
|
||||||
|
OemHook->InitEarly(AmdEarlyParamsPtr);
|
||||||
|
|
||||||
|
status = AmdInitEarly(AmdEarlyParamsPtr);
|
||||||
|
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
||||||
|
|
||||||
|
AmdReleaseStruct(&AmdParamStruct);
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
AGESA_STATUS agesawrapper_amdinitpost(void)
|
||||||
|
{
|
||||||
|
AGESA_STATUS status;
|
||||||
|
AMD_INTERFACE_PARAMS AmdParamStruct;
|
||||||
|
AMD_POST_PARAMS *PostParams;
|
||||||
|
|
||||||
|
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
||||||
|
|
||||||
|
AmdParamStruct.AgesaFunctionName = AMD_INIT_POST;
|
||||||
|
AmdParamStruct.AllocationMethod = PreMemHeap;
|
||||||
|
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
||||||
|
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
||||||
|
AmdParamStruct.StdHeader.Func = 0;
|
||||||
|
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
||||||
|
|
||||||
|
AmdCreateStruct(&AmdParamStruct);
|
||||||
|
|
||||||
|
/* OEM Should Customize the defaults through this hook. */
|
||||||
|
PostParams = (AMD_POST_PARAMS *) AmdParamStruct.NewStructPtr;
|
||||||
|
if (OemHook->InitPost)
|
||||||
|
OemHook->InitPost(PostParams);
|
||||||
|
|
||||||
|
status = AmdInitPost(PostParams);
|
||||||
|
AGESA_EVENTLOG(status, &PostParams->StdHeader);
|
||||||
|
|
||||||
|
AmdReleaseStruct(&AmdParamStruct);
|
||||||
|
|
||||||
|
/* Initialize heap space */
|
||||||
|
EmptyHeap();
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
AGESA_STATUS agesawrapper_amdinitenv(void)
|
||||||
|
{
|
||||||
|
AGESA_STATUS status;
|
||||||
|
AMD_INTERFACE_PARAMS AmdParamStruct;
|
||||||
|
AMD_ENV_PARAMS *EnvParam;
|
||||||
|
|
||||||
|
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
||||||
|
|
||||||
|
AmdParamStruct.AgesaFunctionName = AMD_INIT_ENV;
|
||||||
|
AmdParamStruct.AllocationMethod = PostMemDram;
|
||||||
|
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
||||||
|
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
||||||
|
AmdParamStruct.StdHeader.Func = 0;
|
||||||
|
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
||||||
|
AmdCreateStruct(&AmdParamStruct);
|
||||||
|
EnvParam = (AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr;
|
||||||
|
|
||||||
|
status = AmdInitEnv(EnvParam);
|
||||||
|
AGESA_EVENTLOG(status, &EnvParam->StdHeader);
|
||||||
|
|
||||||
|
AmdReleaseStruct(&AmdParamStruct);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else /* __PRE_RAM__ */
|
||||||
|
|
||||||
|
AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
|
{
|
||||||
|
AGESA_STATUS status;
|
||||||
|
AMD_INTERFACE_PARAMS AmdParamStruct;
|
||||||
|
AMD_MID_PARAMS *MidParam;
|
||||||
|
|
||||||
|
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
||||||
|
|
||||||
|
AmdParamStruct.AgesaFunctionName = AMD_INIT_MID;
|
||||||
|
AmdParamStruct.AllocationMethod = PostMemDram;
|
||||||
|
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
||||||
|
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
||||||
|
AmdParamStruct.StdHeader.Func = 0;
|
||||||
|
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
||||||
|
|
||||||
|
AmdCreateStruct(&AmdParamStruct);
|
||||||
|
|
||||||
|
/* OEM Should Customize the defaults through this hook. */
|
||||||
|
MidParam = (AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr;
|
||||||
|
if (OemHook->InitMid)
|
||||||
|
OemHook->InitMid(MidParam);
|
||||||
|
|
||||||
|
status = AmdInitMid(MidParam);
|
||||||
|
AGESA_EVENTLOG(status, &MidParam->StdHeader);
|
||||||
|
AmdReleaseStruct(&AmdParamStruct);
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* We will reference AmdLateParams later to copy ACPI tables. */
|
||||||
static AMD_LATE_PARAMS *AmdLateParams = NULL;
|
static AMD_LATE_PARAMS *AmdLateParams = NULL;
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitlate(void)
|
AGESA_STATUS agesawrapper_amdinitlate(void)
|
||||||
|
@ -54,9 +202,7 @@ AGESA_STATUS agesawrapper_amdinitlate(void)
|
||||||
AGESA_EVENTLOG(status, &AmdLateParams->StdHeader);
|
AGESA_EVENTLOG(status, &AmdLateParams->StdHeader);
|
||||||
ASSERT(status == AGESA_SUCCESS);
|
ASSERT(status == AGESA_SUCCESS);
|
||||||
|
|
||||||
/* We will reference AmdLateParams when coreboot copies the ACPI tables,
|
/* No AmdReleaseStruct(&AmdParamStruct), we need AmdLateParams later. */
|
||||||
* so must not call AmdReleaseStruct(&AmdParamStruct) here.
|
|
||||||
*/
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,22 +71,4 @@ struct OEM_HOOK
|
||||||
|
|
||||||
extern const struct OEM_HOOK OemCustomize;
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void OemCustomizeInitMid(AMD_MID_PARAMS *MidParams)
|
|
||||||
{
|
|
||||||
if (OemCustomize.InitMid)
|
|
||||||
OemCustomize.InitMid(MidParams);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _AGESAWRAPPER_H_ */
|
#endif /* _AGESAWRAPPER_H_ */
|
||||||
|
|
|
@ -18,7 +18,5 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
romstage-y += dimmSpd.c
|
romstage-y += dimmSpd.c
|
||||||
romstage-y += agesawrapper.c
|
|
||||||
|
|
||||||
ramstage-y += northbridge.c
|
ramstage-y += northbridge.c
|
||||||
ramstage-y += agesawrapper.c
|
|
||||||
|
|
|
@ -1,157 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of the coreboot project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <cpu/x86/mtrr.h>
|
|
||||||
#include <northbridge/amd/agesa/agesawrapper.h>
|
|
||||||
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
|
||||||
#include "cpuRegisters.h"
|
|
||||||
#include "cpuCacheInit.h"
|
|
||||||
#include "cpuApicUtilities.h"
|
|
||||||
#include "cpuEarlyInit.h"
|
|
||||||
#include "cpuLateInit.h"
|
|
||||||
#include "Dispatcher.h"
|
|
||||||
#include "cpuCacheInit.h"
|
|
||||||
#include "amdlib.h"
|
|
||||||
#include "Filecode.h"
|
|
||||||
#include <arch/io.h>
|
|
||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitreset(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_RESET_PARAMS AmdResetParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
memset(&AmdResetParams, 0, sizeof(AMD_RESET_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_RESET;
|
|
||||||
AmdParamStruct.AllocationMethod = ByHost;
|
|
||||||
AmdParamStruct.NewStructSize = sizeof(AMD_RESET_PARAMS);
|
|
||||||
AmdParamStruct.NewStructPtr = &AmdResetParams;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = NULL;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
AmdResetParams.HtConfig.Depth = 0;
|
|
||||||
|
|
||||||
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitearly(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_EARLY_PARAMS *AmdEarlyParamsPtr;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_EARLY;
|
|
||||||
AmdParamStruct.AllocationMethod = PreMemHeap;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
AmdEarlyParamsPtr = (AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
OemCustomizeInitEarly(AmdEarlyParamsPtr);
|
|
||||||
|
|
||||||
status = AmdInitEarly((AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitpost(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_POST;
|
|
||||||
AmdParamStruct.AllocationMethod = PreMemHeap;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
status = AmdInitPost((AMD_POST_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
/* Initialize heap space */
|
|
||||||
EmptyHeap();
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitenv(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_ENV;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
status = AmdInitEnv((AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitmid(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_MID;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
|
@ -18,7 +18,5 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
romstage-y += dimmSpd.c
|
romstage-y += dimmSpd.c
|
||||||
romstage-y += agesawrapper.c
|
|
||||||
|
|
||||||
ramstage-y += northbridge.c
|
ramstage-y += northbridge.c
|
||||||
ramstage-y += agesawrapper.c
|
|
||||||
|
|
|
@ -1,157 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of the coreboot project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define __SIMPLE_DEVICE__
|
|
||||||
|
|
||||||
#include <arch/io.h>
|
|
||||||
#include <cpu/x86/msr.h>
|
|
||||||
#include <cpu/x86/mtrr.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <cpu/amd/agesa/s3_resume.h>
|
|
||||||
#include <northbridge/amd/agesa/agesawrapper.h>
|
|
||||||
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
|
||||||
|
|
||||||
#include "amdlib.h"
|
|
||||||
#include <vendorcode/amd/agesa/f14/Proc/CPU/heapManager.h>
|
|
||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitreset(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_RESET_PARAMS AmdResetParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
memset(&AmdResetParams, 0, sizeof(AMD_RESET_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_RESET;
|
|
||||||
AmdParamStruct.AllocationMethod = ByHost;
|
|
||||||
AmdParamStruct.NewStructSize = sizeof(AMD_RESET_PARAMS);
|
|
||||||
AmdParamStruct.NewStructPtr = &AmdResetParams;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = NULL;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
AmdResetParams.HtConfig.Depth = 0;
|
|
||||||
|
|
||||||
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitearly(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_EARLY_PARAMS *AmdEarlyParamsPtr;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_EARLY;
|
|
||||||
AmdParamStruct.AllocationMethod = PreMemHeap;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
AmdEarlyParamsPtr = (AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
OemCustomizeInitEarly(AmdEarlyParamsPtr);
|
|
||||||
|
|
||||||
status = AmdInitEarly((AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitpost(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_POST;
|
|
||||||
AmdParamStruct.AllocationMethod = PreMemHeap;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
status = AmdInitPost((AMD_POST_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
/* Initialize heap space */
|
|
||||||
EmptyHeap();
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitenv(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_ENV;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
status = AmdInitEnv((AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitmid(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_MID;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
|
@ -18,7 +18,5 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
romstage-y += dimmSpd.c
|
romstage-y += dimmSpd.c
|
||||||
romstage-y += agesawrapper.c
|
|
||||||
|
|
||||||
ramstage-y += northbridge.c
|
ramstage-y += northbridge.c
|
||||||
ramstage-y += agesawrapper.c
|
|
||||||
|
|
|
@ -1,176 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of the coreboot project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 - 2012 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <cpu/x86/mtrr.h>
|
|
||||||
#include <northbridge/amd/agesa/agesawrapper.h>
|
|
||||||
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
|
||||||
#include "cpuRegisters.h"
|
|
||||||
#include "cpuCacheInit.h"
|
|
||||||
#include "cpuApicUtilities.h"
|
|
||||||
#include "cpuEarlyInit.h"
|
|
||||||
#include "cpuLateInit.h"
|
|
||||||
#include "Dispatcher.h"
|
|
||||||
#include "cpuCacheInit.h"
|
|
||||||
#include "amdlib.h"
|
|
||||||
#include "Filecode.h"
|
|
||||||
#include "heapManager.h"
|
|
||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitreset(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status = AGESA_SUCCESS;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_RESET_PARAMS AmdResetParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
memset(&AmdResetParams, 0, sizeof(AMD_RESET_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_RESET;
|
|
||||||
AmdParamStruct.AllocationMethod = ByHost;
|
|
||||||
AmdParamStruct.NewStructSize = sizeof(AMD_RESET_PARAMS);
|
|
||||||
AmdParamStruct.NewStructPtr = &AmdResetParams;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = NULL;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
AmdResetParams.HtConfig.Depth = 0;
|
|
||||||
|
|
||||||
//MARG34PI disabled AGESA_ENTRY_INIT_RESET by default
|
|
||||||
//but we need to call AmdCreateStruct to call HeapManagerInit, or the event log not work
|
|
||||||
#if (defined AGESA_ENTRY_INIT_RESET) && (AGESA_ENTRY_INIT_RESET == TRUE)
|
|
||||||
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
#endif
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitearly(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_EARLY_PARAMS *AmdEarlyParamsPtr;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_EARLY;
|
|
||||||
AmdParamStruct.AllocationMethod = PreMemHeap;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
AmdEarlyParamsPtr = (AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
|
|
||||||
/* OEM Should Customize the defaults through this hook */
|
|
||||||
OemCustomizeInitEarly(AmdEarlyParamsPtr);
|
|
||||||
|
|
||||||
status = AmdInitEarly(AmdEarlyParamsPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitpost(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_POST_PARAMS *PostParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_POST;
|
|
||||||
AmdParamStruct.AllocationMethod = PreMemHeap;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
PostParams = (AMD_POST_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
|
|
||||||
/* OEM Should Customize the defaults through this hook */
|
|
||||||
OemCustomizeInitPost(PostParams);
|
|
||||||
|
|
||||||
status = AmdInitPost(PostParams);
|
|
||||||
AGESA_EVENTLOG(status, &PostParams->StdHeader);
|
|
||||||
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
/* Initialize heap space */
|
|
||||||
EmptyHeap();
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitenv(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_ENV_PARAMS *EnvParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_ENV;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
EnvParams = (AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
status = AmdInitEnv(EnvParams);
|
|
||||||
AGESA_EVENTLOG(status, &EnvParams->StdHeader);
|
|
||||||
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitmid(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_MID;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
|
@ -18,8 +18,6 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
romstage-y += dimmSpd.c
|
romstage-y += dimmSpd.c
|
||||||
romstage-y += agesawrapper.c
|
|
||||||
|
|
||||||
ramstage-y += iommu.c
|
ramstage-y += iommu.c
|
||||||
ramstage-y += northbridge.c
|
ramstage-y += northbridge.c
|
||||||
ramstage-y += agesawrapper.c
|
|
||||||
|
|
|
@ -1,167 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of the coreboot project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <cpu/x86/mtrr.h>
|
|
||||||
#include <northbridge/amd/agesa/agesawrapper.h>
|
|
||||||
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
|
||||||
#include "cpuRegisters.h"
|
|
||||||
#include "cpuCacheInit.h"
|
|
||||||
#include "cpuApicUtilities.h"
|
|
||||||
#include "cpuEarlyInit.h"
|
|
||||||
#include "cpuLateInit.h"
|
|
||||||
#include "Dispatcher.h"
|
|
||||||
#include "cpuCacheInit.h"
|
|
||||||
#include "amdlib.h"
|
|
||||||
#include "Filecode.h"
|
|
||||||
#include "heapManager.h"
|
|
||||||
#include "FchPlatform.h"
|
|
||||||
#include "Fch.h"
|
|
||||||
#include <cpu/amd/agesa/s3_resume.h>
|
|
||||||
#include <arch/io.h>
|
|
||||||
#include <device/device.h>
|
|
||||||
#include "hudson.h"
|
|
||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitreset(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_RESET_PARAMS AmdResetParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
memset(&AmdResetParams, 0, sizeof(AMD_RESET_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_RESET;
|
|
||||||
AmdParamStruct.AllocationMethod = ByHost;
|
|
||||||
AmdParamStruct.NewStructSize = sizeof(AMD_RESET_PARAMS);
|
|
||||||
AmdParamStruct.NewStructPtr = &AmdResetParams;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
AmdResetParams.HtConfig.Depth = 0;
|
|
||||||
|
|
||||||
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitearly(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_EARLY_PARAMS *AmdEarlyParamsPtr;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_EARLY;
|
|
||||||
AmdParamStruct.AllocationMethod = PreMemHeap;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
AmdEarlyParamsPtr = (AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
OemCustomizeInitEarly(AmdEarlyParamsPtr);
|
|
||||||
|
|
||||||
status = AmdInitEarly((AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitpost(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_POST_PARAMS *PostParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_POST;
|
|
||||||
AmdParamStruct.AllocationMethod = PreMemHeap;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
PostParams = (AMD_POST_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
status = AmdInitPost(PostParams);
|
|
||||||
AGESA_EVENTLOG(status, &PostParams->StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
/* Initialize heap space */
|
|
||||||
EmptyHeap();
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitenv(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_ENV_PARAMS *EnvParam;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_ENV;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
EnvParam = (AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
|
|
||||||
status = AmdInitEnv(EnvParam);
|
|
||||||
AGESA_EVENTLOG(status, &EnvParam->StdHeader);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitmid(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_MID;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
OemCustomizeInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
|
|
||||||
status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
|
@ -18,8 +18,6 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
romstage-y += dimmSpd.c
|
romstage-y += dimmSpd.c
|
||||||
romstage-y += agesawrapper.c
|
|
||||||
|
|
||||||
ramstage-y += iommu.c
|
ramstage-y += iommu.c
|
||||||
ramstage-y += northbridge.c
|
ramstage-y += northbridge.c
|
||||||
ramstage-y += agesawrapper.c
|
|
||||||
|
|
|
@ -1,167 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of the coreboot project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <cpu/x86/mtrr.h>
|
|
||||||
#include <northbridge/amd/agesa/agesawrapper.h>
|
|
||||||
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
|
||||||
#include "cpuRegisters.h"
|
|
||||||
#include "cpuCacheInit.h"
|
|
||||||
#include "cpuApicUtilities.h"
|
|
||||||
#include "cpuEarlyInit.h"
|
|
||||||
#include "cpuLateInit.h"
|
|
||||||
#include "Dispatcher.h"
|
|
||||||
#include "cpuCacheInit.h"
|
|
||||||
#include "amdlib.h"
|
|
||||||
#include "Filecode.h"
|
|
||||||
#include "heapManager.h"
|
|
||||||
#include "FchPlatform.h"
|
|
||||||
#include "Fch.h"
|
|
||||||
#include <cpu/amd/agesa/s3_resume.h>
|
|
||||||
#include <arch/io.h>
|
|
||||||
#include <device/device.h>
|
|
||||||
#include "hudson.h"
|
|
||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitreset(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_RESET_PARAMS AmdResetParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
memset(&AmdResetParams, 0, sizeof(AMD_RESET_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_RESET;
|
|
||||||
AmdParamStruct.AllocationMethod = ByHost;
|
|
||||||
AmdParamStruct.NewStructSize = sizeof(AMD_RESET_PARAMS);
|
|
||||||
AmdParamStruct.NewStructPtr = &AmdResetParams;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
AmdResetParams.HtConfig.Depth = 0;
|
|
||||||
|
|
||||||
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitearly(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_EARLY_PARAMS *AmdEarlyParamsPtr;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_EARLY;
|
|
||||||
AmdParamStruct.AllocationMethod = PreMemHeap;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
AmdEarlyParamsPtr = (AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
OemCustomizeInitEarly(AmdEarlyParamsPtr);
|
|
||||||
|
|
||||||
status = AmdInitEarly((AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitpost(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_POST_PARAMS *PostParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_POST;
|
|
||||||
AmdParamStruct.AllocationMethod = PreMemHeap;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
PostParams = (AMD_POST_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
status = AmdInitPost(PostParams);
|
|
||||||
AGESA_EVENTLOG(status, &PostParams->StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
/* Initialize heap space */
|
|
||||||
EmptyHeap();
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitenv(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_ENV_PARAMS *EnvParam;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_ENV;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
EnvParam = (AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
|
|
||||||
status = AmdInitEnv(EnvParam);
|
|
||||||
AGESA_EVENTLOG(status, &EnvParam->StdHeader);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitmid(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_MID;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
OemCustomizeInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
|
|
||||||
status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
|
@ -18,7 +18,5 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
romstage-y += dimmSpd.c
|
romstage-y += dimmSpd.c
|
||||||
romstage-y += agesawrapper.c
|
|
||||||
|
|
||||||
ramstage-y += northbridge.c
|
ramstage-y += northbridge.c
|
||||||
ramstage-y += agesawrapper.c
|
|
||||||
|
|
|
@ -1,167 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of the coreboot project.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Advanced Micro Devices, Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <cpu/x86/mtrr.h>
|
|
||||||
#include <northbridge/amd/agesa/agesawrapper.h>
|
|
||||||
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
|
||||||
#include "cpuRegisters.h"
|
|
||||||
#include "cpuCacheInit.h"
|
|
||||||
#include "cpuApicUtilities.h"
|
|
||||||
#include "cpuEarlyInit.h"
|
|
||||||
#include "cpuLateInit.h"
|
|
||||||
#include "Dispatcher.h"
|
|
||||||
#include "cpuCacheInit.h"
|
|
||||||
#include "amdlib.h"
|
|
||||||
#include "Filecode.h"
|
|
||||||
#include "heapManager.h"
|
|
||||||
#include "FchPlatform.h"
|
|
||||||
#include "Fch.h"
|
|
||||||
#include <cpu/amd/agesa/s3_resume.h>
|
|
||||||
#include <arch/io.h>
|
|
||||||
#include <device/device.h>
|
|
||||||
#include "hudson.h"
|
|
||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitreset(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_RESET_PARAMS AmdResetParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
memset(&AmdResetParams, 0, sizeof(AMD_RESET_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_RESET;
|
|
||||||
AmdParamStruct.AllocationMethod = ByHost;
|
|
||||||
AmdParamStruct.NewStructSize = sizeof(AMD_RESET_PARAMS);
|
|
||||||
AmdParamStruct.NewStructPtr = &AmdResetParams;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
AmdResetParams.HtConfig.Depth = 0;
|
|
||||||
|
|
||||||
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitearly(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_EARLY_PARAMS *AmdEarlyParamsPtr;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_EARLY;
|
|
||||||
AmdParamStruct.AllocationMethod = PreMemHeap;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
AmdEarlyParamsPtr = (AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
OemCustomizeInitEarly(AmdEarlyParamsPtr);
|
|
||||||
|
|
||||||
status = AmdInitEarly((AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitpost(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_POST_PARAMS *PostParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_POST;
|
|
||||||
AmdParamStruct.AllocationMethod = PreMemHeap;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
PostParams = (AMD_POST_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
status = AmdInitPost(PostParams);
|
|
||||||
AGESA_EVENTLOG(status, &PostParams->StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
/* Initialize heap space */
|
|
||||||
EmptyHeap();
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitenv(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_ENV_PARAMS *EnvParam;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_ENV;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
EnvParam = (AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
|
|
||||||
status = AmdInitEnv(EnvParam);
|
|
||||||
AGESA_EVENTLOG(status, &EnvParam->StdHeader);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitmid(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_MID;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
OemCustomizeInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
|
|
||||||
status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
AmdReleaseStruct(&AmdParamStruct);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
Loading…
Reference in New Issue