AGESA: Common agesawrapper_amdinitlate()
Change-Id: I3d532989559ffd7fd0f63e15c2c60bcfe5ec9101 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7820 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
parent
83f0139478
commit
94dd14f035
|
@ -24,5 +24,5 @@ subdirs-$(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_TN) += family15tn
|
||||||
subdirs-$(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_RL) += family15rl
|
subdirs-$(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_RL) += family15rl
|
||||||
subdirs-$(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY16_KB) += family16kb
|
subdirs-$(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY16_KB) += family16kb
|
||||||
|
|
||||||
romstage-y += def_callouts.c eventlog.c
|
romstage-y += def_callouts.c agesawrapper.c eventlog.c
|
||||||
ramstage-y += def_callouts.c eventlog.c
|
ramstage-y += def_callouts.c agesawrapper.c eventlog.c
|
||||||
|
|
|
@ -0,0 +1,94 @@
|
||||||
|
/*
|
||||||
|
* 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 <northbridge/amd/agesa/agesawrapper.h>
|
||||||
|
#include <northbridge/amd/agesa/BiosCallOuts.h>
|
||||||
|
#include "amdlib.h"
|
||||||
|
|
||||||
|
#include "heapManager.h"
|
||||||
|
|
||||||
|
#if !defined(__PRE_RAM__)
|
||||||
|
|
||||||
|
static AMD_LATE_PARAMS *AmdLateParams = NULL;
|
||||||
|
|
||||||
|
AGESA_STATUS agesawrapper_amdinitlate(void)
|
||||||
|
{
|
||||||
|
AGESA_STATUS status;
|
||||||
|
AMD_INTERFACE_PARAMS AmdParamStruct;
|
||||||
|
|
||||||
|
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
||||||
|
|
||||||
|
AmdParamStruct.AgesaFunctionName = AMD_INIT_LATE;
|
||||||
|
AmdParamStruct.AllocationMethod = PostMemDram;
|
||||||
|
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
||||||
|
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
||||||
|
AmdParamStruct.StdHeader.Func = 0;
|
||||||
|
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_CPU_AMD_AGESA_FAMILY15TN) || IS_ENABLED(CONFIG_CPU_AMD_AGESA_FAMILY15RL) || \
|
||||||
|
IS_ENABLED(CONFIG_CPU_AMD_AGESA_FAMILY16KB)
|
||||||
|
AmdParamStruct.StdHeader.HeapStatus = HEAP_SYSTEM_MEM;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
AmdCreateStruct(&AmdParamStruct);
|
||||||
|
AmdLateParams = (AMD_LATE_PARAMS *) AmdParamStruct.NewStructPtr;
|
||||||
|
status = AmdInitLate(AmdLateParams);
|
||||||
|
AGESA_EVENTLOG(status, &AmdLateParams->StdHeader);
|
||||||
|
ASSERT(status == AGESA_SUCCESS);
|
||||||
|
|
||||||
|
/* We will reference AmdLateParams when coreboot copies the ACPI tables,
|
||||||
|
* so must not call AmdReleaseStruct(&AmdParamStruct) here.
|
||||||
|
*/
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *agesawrapper_getlateinitptr(int pick)
|
||||||
|
{
|
||||||
|
ASSERT(AmdLateParams != NULL);
|
||||||
|
|
||||||
|
switch (pick) {
|
||||||
|
case PICK_DMI:
|
||||||
|
return AmdLateParams->DmiTable;
|
||||||
|
case PICK_PSTATE:
|
||||||
|
return AmdLateParams->AcpiPState;
|
||||||
|
case PICK_SRAT:
|
||||||
|
return AmdLateParams->AcpiSrat;
|
||||||
|
case PICK_SLIT:
|
||||||
|
return AmdLateParams->AcpiSlit;
|
||||||
|
case PICK_WHEA_MCE:
|
||||||
|
return AmdLateParams->AcpiWheaMce;
|
||||||
|
case PICK_WHEA_CMC:
|
||||||
|
return AmdLateParams->AcpiWheaCmc;
|
||||||
|
case PICK_ALIB:
|
||||||
|
return AmdLateParams->AcpiAlib;
|
||||||
|
case PICK_IVRS:
|
||||||
|
#if IS_ENABLED(CONFIG_CPU_AMD_AGESA_FAMILY14)
|
||||||
|
return NULL;
|
||||||
|
#else
|
||||||
|
return AmdLateParams->AcpiIvrs;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* __PRE_RAM__ */
|
|
@ -35,16 +35,6 @@
|
||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
#define FILECODE UNASSIGNED_FILE_FILECODE
|
||||||
|
|
||||||
/* ACPI table pointers returned by AmdInitLate */
|
|
||||||
VOID *DmiTable = NULL;
|
|
||||||
VOID *AcpiPstate = NULL;
|
|
||||||
VOID *AcpiSrat = NULL;
|
|
||||||
VOID *AcpiSlit = NULL;
|
|
||||||
|
|
||||||
VOID *AcpiWheaMce = NULL;
|
|
||||||
VOID *AcpiWheaCmc = NULL;
|
|
||||||
VOID *AcpiAlib = NULL;
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitreset(void)
|
AGESA_STATUS agesawrapper_amdinitreset(void)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
@ -143,31 +133,6 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID *agesawrapper_getlateinitptr(int pick)
|
|
||||||
{
|
|
||||||
switch (pick) {
|
|
||||||
case PICK_DMI:
|
|
||||||
return DmiTable;
|
|
||||||
|
|
||||||
case PICK_PSTATE:
|
|
||||||
return AcpiPstate;
|
|
||||||
|
|
||||||
case PICK_SRAT:
|
|
||||||
return AcpiSrat;
|
|
||||||
|
|
||||||
case PICK_SLIT:
|
|
||||||
return AcpiSlit;
|
|
||||||
case PICK_WHEA_MCE:
|
|
||||||
return AcpiWheaMce;
|
|
||||||
case PICK_WHEA_CMC:
|
|
||||||
return AcpiWheaCmc;
|
|
||||||
case PICK_ALIB:
|
|
||||||
return AcpiAlib;
|
|
||||||
default:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitmid(void)
|
AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
@ -191,34 +156,6 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitlate(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_LATE_PARAMS AmdLateParams;
|
|
||||||
|
|
||||||
memset(&AmdLateParams, 0, sizeof(AMD_LATE_PARAMS));
|
|
||||||
|
|
||||||
AmdLateParams.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdLateParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdLateParams.StdHeader.Func = 0;
|
|
||||||
AmdLateParams.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
status = AmdInitLate(&AmdLateParams);
|
|
||||||
AGESA_EVENTLOG(status, &AmdLateParams.StdHeader);
|
|
||||||
ASSERT(status == AGESA_SUCCESS);
|
|
||||||
|
|
||||||
DmiTable = AmdLateParams.DmiTable;
|
|
||||||
AcpiPstate = AmdLateParams.AcpiPState;
|
|
||||||
AcpiSrat = AmdLateParams.AcpiSrat;
|
|
||||||
AcpiSlit = AmdLateParams.AcpiSlit;
|
|
||||||
|
|
||||||
AcpiWheaMce = AmdLateParams.AcpiWheaMce;
|
|
||||||
AcpiWheaCmc = AmdLateParams.AcpiWheaCmc;
|
|
||||||
AcpiAlib = AmdLateParams.AcpiAlib;
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
|
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
|
|
@ -34,16 +34,6 @@
|
||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
#define FILECODE UNASSIGNED_FILE_FILECODE
|
||||||
|
|
||||||
/* ACPI table pointers returned by AmdInitLate */
|
|
||||||
VOID *DmiTable = NULL;
|
|
||||||
VOID *AcpiPstate = NULL;
|
|
||||||
VOID *AcpiSrat = NULL;
|
|
||||||
VOID *AcpiSlit = NULL;
|
|
||||||
|
|
||||||
VOID *AcpiWheaMce = NULL;
|
|
||||||
VOID *AcpiWheaCmc = NULL;
|
|
||||||
VOID *AcpiAlib = NULL;
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitreset(void)
|
AGESA_STATUS agesawrapper_amdinitreset(void)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
@ -143,28 +133,6 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID *agesawrapper_getlateinitptr(int pick)
|
|
||||||
{
|
|
||||||
switch (pick) {
|
|
||||||
case PICK_DMI:
|
|
||||||
return DmiTable;
|
|
||||||
case PICK_PSTATE:
|
|
||||||
return AcpiPstate;
|
|
||||||
case PICK_SRAT:
|
|
||||||
return AcpiSrat;
|
|
||||||
case PICK_SLIT:
|
|
||||||
return AcpiSlit;
|
|
||||||
case PICK_WHEA_MCE:
|
|
||||||
return AcpiWheaMce;
|
|
||||||
case PICK_WHEA_CMC:
|
|
||||||
return AcpiWheaCmc;
|
|
||||||
case PICK_ALIB:
|
|
||||||
return AcpiAlib;
|
|
||||||
default:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitmid(void)
|
AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
@ -188,52 +156,6 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitlate(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_LATE_PARAMS *AmdLateParamsPtr;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_LATE;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
AmdLateParamsPtr = (AMD_LATE_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "agesawrapper_amdinitlate: AmdLateParamsPtr = %X\n",
|
|
||||||
(u32) AmdLateParamsPtr);
|
|
||||||
|
|
||||||
status = AmdInitLate(AmdLateParamsPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
|
|
||||||
ASSERT(status == AGESA_SUCCESS);
|
|
||||||
|
|
||||||
DmiTable = AmdLateParamsPtr->DmiTable;
|
|
||||||
AcpiPstate = AmdLateParamsPtr->AcpiPState;
|
|
||||||
AcpiSrat = AmdLateParamsPtr->AcpiSrat;
|
|
||||||
AcpiSlit = AmdLateParamsPtr->AcpiSlit;
|
|
||||||
AcpiWheaMce = AmdLateParamsPtr->AcpiWheaMce;
|
|
||||||
AcpiWheaCmc = AmdLateParamsPtr->AcpiWheaCmc;
|
|
||||||
AcpiAlib = AmdLateParamsPtr->AcpiAlib;
|
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "In %s, AGESA generated ACPI tables:\n"
|
|
||||||
" DmiTable:%p\n AcpiPstate: %p\n AcpiSrat:%p\n AcpiSlit:%p\n"
|
|
||||||
" Mce:%p\n Cmc:%p\n Alib:%p\n",
|
|
||||||
__func__, DmiTable, AcpiPstate, AcpiSrat, AcpiSlit, AcpiWheaMce, AcpiWheaCmc,
|
|
||||||
AcpiAlib);
|
|
||||||
|
|
||||||
/* Don't release the structure until coreboot has copied the ACPI tables.
|
|
||||||
* AmdReleaseStruct (&AmdLateParams);
|
|
||||||
*/
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
|
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
|
|
@ -36,16 +36,6 @@
|
||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
#define FILECODE UNASSIGNED_FILE_FILECODE
|
||||||
|
|
||||||
/* ACPI table pointers returned by AmdInitLate */
|
|
||||||
VOID *DmiTable = NULL;
|
|
||||||
VOID *AcpiPstate = NULL;
|
|
||||||
VOID *AcpiSrat = NULL;
|
|
||||||
VOID *AcpiSlit = NULL;
|
|
||||||
|
|
||||||
VOID *AcpiWheaMce = NULL;
|
|
||||||
VOID *AcpiWheaCmc = NULL;
|
|
||||||
VOID *AcpiAlib = NULL;
|
|
||||||
|
|
||||||
/* TODO: Function body should be in mainboard directory. */
|
/* TODO: Function body should be in mainboard directory. */
|
||||||
void OemCustomizeInitEarly(AMD_EARLY_PARAMS *InitEarly)
|
void OemCustomizeInitEarly(AMD_EARLY_PARAMS *InitEarly)
|
||||||
{
|
{
|
||||||
|
@ -191,33 +181,6 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID *agesawrapper_getlateinitptr(int pick)
|
|
||||||
{
|
|
||||||
switch (pick) {
|
|
||||||
case PICK_DMI:
|
|
||||||
return DmiTable;
|
|
||||||
|
|
||||||
case PICK_PSTATE:
|
|
||||||
return AcpiPstate;
|
|
||||||
|
|
||||||
case PICK_SRAT:
|
|
||||||
return AcpiSrat;
|
|
||||||
|
|
||||||
case PICK_SLIT:
|
|
||||||
return AcpiSlit;
|
|
||||||
case PICK_WHEA_MCE:
|
|
||||||
return AcpiWheaMce;
|
|
||||||
case PICK_WHEA_CMC:
|
|
||||||
return AcpiWheaCmc;
|
|
||||||
case PICK_ALIB:
|
|
||||||
return AcpiAlib;
|
|
||||||
default:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitmid(void)
|
AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
@ -241,49 +204,6 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitlate(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_LATE_PARAMS *AmdLateParamsPtr;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_LATE;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
AmdLateParamsPtr = (AMD_LATE_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "agesawrapper_amdinitlate: AmdLateParamsPtr = %X\n", (u32) AmdLateParamsPtr);
|
|
||||||
|
|
||||||
status = AmdInitLate(AmdLateParamsPtr);
|
|
||||||
AGESA_EVENTLOG(status, &AmdLateParamsPtr->StdHeader);
|
|
||||||
ASSERT(status == AGESA_SUCCESS);
|
|
||||||
|
|
||||||
DmiTable = AmdLateParamsPtr->DmiTable;
|
|
||||||
AcpiPstate = AmdLateParamsPtr->AcpiPState;
|
|
||||||
AcpiSrat = AmdLateParamsPtr->AcpiSrat;
|
|
||||||
AcpiSlit = AmdLateParamsPtr->AcpiSlit;
|
|
||||||
AcpiWheaMce = AmdLateParamsPtr->AcpiWheaMce;
|
|
||||||
AcpiWheaCmc = AmdLateParamsPtr->AcpiWheaCmc;
|
|
||||||
AcpiAlib = AmdLateParamsPtr->AcpiAlib;
|
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "In %s, AGESA generated ACPI tables:\n"
|
|
||||||
" DmiTable:%p\n AcpiPstate: %p\n AcpiSrat:%p\n AcpiSlit:%p\n"
|
|
||||||
" Mce:%p\n Cmc:%p\n Alib:%p\n",
|
|
||||||
__func__, DmiTable, AcpiPstate, AcpiSrat, AcpiSlit, AcpiWheaMce, AcpiWheaCmc, AcpiAlib);
|
|
||||||
|
|
||||||
/* Don't release the structure until coreboot has copied the ACPI tables.
|
|
||||||
* AmdReleaseStruct (&AmdLateParams);
|
|
||||||
*/
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param[in] UINTN ApicIdOfCore,
|
* @param[in] UINTN ApicIdOfCore,
|
||||||
* @param[in] AP_EXE_PARAMS *LaunchApParams
|
* @param[in] AP_EXE_PARAMS *LaunchApParams
|
||||||
|
|
|
@ -41,17 +41,6 @@
|
||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
#define FILECODE UNASSIGNED_FILE_FILECODE
|
||||||
|
|
||||||
/* ACPI table pointers returned by AmdInitLate */
|
|
||||||
VOID *DmiTable = NULL;
|
|
||||||
VOID *AcpiPstate = NULL;
|
|
||||||
VOID *AcpiSrat = NULL;
|
|
||||||
VOID *AcpiSlit = NULL;
|
|
||||||
|
|
||||||
VOID *AcpiWheaMce = NULL;
|
|
||||||
VOID *AcpiWheaCmc = NULL;
|
|
||||||
VOID *AcpiAlib = NULL;
|
|
||||||
VOID *AcpiIvrs = NULL;
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitreset(void)
|
AGESA_STATUS agesawrapper_amdinitreset(void)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
@ -153,30 +142,6 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID *agesawrapper_getlateinitptr(int pick)
|
|
||||||
{
|
|
||||||
switch (pick) {
|
|
||||||
case PICK_DMI:
|
|
||||||
return DmiTable;
|
|
||||||
case PICK_PSTATE:
|
|
||||||
return AcpiPstate;
|
|
||||||
case PICK_SRAT:
|
|
||||||
return AcpiSrat;
|
|
||||||
case PICK_SLIT:
|
|
||||||
return AcpiSlit;
|
|
||||||
case PICK_WHEA_MCE:
|
|
||||||
return AcpiWheaMce;
|
|
||||||
case PICK_WHEA_CMC:
|
|
||||||
return AcpiWheaCmc;
|
|
||||||
case PICK_ALIB:
|
|
||||||
return AcpiAlib;
|
|
||||||
case PICK_IVRS:
|
|
||||||
return AcpiIvrs;
|
|
||||||
default:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitmid(void)
|
AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
@ -201,50 +166,6 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitlate(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_LATE_PARAMS *AmdLateParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_LATE;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.HeapStatus = HEAP_SYSTEM_MEM;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
/* NOTE: if not call amdcreatestruct, the initializer(AmdInitLateInitializer) would not be called */
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
AmdLateParams = (AMD_LATE_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
status = AmdInitLate(AmdLateParams);
|
|
||||||
AGESA_EVENTLOG(status, &AmdLateParams->StdHeader);
|
|
||||||
ASSERT(status == AGESA_SUCCESS);
|
|
||||||
|
|
||||||
DmiTable = AmdLateParams->DmiTable;
|
|
||||||
AcpiPstate = AmdLateParams->AcpiPState;
|
|
||||||
AcpiSrat = AmdLateParams->AcpiSrat;
|
|
||||||
AcpiSlit = AmdLateParams->AcpiSlit;
|
|
||||||
|
|
||||||
AcpiWheaMce = AmdLateParams->AcpiWheaMce;
|
|
||||||
AcpiWheaCmc = AmdLateParams->AcpiWheaCmc;
|
|
||||||
AcpiAlib = AmdLateParams->AcpiAlib;
|
|
||||||
AcpiIvrs = AmdLateParams->AcpiIvrs;
|
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "DmiTable:%x, AcpiPstatein: %x, AcpiSrat:%x,"
|
|
||||||
"AcpiSlit:%x, Mce:%x, Cmc:%x,"
|
|
||||||
"Alib:%x, AcpiIvrs:%x in %s\n",
|
|
||||||
(unsigned int)DmiTable, (unsigned int)AcpiPstate, (unsigned int)AcpiSrat,
|
|
||||||
(unsigned int)AcpiSlit, (unsigned int)AcpiWheaMce, (unsigned int)AcpiWheaCmc,
|
|
||||||
(unsigned int)AcpiAlib, (unsigned int)AcpiIvrs, __func__);
|
|
||||||
|
|
||||||
/* AmdReleaseStruct (&AmdParamStruct); */
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
|
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
|
|
@ -41,17 +41,6 @@
|
||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
#define FILECODE UNASSIGNED_FILE_FILECODE
|
||||||
|
|
||||||
/* ACPI table pointers returned by AmdInitLate */
|
|
||||||
VOID *DmiTable = NULL;
|
|
||||||
VOID *AcpiPstate = NULL;
|
|
||||||
VOID *AcpiSrat = NULL;
|
|
||||||
VOID *AcpiSlit = NULL;
|
|
||||||
|
|
||||||
VOID *AcpiWheaMce = NULL;
|
|
||||||
VOID *AcpiWheaCmc = NULL;
|
|
||||||
VOID *AcpiAlib = NULL;
|
|
||||||
VOID *AcpiIvrs = NULL;
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitreset(void)
|
AGESA_STATUS agesawrapper_amdinitreset(void)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
@ -153,30 +142,6 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID *agesawrapper_getlateinitptr(int pick)
|
|
||||||
{
|
|
||||||
switch (pick) {
|
|
||||||
case PICK_DMI:
|
|
||||||
return DmiTable;
|
|
||||||
case PICK_PSTATE:
|
|
||||||
return AcpiPstate;
|
|
||||||
case PICK_SRAT:
|
|
||||||
return AcpiSrat;
|
|
||||||
case PICK_SLIT:
|
|
||||||
return AcpiSlit;
|
|
||||||
case PICK_WHEA_MCE:
|
|
||||||
return AcpiWheaMce;
|
|
||||||
case PICK_WHEA_CMC:
|
|
||||||
return AcpiWheaCmc;
|
|
||||||
case PICK_ALIB:
|
|
||||||
return AcpiAlib;
|
|
||||||
case PICK_IVRS:
|
|
||||||
return AcpiIvrs;
|
|
||||||
default:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitmid(void)
|
AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
@ -201,50 +166,6 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitlate(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_LATE_PARAMS *AmdLateParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_LATE;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.HeapStatus = HEAP_SYSTEM_MEM;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
/* NOTE: if not call amdcreatestruct, the initializer(AmdInitLateInitializer) would not be called */
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
AmdLateParams = (AMD_LATE_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
status = AmdInitLate(AmdLateParams);
|
|
||||||
AGESA_EVENTLOG(status, &AmdLateParams->StdHeader);
|
|
||||||
ASSERT(status == AGESA_SUCCESS);
|
|
||||||
|
|
||||||
DmiTable = AmdLateParams->DmiTable;
|
|
||||||
AcpiPstate = AmdLateParams->AcpiPState;
|
|
||||||
AcpiSrat = AmdLateParams->AcpiSrat;
|
|
||||||
AcpiSlit = AmdLateParams->AcpiSlit;
|
|
||||||
|
|
||||||
AcpiWheaMce = AmdLateParams->AcpiWheaMce;
|
|
||||||
AcpiWheaCmc = AmdLateParams->AcpiWheaCmc;
|
|
||||||
AcpiAlib = AmdLateParams->AcpiAlib;
|
|
||||||
AcpiIvrs = AmdLateParams->AcpiIvrs;
|
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "DmiTable:%x, AcpiPstatein: %x, AcpiSrat:%x,"
|
|
||||||
"AcpiSlit:%x, Mce:%x, Cmc:%x,"
|
|
||||||
"Alib:%x, AcpiIvrs:%x in %s\n",
|
|
||||||
(unsigned int)DmiTable, (unsigned int)AcpiPstate, (unsigned int)AcpiSrat,
|
|
||||||
(unsigned int)AcpiSlit, (unsigned int)AcpiWheaMce, (unsigned int)AcpiWheaCmc,
|
|
||||||
(unsigned int)AcpiAlib, (unsigned int)AcpiIvrs, __func__);
|
|
||||||
|
|
||||||
/* AmdReleaseStruct (&AmdParamStruct); */
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
|
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
|
|
@ -41,17 +41,6 @@
|
||||||
|
|
||||||
#define FILECODE UNASSIGNED_FILE_FILECODE
|
#define FILECODE UNASSIGNED_FILE_FILECODE
|
||||||
|
|
||||||
/* ACPI table pointers returned by AmdInitLate */
|
|
||||||
VOID *DmiTable = NULL;
|
|
||||||
VOID *AcpiPstate = NULL;
|
|
||||||
VOID *AcpiSrat = NULL;
|
|
||||||
VOID *AcpiSlit = NULL;
|
|
||||||
|
|
||||||
VOID *AcpiWheaMce = NULL;
|
|
||||||
VOID *AcpiWheaCmc = NULL;
|
|
||||||
VOID *AcpiAlib = NULL;
|
|
||||||
VOID *AcpiIvrs = NULL;
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitreset(void)
|
AGESA_STATUS agesawrapper_amdinitreset(void)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
@ -153,30 +142,6 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID *agesawrapper_getlateinitptr(int pick)
|
|
||||||
{
|
|
||||||
switch (pick) {
|
|
||||||
case PICK_DMI:
|
|
||||||
return DmiTable;
|
|
||||||
case PICK_PSTATE:
|
|
||||||
return AcpiPstate;
|
|
||||||
case PICK_SRAT:
|
|
||||||
return AcpiSrat;
|
|
||||||
case PICK_SLIT:
|
|
||||||
return AcpiSlit;
|
|
||||||
case PICK_WHEA_MCE:
|
|
||||||
return AcpiWheaMce;
|
|
||||||
case PICK_WHEA_CMC:
|
|
||||||
return AcpiWheaCmc;
|
|
||||||
case PICK_ALIB:
|
|
||||||
return AcpiAlib;
|
|
||||||
case PICK_IVRS:
|
|
||||||
return AcpiIvrs;
|
|
||||||
default:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitmid(void)
|
AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
@ -201,50 +166,6 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdinitlate(void)
|
|
||||||
{
|
|
||||||
AGESA_STATUS status;
|
|
||||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
|
||||||
AMD_LATE_PARAMS *AmdLateParams;
|
|
||||||
|
|
||||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
|
||||||
|
|
||||||
AmdParamStruct.AgesaFunctionName = AMD_INIT_LATE;
|
|
||||||
AmdParamStruct.AllocationMethod = PostMemDram;
|
|
||||||
AmdParamStruct.StdHeader.AltImageBasePtr = 0;
|
|
||||||
AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
|
|
||||||
AmdParamStruct.StdHeader.HeapStatus = HEAP_SYSTEM_MEM;
|
|
||||||
AmdParamStruct.StdHeader.Func = 0;
|
|
||||||
AmdParamStruct.StdHeader.ImageBasePtr = 0;
|
|
||||||
|
|
||||||
/* NOTE: if not call amdcreatestruct, the initializer(AmdInitLateInitializer) would not be called */
|
|
||||||
AmdCreateStruct(&AmdParamStruct);
|
|
||||||
AmdLateParams = (AMD_LATE_PARAMS *) AmdParamStruct.NewStructPtr;
|
|
||||||
status = AmdInitLate(AmdLateParams);
|
|
||||||
AGESA_EVENTLOG(status, &AmdLateParams->StdHeader);
|
|
||||||
ASSERT(status == AGESA_SUCCESS);
|
|
||||||
|
|
||||||
DmiTable = AmdLateParams->DmiTable;
|
|
||||||
AcpiPstate = AmdLateParams->AcpiPState;
|
|
||||||
AcpiSrat = AmdLateParams->AcpiSrat;
|
|
||||||
AcpiSlit = AmdLateParams->AcpiSlit;
|
|
||||||
|
|
||||||
AcpiWheaMce = AmdLateParams->AcpiWheaMce;
|
|
||||||
AcpiWheaCmc = AmdLateParams->AcpiWheaCmc;
|
|
||||||
AcpiAlib = AmdLateParams->AcpiAlib;
|
|
||||||
AcpiIvrs = AmdLateParams->AcpiIvrs;
|
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "DmiTable:%x, AcpiPstatein: %x, AcpiSrat:%x,"
|
|
||||||
"AcpiSlit:%x, Mce:%x, Cmc:%x,"
|
|
||||||
"Alib:%x, AcpiIvrs:%x in %s\n",
|
|
||||||
(unsigned int)DmiTable, (unsigned int)AcpiPstate, (unsigned int)AcpiSrat,
|
|
||||||
(unsigned int)AcpiSlit, (unsigned int)AcpiWheaMce, (unsigned int)AcpiWheaCmc,
|
|
||||||
(unsigned int)AcpiAlib, (unsigned int)AcpiIvrs, __func__);
|
|
||||||
|
|
||||||
/* AmdReleaseStruct (&AmdParamStruct); */
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
|
AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr)
|
||||||
{
|
{
|
||||||
AGESA_STATUS status;
|
AGESA_STATUS status;
|
||||||
|
|
Loading…
Reference in New Issue