AGESA: Add common eventlog

Change-Id: Ibbf10a53ea671990d336340fdc96dfb37b5defd0
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/7161
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
Kyösti Mälkki 2014-10-21 16:18:00 +03:00
parent 4ee82c69a2
commit 13fdf36ef9
8 changed files with 3 additions and 140 deletions

View File

@ -24,8 +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 romstage-y += def_callouts.c eventlog.c
ramstage-y += def_callouts.c ramstage-y += def_callouts.c eventlog.c
romstage-$(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15) += eventlog.c
ramstage-$(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15) += eventlog.c

View File

@ -48,11 +48,7 @@ AGESA_STATUS agesawrapper_amdinitlate(void);
AGESA_STATUS agesawrapper_amdinitpost(void); AGESA_STATUS agesawrapper_amdinitpost(void);
AGESA_STATUS agesawrapper_amdinitmid(void); AGESA_STATUS agesawrapper_amdinitmid(void);
#if CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY12 || CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY14
AGESA_STATUS agesawrapper_amdreadeventlog(void);
#else
AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus); AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus);
#endif
AGESA_STATUS agesawrapper_amdinitcpuio(void); AGESA_STATUS agesawrapper_amdinitcpuio(void);
AGESA_STATUS agesawrapper_amdinitmmio(void); AGESA_STATUS agesawrapper_amdinitmmio(void);

View File

@ -62,7 +62,7 @@ static inline u32 do_agesawrapper(AGESA_STATUS (*func)(void), const char *name)
#if CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY12 || CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY14 #if CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY12 || CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY14
/* TODO: These families do not pass valid HeapStatus. */ /* TODO: These families do not pass valid HeapStatus. */
#define AGESA_EVENTLOG(status) \ #define AGESA_EVENTLOG(status) \
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog() if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(0)
#else #else
#define AGESA_EVENTLOG(status, heapstatus) \ #define AGESA_EVENTLOG(status, heapstatus) \
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(heapstatus) if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(heapstatus)

View File

@ -425,29 +425,3 @@ AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * Conf
return status; return status;
} }
AGESA_STATUS agesawrapper_amdreadeventlog(VOID)
{
AGESA_STATUS Status;
EVENT_PARAMS AmdEventParams;
LibAmdMemFill(&AmdEventParams, 0, sizeof(EVENT_PARAMS), &(AmdEventParams.StdHeader));
AmdEventParams.StdHeader.AltImageBasePtr = 0;
AmdEventParams.StdHeader.CalloutPtr = NULL;
AmdEventParams.StdHeader.Func = 0;
AmdEventParams.StdHeader.ImageBasePtr = 0;
Status = AmdReadEventLog(&AmdEventParams);
while (AmdEventParams.EventClass != 0) {
printk(BIOS_DEBUG,
"\nEventLog: EventClass = %lx, EventInfo = %lx.\n",
AmdEventParams.EventClass, AmdEventParams.EventInfo);
printk(BIOS_DEBUG, " Param1 = %lx, Param2 = %lx.\n",
AmdEventParams.DataParam1, AmdEventParams.DataParam2);
printk(BIOS_DEBUG, " Param3 = %lx, Param4 = %lx.\n",
AmdEventParams.DataParam3, AmdEventParams.DataParam4);
Status = AmdReadEventLog(&AmdEventParams);
}
return Status;
}

View File

@ -538,29 +538,3 @@ AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * Conf
return status; return status;
} }
AGESA_STATUS agesawrapper_amdreadeventlog(VOID)
{
AGESA_STATUS Status;
EVENT_PARAMS AmdEventParams;
memset(&AmdEventParams, 0, sizeof(EVENT_PARAMS));
AmdEventParams.StdHeader.AltImageBasePtr = 0;
AmdEventParams.StdHeader.CalloutPtr = NULL;
AmdEventParams.StdHeader.Func = 0;
AmdEventParams.StdHeader.ImageBasePtr = 0;
Status = AmdReadEventLog(&AmdEventParams);
while (AmdEventParams.EventClass != 0) {
printk(BIOS_DEBUG,
"\nEventLog: EventClass = %lx, EventInfo = %lx.\n",
AmdEventParams.EventClass, AmdEventParams.EventInfo);
printk(BIOS_DEBUG, " Param1 = %lx, Param2 = %lx.\n",
AmdEventParams.DataParam1, AmdEventParams.DataParam2);
printk(BIOS_DEBUG, " Param3 = %lx, Param4 = %lx.\n",
AmdEventParams.DataParam3, AmdEventParams.DataParam4);
Status = AmdReadEventLog(&AmdEventParams);
}
return Status;
}

View File

@ -469,29 +469,3 @@ AGESA_STATUS agesawrapper_amdS3Save(void)
} }
#endif /* #ifndef __PRE_RAM__ */ #endif /* #ifndef __PRE_RAM__ */
AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus)
{
AGESA_STATUS Status;
EVENT_PARAMS AmdEventParams;
LibAmdMemFill(&AmdEventParams, 0, sizeof(EVENT_PARAMS), &(AmdEventParams.StdHeader));
AmdEventParams.StdHeader.AltImageBasePtr = 0;
AmdEventParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
AmdEventParams.StdHeader.Func = 0;
AmdEventParams.StdHeader.ImageBasePtr = 0;
AmdEventParams.StdHeader.HeapStatus = HeapStatus;
Status = AmdReadEventLog(&AmdEventParams);
while (AmdEventParams.EventClass != 0) {
printk(BIOS_DEBUG, "\nEventLog: EventClass = %x, EventInfo = %x.\n",
(unsigned int)AmdEventParams.EventClass, (unsigned int)AmdEventParams.EventInfo);
printk(BIOS_DEBUG, " Param1 = %x, Param2 = %x.\n",
(unsigned int)AmdEventParams.DataParam1, (unsigned int)AmdEventParams.DataParam2);
printk(BIOS_DEBUG, " Param3 = %x, Param4 = %x.\n",
(unsigned int)AmdEventParams.DataParam3, (unsigned int)AmdEventParams.DataParam4);
Status = AmdReadEventLog(&AmdEventParams);
}
return Status;
}

View File

@ -469,29 +469,3 @@ AGESA_STATUS agesawrapper_amdS3Save(void)
} }
#endif /* #ifndef __PRE_RAM__ */ #endif /* #ifndef __PRE_RAM__ */
AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus)
{
AGESA_STATUS Status;
EVENT_PARAMS AmdEventParams;
LibAmdMemFill(&AmdEventParams, 0, sizeof(EVENT_PARAMS), &(AmdEventParams.StdHeader));
AmdEventParams.StdHeader.AltImageBasePtr = 0;
AmdEventParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
AmdEventParams.StdHeader.Func = 0;
AmdEventParams.StdHeader.ImageBasePtr = 0;
AmdEventParams.StdHeader.HeapStatus = HeapStatus;
Status = AmdReadEventLog(&AmdEventParams);
while (AmdEventParams.EventClass != 0) {
printk(BIOS_DEBUG, "\nEventLog: EventClass = %x, EventInfo = %x.\n",
(unsigned int)AmdEventParams.EventClass, (unsigned int)AmdEventParams.EventInfo);
printk(BIOS_DEBUG, " Param1 = %x, Param2 = %x.\n",
(unsigned int)AmdEventParams.DataParam1, (unsigned int)AmdEventParams.DataParam2);
printk(BIOS_DEBUG, " Param3 = %x, Param4 = %x.\n",
(unsigned int)AmdEventParams.DataParam3, (unsigned int)AmdEventParams.DataParam4);
Status = AmdReadEventLog(&AmdEventParams);
}
return Status;
}

View File

@ -469,29 +469,3 @@ AGESA_STATUS agesawrapper_amdS3Save(void)
} }
#endif /* #ifndef __PRE_RAM__ */ #endif /* #ifndef __PRE_RAM__ */
AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus)
{
AGESA_STATUS Status;
EVENT_PARAMS AmdEventParams;
LibAmdMemFill(&AmdEventParams, 0, sizeof(EVENT_PARAMS), &(AmdEventParams.StdHeader));
AmdEventParams.StdHeader.AltImageBasePtr = 0;
AmdEventParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) & GetBiosCallout;
AmdEventParams.StdHeader.Func = 0;
AmdEventParams.StdHeader.ImageBasePtr = 0;
AmdEventParams.StdHeader.HeapStatus = HeapStatus;
Status = AmdReadEventLog(&AmdEventParams);
while (AmdEventParams.EventClass != 0) {
printk(BIOS_DEBUG, "\nEventLog: EventClass = %x, EventInfo = %x.\n",
(unsigned int)AmdEventParams.EventClass, (unsigned int)AmdEventParams.EventInfo);
printk(BIOS_DEBUG, " Param1 = %x, Param2 = %x.\n",
(unsigned int)AmdEventParams.DataParam1, (unsigned int)AmdEventParams.DataParam2);
printk(BIOS_DEBUG, " Param3 = %x, Param4 = %x.\n",
(unsigned int)AmdEventParams.DataParam3, (unsigned int)AmdEventParams.DataParam4);
Status = AmdReadEventLog(&AmdEventParams);
}
return Status;
}