summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-10-21 16:18:00 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-12-03 08:10:14 +0100
commit13fdf36ef9f7d03135c2f0984967f56a6cda13ce (patch)
tree1411e5a360dc3f6e857ef596e333129534e2a206 /src
parent4ee82c69a2ecfe1afc9a357fc7ddbaa06c10d2b5 (diff)
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)
Diffstat (limited to 'src')
-rw-r--r--src/northbridge/amd/agesa/Makefile.inc7
-rw-r--r--src/northbridge/amd/agesa/agesawrapper.h4
-rw-r--r--src/northbridge/amd/agesa/agesawrapper_call.h2
-rw-r--r--src/northbridge/amd/agesa/family12/agesawrapper.c26
-rw-r--r--src/northbridge/amd/agesa/family14/agesawrapper.c26
-rw-r--r--src/northbridge/amd/agesa/family15rl/agesawrapper.c26
-rw-r--r--src/northbridge/amd/agesa/family15tn/agesawrapper.c26
-rw-r--r--src/northbridge/amd/agesa/family16kb/agesawrapper.c26
8 files changed, 3 insertions, 140 deletions
diff --git a/src/northbridge/amd/agesa/Makefile.inc b/src/northbridge/amd/agesa/Makefile.inc
index 6eb4941066..1eed658772 100644
--- a/src/northbridge/amd/agesa/Makefile.inc
+++ b/src/northbridge/amd/agesa/Makefile.inc
@@ -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_FAMILY16_KB) += family16kb
-romstage-y += def_callouts.c
-ramstage-y += def_callouts.c
-
-romstage-$(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15) += eventlog.c
-ramstage-$(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15) += eventlog.c
+romstage-y += def_callouts.c eventlog.c
+ramstage-y += def_callouts.c eventlog.c
diff --git a/src/northbridge/amd/agesa/agesawrapper.h b/src/northbridge/amd/agesa/agesawrapper.h
index 49f6666074..e1eb69bf24 100644
--- a/src/northbridge/amd/agesa/agesawrapper.h
+++ b/src/northbridge/amd/agesa/agesawrapper.h
@@ -48,11 +48,7 @@ AGESA_STATUS agesawrapper_amdinitlate(void);
AGESA_STATUS agesawrapper_amdinitpost(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);
-#endif
AGESA_STATUS agesawrapper_amdinitcpuio(void);
AGESA_STATUS agesawrapper_amdinitmmio(void);
diff --git a/src/northbridge/amd/agesa/agesawrapper_call.h b/src/northbridge/amd/agesa/agesawrapper_call.h
index 71997a8278..3720dd314b 100644
--- a/src/northbridge/amd/agesa/agesawrapper_call.h
+++ b/src/northbridge/amd/agesa/agesawrapper_call.h
@@ -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
/* TODO: These families do not pass valid HeapStatus. */
#define AGESA_EVENTLOG(status) \
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog()
+ if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(0)
#else
#define AGESA_EVENTLOG(status, heapstatus) \
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(heapstatus)
diff --git a/src/northbridge/amd/agesa/family12/agesawrapper.c b/src/northbridge/amd/agesa/family12/agesawrapper.c
index 7309262ddd..39b4f757a8 100644
--- a/src/northbridge/amd/agesa/family12/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family12/agesawrapper.c
@@ -425,29 +425,3 @@ AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * Conf
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;
-}
diff --git a/src/northbridge/amd/agesa/family14/agesawrapper.c b/src/northbridge/amd/agesa/family14/agesawrapper.c
index 1f580ef5bd..84a01b05cd 100644
--- a/src/northbridge/amd/agesa/family14/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family14/agesawrapper.c
@@ -538,29 +538,3 @@ AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * Conf
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;
-}
diff --git a/src/northbridge/amd/agesa/family15rl/agesawrapper.c b/src/northbridge/amd/agesa/family15rl/agesawrapper.c
index 2099a49ac0..4f2e5357ed 100644
--- a/src/northbridge/amd/agesa/family15rl/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family15rl/agesawrapper.c
@@ -469,29 +469,3 @@ AGESA_STATUS agesawrapper_amdS3Save(void)
}
#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;
-}
diff --git a/src/northbridge/amd/agesa/family15tn/agesawrapper.c b/src/northbridge/amd/agesa/family15tn/agesawrapper.c
index 2099a49ac0..4f2e5357ed 100644
--- a/src/northbridge/amd/agesa/family15tn/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family15tn/agesawrapper.c
@@ -469,29 +469,3 @@ AGESA_STATUS agesawrapper_amdS3Save(void)
}
#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;
-}
diff --git a/src/northbridge/amd/agesa/family16kb/agesawrapper.c b/src/northbridge/amd/agesa/family16kb/agesawrapper.c
index 2099a49ac0..4f2e5357ed 100644
--- a/src/northbridge/amd/agesa/family16kb/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family16kb/agesawrapper.c
@@ -469,29 +469,3 @@ AGESA_STATUS agesawrapper_amdS3Save(void)
}
#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;
-}