summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-10-21 14:19:04 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-12-03 08:11:03 +0100
commit1aa35c6f6c2f3d3820d574579e929cbafd4304a7 (patch)
treee7f6a20ca94317095c8eea789ff8d380f5be5a11 /src/northbridge
parentb139b5efcc7f1caf541156fa8d213e3eaf231603 (diff)
AGESA: Trace execution with AGESA_EVENTLOG()
Change-Id: I5601ed92ca808603b0a9edad118ca54aa168aceb Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7604 Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/amd/agesa/agesawrapper.h5
-rw-r--r--src/northbridge/amd/agesa/agesawrapper_call.h73
-rw-r--r--src/northbridge/amd/agesa/eventlog.c71
-rw-r--r--src/northbridge/amd/agesa/family10/northbridge.c2
-rw-r--r--src/northbridge/amd/agesa/family12/agesawrapper.c14
-rw-r--r--src/northbridge/amd/agesa/family12/northbridge.c3
-rw-r--r--src/northbridge/amd/agesa/family14/agesawrapper.c16
-rw-r--r--src/northbridge/amd/agesa/family14/northbridge.c3
-rw-r--r--src/northbridge/amd/agesa/family15/agesawrapper.c14
-rw-r--r--src/northbridge/amd/agesa/family15/northbridge.c3
-rw-r--r--src/northbridge/amd/agesa/family15rl/agesawrapper.c12
-rw-r--r--src/northbridge/amd/agesa/family15rl/northbridge.c5
-rw-r--r--src/northbridge/amd/agesa/family15tn/agesawrapper.c12
-rw-r--r--src/northbridge/amd/agesa/family15tn/northbridge.c5
-rw-r--r--src/northbridge/amd/agesa/family16kb/agesawrapper.c12
-rw-r--r--src/northbridge/amd/agesa/family16kb/northbridge.c5
16 files changed, 112 insertions, 143 deletions
diff --git a/src/northbridge/amd/agesa/agesawrapper.h b/src/northbridge/amd/agesa/agesawrapper.h
index e1eb69bf24..7b61b4cb49 100644
--- a/src/northbridge/amd/agesa/agesawrapper.h
+++ b/src/northbridge/amd/agesa/agesawrapper.h
@@ -23,7 +23,6 @@
#include <stdint.h>
#include "Porting.h"
#include "AGESA.h"
-#include <northbridge/amd/agesa/agesawrapper_call.h>
/* Define AMD Ontario APPU SSID/SVID */
#define AMD_APU_SVID 0x1022
@@ -48,7 +47,9 @@ AGESA_STATUS agesawrapper_amdinitlate(void);
AGESA_STATUS agesawrapper_amdinitpost(void);
AGESA_STATUS agesawrapper_amdinitmid(void);
-AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus);
+void agesawrapper_trace(AGESA_STATUS ret, AMD_CONFIG_PARAMS *StdHeader, const char *func);
+#define AGESA_EVENTLOG(status, stdheader) \
+ agesawrapper_trace(status, stdheader, __func__)
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
deleted file mode 100644
index 55742d4e8a..0000000000
--- a/src/northbridge/amd/agesa/agesawrapper_call.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * 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
- */
-
-#ifndef _AGESAWRAPPER_CALL_H_
-#define _AGESAWRAPPER_CALL_H_
-
-#include <stdint.h>
-#include <console/console.h>
-#include "AGESA.h"
-
-/*
- * Possible AGESA_STATUS values:
- *
- * 0x0 = AGESA_SUCCESS
- * 0x1 = AGESA_UNSUPPORTED
- * 0x2 = AGESA_BOUNDS_CHK
- * 0x3 = AGESA_ALERT
- * 0x4 = AGESA_WARNING
- * 0x5 = AGESA_ERROR
- * 0x6 = AGESA_CRITICAL
- * 0x7 = AGESA_FATAL
- */
-static const char * decodeAGESA_STATUS(AGESA_STATUS sret)
-{
- const char* statusStrings[] = { "AGESA_SUCCESS", "AGESA_UNSUPPORTED",
- "AGESA_BOUNDS_CHK", "AGESA_ALERT",
- "AGESA_WARNING", "AGESA_ERROR",
- "AGESA_CRITICAL", "AGESA_FATAL"
- };
- if (sret > 7) return "unknown"; /* Non-AGESA error code */
- return statusStrings[sret];
-}
-
-static inline u32 do_agesawrapper(AGESA_STATUS (*func)(void), const char *name)
-{
- AGESA_STATUS ret;
- printk(BIOS_DEBUG, "agesawrapper_%s() entry\n", name);
- ret = func();
- printk(BIOS_DEBUG, "agesawrapper_%s() returned %s\n",
- name, decodeAGESA_STATUS(ret));
- return (u32)ret;
-}
-
-#define AGESAWRAPPER(func) do_agesawrapper(agesawrapper_ ## func, #func)
-
-#define AGESAWRAPPER_PRE_CONSOLE(func) agesawrapper_ ## func()
-
-#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(0)
-#define AGESA_EVENTLOG_(x,y) AGESA_EVENTLOG(x)
-#else
-#define AGESA_EVENTLOG(status, heapstatus) \
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(heapstatus)
-#define AGESA_EVENTLOG_(x,y) AGESA_EVENTLOG(x,y)
-#endif
-
-#endif
diff --git a/src/northbridge/amd/agesa/eventlog.c b/src/northbridge/amd/agesa/eventlog.c
index 1deb343472..90640d9515 100644
--- a/src/northbridge/amd/agesa/eventlog.c
+++ b/src/northbridge/amd/agesa/eventlog.c
@@ -1,9 +1,53 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * 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 <console/console.h>
+#include <stdint.h>
+#include <string.h>
#include <northbridge/amd/agesa/agesawrapper.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include "amdlib.h"
+#include "AGESA.h"
+#include "AMD.h"
+
+
+/*
+ * Possible AGESA_STATUS values:
+ *
+ * 0x0 = AGESA_SUCCESS
+ * 0x1 = AGESA_UNSUPPORTED
+ * 0x2 = AGESA_BOUNDS_CHK
+ * 0x3 = AGESA_ALERT
+ * 0x4 = AGESA_WARNING
+ * 0x5 = AGESA_ERROR
+ * 0x6 = AGESA_CRITICAL
+ * 0x7 = AGESA_FATAL
+ */
+static const char * decodeAGESA_STATUS(AGESA_STATUS sret)
+{
+ const char* statusStrings[] = { "AGESA_SUCCESS", "AGESA_UNSUPPORTED",
+ "AGESA_BOUNDS_CHK", "AGESA_ALERT",
+ "AGESA_WARNING", "AGESA_ERROR",
+ "AGESA_CRITICAL", "AGESA_FATAL"
+ };
+ if (sret > 7) return "unknown"; /* Non-AGESA error code */
+ return statusStrings[sret];
+}
#if 0
@@ -42,6 +86,7 @@ static void agesa_alert(EVENT_PARAMS *event)
switch (event->EventInfo) {
case MEM_ALERT_USER_TMG_MODE_OVERRULED:
printk(BIOS_DEBUG, "Socket %x Dct %x Channel %x "
+
"TIMING_MODE_SPECIFIC is requested but can not be applied to current configurations.\n",
(unsigned int)event->DataParam1,
(unsigned int)event->DataParam2,
@@ -664,25 +709,19 @@ static void interpret_agesa_eventlog(EVENT_PARAMS *event)
}
#endif
-/**
- * @param HeapStatus -the current HeapStatus
- */
-AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus)
+static void amd_readeventlog(AMD_CONFIG_PARAMS *StdHeader)
{
- AGESA_STATUS Status;
EVENT_PARAMS AmdEventParams;
- LibAmdMemFill(&AmdEventParams,
- 0,
- sizeof(EVENT_PARAMS),
- &(AmdEventParams.StdHeader));
+ memset(&AmdEventParams, 0, sizeof(EVENT_PARAMS));
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);
+ AmdEventParams.StdHeader.HeapStatus = StdHeader->HeapStatus;
+
+ AmdReadEventLog(&AmdEventParams);
while (AmdEventParams.EventClass != 0) {
printk(BIOS_DEBUG,"\nEventLog: EventClass = %x, EventInfo = %x.\n",
(unsigned int)AmdEventParams.EventClass,
@@ -693,8 +732,14 @@ AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus)
printk(BIOS_DEBUG," Param3 = %x, Param4 = %x.\n",
(unsigned int)AmdEventParams.DataParam3,
(unsigned int)AmdEventParams.DataParam4);
- Status = AmdReadEventLog(&AmdEventParams);
+ AmdReadEventLog(&AmdEventParams);
}
+}
- return Status;
+
+void agesawrapper_trace(AGESA_STATUS ret, AMD_CONFIG_PARAMS *StdHeader, const char *func)
+{
+ printk(BIOS_DEBUG, "%s() returned %s\n", func, decodeAGESA_STATUS(ret));
+ if (ret != AGESA_SUCCESS)
+ amd_readeventlog(StdHeader);
}
diff --git a/src/northbridge/amd/agesa/family10/northbridge.c b/src/northbridge/amd/agesa/family10/northbridge.c
index 1f615e5722..2c46129a84 100644
--- a/src/northbridge/amd/agesa/family10/northbridge.c
+++ b/src/northbridge/amd/agesa/family10/northbridge.c
@@ -832,7 +832,7 @@ static void amdfam10_domain_enable_resources(device_t dev)
{
/* Must be called after PCI enumeration and resource allocation */
printk(BIOS_DEBUG, "\nFam10 - %s: AmdInitMid.\n", __func__);
- AGESAWRAPPER(amdinitmid);
+ agesawrapper_amdinitmid();
printk(BIOS_DEBUG, " ader - leaving %s.\n", __func__);
}
diff --git a/src/northbridge/amd/agesa/family12/agesawrapper.c b/src/northbridge/amd/agesa/family12/agesawrapper.c
index 9a39c0e64f..8d0fe909f1 100644
--- a/src/northbridge/amd/agesa/family12/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family12/agesawrapper.c
@@ -247,7 +247,7 @@ AGESA_STATUS agesawrapper_amdinitreset(VOID)
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
}
@@ -273,7 +273,7 @@ AGESA_STATUS agesawrapper_amdinitearly(VOID)
OemCustomizeInitEarly(AmdEarlyParamsPtr);
status = AmdInitEarly((AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -296,7 +296,7 @@ AGESA_STATUS agesawrapper_amdinitpost(VOID)
AmdCreateStruct(&AmdParamStruct);
status = AmdInitPost((AMD_POST_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
/* Initialize heap space */
@@ -321,7 +321,7 @@ AGESA_STATUS agesawrapper_amdinitenv(VOID)
AmdParamStruct.StdHeader.ImageBasePtr = 0;
AmdCreateStruct(&AmdParamStruct);
status = AmdInitEnv((AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -370,7 +370,7 @@ AGESA_STATUS agesawrapper_amdinitmid(VOID)
AmdCreateStruct(&AmdParamStruct);
status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -389,7 +389,7 @@ AGESA_STATUS agesawrapper_amdinitlate(VOID)
AmdLateParams.StdHeader.ImageBasePtr = 0;
status = AmdInitLate(&AmdLateParams);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &AmdLateParams.StdHeader);
ASSERT(status == AGESA_SUCCESS);
DmiTable = AmdLateParams.DmiTable;
@@ -417,7 +417,7 @@ AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * Conf
ApExeParams.StdHeader.ImageBasePtr = 0;
status = AmdLateRunApTask(&ApExeParams);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &ApExeParams.StdHeader);
ASSERT(status == AGESA_SUCCESS);
return status;
diff --git a/src/northbridge/amd/agesa/family12/northbridge.c b/src/northbridge/amd/agesa/family12/northbridge.c
index bcebcd95a2..8d82925152 100644
--- a/src/northbridge/amd/agesa/family12/northbridge.c
+++ b/src/northbridge/amd/agesa/family12/northbridge.c
@@ -37,7 +37,6 @@
#include "sb_cimx.h"
#include <northbridge/amd/agesa/agesawrapper.h>
-#include <northbridge/amd/agesa/agesawrapper_call.h>
//#define FX_DEVS NODE_NUMS
#define FX_DEVS 1
@@ -777,7 +776,7 @@ static void domain_enable_resources(device_t dev)
/* Enable MMIO on AMD CPU Address Map Controller */
agesawrapper_amdinitcpuio();
- AGESAWRAPPER(amdinitmid);
+ agesawrapper_amdinitmid();
printk(BIOS_DEBUG, "Fam12h - northbridge.c - %s - End.\n",__func__);
}
diff --git a/src/northbridge/amd/agesa/family14/agesawrapper.c b/src/northbridge/amd/agesa/family14/agesawrapper.c
index e1828306cb..8d80ef18e2 100644
--- a/src/northbridge/amd/agesa/family14/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family14/agesawrapper.c
@@ -157,7 +157,7 @@ AGESA_STATUS agesawrapper_amdinitreset(VOID)
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
}
@@ -182,7 +182,7 @@ AGESA_STATUS agesawrapper_amdinitearly(VOID)
OemCustomizeInitEarly(AmdEarlyParamsPtr);
status = AmdInitEarly((AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -204,7 +204,7 @@ AGESA_STATUS agesawrapper_amdinitpost(VOID)
AmdCreateStruct(&AmdParamStruct);
status = AmdInitPost((AMD_POST_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
/* Initialize heap space */
@@ -229,8 +229,10 @@ AGESA_STATUS agesawrapper_amdinitenv(VOID)
AmdParamStruct.StdHeader.Func = 0;
AmdParamStruct.StdHeader.ImageBasePtr = 0;
AmdCreateStruct(&AmdParamStruct);
+
status = AmdInitEnv((AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
+
/* Initialize Subordinate Bus Number and Secondary Bus Number
* In platform BIOS this address is allocated by PCI enumeration code
Modify D1F0x18
@@ -347,7 +349,7 @@ AGESA_STATUS agesawrapper_amdinitmid(VOID)
AmdCreateStruct(&AmdParamStruct);
status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -375,7 +377,7 @@ AGESA_STATUS agesawrapper_amdinitlate(VOID)
(u32) AmdLateParamsPtr);
status = AmdInitLate(AmdLateParamsPtr);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
ASSERT(status == AGESA_SUCCESS);
DmiTable = AmdLateParamsPtr->DmiTable;
@@ -414,7 +416,7 @@ AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * Conf
ApExeParams.RelatedDataBlock = ConfigPtr;
status = AmdLateRunApTask(&ApExeParams);
- AGESA_EVENTLOG(status);
+ AGESA_EVENTLOG(status, &ApExeParams.StdHeader);
ASSERT(status == AGESA_SUCCESS);
return status;
diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c
index aec7157811..8d95dc4c79 100644
--- a/src/northbridge/amd/agesa/family14/northbridge.c
+++ b/src/northbridge/amd/agesa/family14/northbridge.c
@@ -36,7 +36,6 @@
#include <cpu/amd/mtrr.h>
#include <northbridge/amd/agesa/agesawrapper.h>
-#include <northbridge/amd/agesa/agesawrapper_call.h>
#if CONFIG_AMD_SB_CIMX
#include <sb_cimx.h>
#endif
@@ -775,7 +774,7 @@ static void domain_enable_resources(device_t dev)
/* Enable MMIO on AMD CPU Address Map Controller */
agesawrapper_amdinitcpuio();
- AGESAWRAPPER(amdinitmid);
+ agesawrapper_amdinitmid();
}
printk(BIOS_DEBUG, " ader - leaving domain_enable_resources.\n");
diff --git a/src/northbridge/amd/agesa/family15/agesawrapper.c b/src/northbridge/amd/agesa/family15/agesawrapper.c
index 4641881e9e..0552a02303 100644
--- a/src/northbridge/amd/agesa/family15/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family15/agesawrapper.c
@@ -210,7 +210,7 @@ AGESA_STATUS agesawrapper_amdinitreset(void)
#if (defined AGESA_ENTRY_INIT_RESET) && (AGESA_ENTRY_INIT_RESET == TRUE)
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
#endif
- AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -243,7 +243,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
OemCustomizeInitEarly(AmdEarlyParamsPtr);
status = AmdInitEarly(AmdEarlyParamsPtr);
- AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
GetCpuServicesOfCurrentCore((CONST CPU_SPECIFIC_SERVICES **) & FamilySpecificServices,
&AmdParamStruct.StdHeader);
@@ -281,7 +281,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void)
OemCustomizeInitPost(PostParams);
status = AmdInitPost(PostParams);
- AGESA_EVENTLOG(status, PostParams->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &PostParams->StdHeader);
AmdReleaseStruct(&AmdParamStruct);
@@ -317,7 +317,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
}
EnvParams = (AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr;
status = AmdInitEnv(EnvParams);
- AGESA_EVENTLOG(status, EnvParams->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &EnvParams->StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -369,7 +369,7 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
return status;
}
status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -396,7 +396,7 @@ AGESA_STATUS agesawrapper_amdinitlate(void)
printk(BIOS_DEBUG, "agesawrapper_amdinitlate: AmdLateParamsPtr = %X\n", (u32) AmdLateParamsPtr);
status = AmdInitLate(AmdLateParamsPtr);
- AGESA_EVENTLOG(status, AmdLateParamsPtr->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdLateParamsPtr->StdHeader);
ASSERT(status == AGESA_SUCCESS);
DmiTable = AmdLateParamsPtr->DmiTable;
@@ -438,7 +438,7 @@ AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * Conf
printk(BIOS_DEBUG, "AmdLateRunApTask on Core: %x\n", (uint32_t) Data);
status = AmdLateRunApTask((AP_EXE_PARAMS *) ConfigPtr);
- AGESA_EVENTLOG(status, AmdLateParams.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdLateParams.StdHeader);
ASSERT((status == AGESA_SUCCESS) || (status == AGESA_UNSUPPORTED));
return status;
diff --git a/src/northbridge/amd/agesa/family15/northbridge.c b/src/northbridge/amd/agesa/family15/northbridge.c
index de7d026a47..0700a5dc46 100644
--- a/src/northbridge/amd/agesa/family15/northbridge.c
+++ b/src/northbridge/amd/agesa/family15/northbridge.c
@@ -42,7 +42,6 @@
#include <cpu/amd/amdfam15.h>
#include <cpuRegisters.h>
#include <northbridge/amd/agesa/agesawrapper.h>
-#include <northbridge/amd/agesa/agesawrapper_call.h>
#include "sb_cimx.h"
#define MAX_NODE_NUMS (MAX_NODES * MAX_DIES)
@@ -710,7 +709,7 @@ static void domain_enable_resources(device_t dev)
/* Enable MMIO on AMD CPU Address Map Controller */
agesawrapper_amdinitcpuio();
- AGESAWRAPPER(amdinitmid);
+ agesawrapper_amdinitmid();
printk(BIOS_DEBUG, " Fam15 - leaving %s.\n", __func__);
}
diff --git a/src/northbridge/amd/agesa/family15rl/agesawrapper.c b/src/northbridge/amd/agesa/family15rl/agesawrapper.c
index 768541171b..043442af46 100644
--- a/src/northbridge/amd/agesa/family15rl/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family15rl/agesawrapper.c
@@ -147,7 +147,7 @@ AGESA_STATUS agesawrapper_amdinitreset(void)
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
}
@@ -172,7 +172,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
OemCustomizeInitEarly(AmdEarlyParamsPtr);
status = AmdInitEarly((AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -196,7 +196,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void)
AmdCreateStruct(&AmdParamStruct);
PostParams = (AMD_POST_PARAMS *) AmdParamStruct.NewStructPtr;
status = AmdInitPost(PostParams);
- AGESA_EVENTLOG(status, PostParams->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &PostParams->StdHeader);
AmdReleaseStruct(&AmdParamStruct);
/* Initialize heap space */
EmptyHeap();
@@ -222,7 +222,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
EnvParam = (AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr;
status = AmdInitEnv(EnvParam);
- AGESA_EVENTLOG(status, EnvParam->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &EnvParam->StdHeader);
/* Initialize Subordinate Bus Number and Secondary Bus Number
* In platform BIOS this address is allocated by PCI enumeration code
Modify D1F0x18
@@ -273,7 +273,7 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr)->GnbMidConfiguration.iGpuVgaMode = 0; /* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -299,7 +299,7 @@ AGESA_STATUS agesawrapper_amdinitlate(void)
AmdCreateStruct(&AmdParamStruct);
AmdLateParams = (AMD_LATE_PARAMS *) AmdParamStruct.NewStructPtr;
status = AmdInitLate(AmdLateParams);
- AGESA_EVENTLOG(status, AmdLateParams->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdLateParams->StdHeader);
ASSERT(status == AGESA_SUCCESS);
DmiTable = AmdLateParams->DmiTable;
diff --git a/src/northbridge/amd/agesa/family15rl/northbridge.c b/src/northbridge/amd/agesa/family15rl/northbridge.c
index c5924d2847..9d2fa9f95b 100644
--- a/src/northbridge/amd/agesa/family15rl/northbridge.c
+++ b/src/northbridge/amd/agesa/family15rl/northbridge.c
@@ -43,7 +43,6 @@
#include <cpu/amd/amdfam15.h>
#include <cpuRegisters.h>
#include <northbridge/amd/agesa/agesawrapper.h>
-#include <northbridge/amd/agesa/agesawrapper_call.h>
#define MAX_NODE_NUMS (MAX_NODES * MAX_DIES)
@@ -697,14 +696,14 @@ static void domain_read_resources(struct device *dev)
static void domain_enable_resources(struct device *dev)
{
if (acpi_is_wakeup_s3())
- AGESAWRAPPER(fchs3laterestore);
+ agesawrapper_fchs3laterestore();
/* Must be called after PCI enumeration and resource allocation */
if (!acpi_is_wakeup_s3()) {
/* Enable MMIO on AMD CPU Address Map Controller */
agesawrapper_amdinitcpuio();
- AGESAWRAPPER(amdinitmid);
+ agesawrapper_amdinitmid();
}
printk(BIOS_DEBUG, " ader - leaving %s.\n", __func__);
}
diff --git a/src/northbridge/amd/agesa/family15tn/agesawrapper.c b/src/northbridge/amd/agesa/family15tn/agesawrapper.c
index 768541171b..043442af46 100644
--- a/src/northbridge/amd/agesa/family15tn/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family15tn/agesawrapper.c
@@ -147,7 +147,7 @@ AGESA_STATUS agesawrapper_amdinitreset(void)
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
}
@@ -172,7 +172,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
OemCustomizeInitEarly(AmdEarlyParamsPtr);
status = AmdInitEarly((AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -196,7 +196,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void)
AmdCreateStruct(&AmdParamStruct);
PostParams = (AMD_POST_PARAMS *) AmdParamStruct.NewStructPtr;
status = AmdInitPost(PostParams);
- AGESA_EVENTLOG(status, PostParams->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &PostParams->StdHeader);
AmdReleaseStruct(&AmdParamStruct);
/* Initialize heap space */
EmptyHeap();
@@ -222,7 +222,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
EnvParam = (AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr;
status = AmdInitEnv(EnvParam);
- AGESA_EVENTLOG(status, EnvParam->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &EnvParam->StdHeader);
/* Initialize Subordinate Bus Number and Secondary Bus Number
* In platform BIOS this address is allocated by PCI enumeration code
Modify D1F0x18
@@ -273,7 +273,7 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr)->GnbMidConfiguration.iGpuVgaMode = 0; /* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -299,7 +299,7 @@ AGESA_STATUS agesawrapper_amdinitlate(void)
AmdCreateStruct(&AmdParamStruct);
AmdLateParams = (AMD_LATE_PARAMS *) AmdParamStruct.NewStructPtr;
status = AmdInitLate(AmdLateParams);
- AGESA_EVENTLOG(status, AmdLateParams->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdLateParams->StdHeader);
ASSERT(status == AGESA_SUCCESS);
DmiTable = AmdLateParams->DmiTable;
diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c
index 54a5c694eb..ac8d72af69 100644
--- a/src/northbridge/amd/agesa/family15tn/northbridge.c
+++ b/src/northbridge/amd/agesa/family15tn/northbridge.c
@@ -42,7 +42,6 @@
#include <cpu/amd/amdfam15.h>
#include <cpuRegisters.h>
#include <northbridge/amd/agesa/agesawrapper.h>
-#include <northbridge/amd/agesa/agesawrapper_call.h>
#define MAX_NODE_NUMS (MAX_NODES * MAX_DIES)
@@ -695,14 +694,14 @@ static void domain_read_resources(device_t dev)
static void domain_enable_resources(device_t dev)
{
if (acpi_is_wakeup_s3())
- AGESAWRAPPER(fchs3laterestore);
+ agesawrapper_fchs3laterestore();
/* Must be called after PCI enumeration and resource allocation */
if (!acpi_is_wakeup_s3()) {
/* Enable MMIO on AMD CPU Address Map Controller */
agesawrapper_amdinitcpuio();
- AGESAWRAPPER(amdinitmid);
+ agesawrapper_amdinitmid();
}
printk(BIOS_DEBUG, " ader - leaving %s.\n", __func__);
}
diff --git a/src/northbridge/amd/agesa/family16kb/agesawrapper.c b/src/northbridge/amd/agesa/family16kb/agesawrapper.c
index 768541171b..043442af46 100644
--- a/src/northbridge/amd/agesa/family16kb/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family16kb/agesawrapper.c
@@ -147,7 +147,7 @@ AGESA_STATUS agesawrapper_amdinitreset(void)
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset((AMD_RESET_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
}
@@ -172,7 +172,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
OemCustomizeInitEarly(AmdEarlyParamsPtr);
status = AmdInitEarly((AMD_EARLY_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -196,7 +196,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void)
AmdCreateStruct(&AmdParamStruct);
PostParams = (AMD_POST_PARAMS *) AmdParamStruct.NewStructPtr;
status = AmdInitPost(PostParams);
- AGESA_EVENTLOG(status, PostParams->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &PostParams->StdHeader);
AmdReleaseStruct(&AmdParamStruct);
/* Initialize heap space */
EmptyHeap();
@@ -222,7 +222,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
EnvParam = (AMD_ENV_PARAMS *) AmdParamStruct.NewStructPtr;
status = AmdInitEnv(EnvParam);
- AGESA_EVENTLOG(status, EnvParam->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &EnvParam->StdHeader);
/* Initialize Subordinate Bus Number and Secondary Bus Number
* In platform BIOS this address is allocated by PCI enumeration code
Modify D1F0x18
@@ -273,7 +273,7 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr)->GnbMidConfiguration.iGpuVgaMode = 0; /* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
- AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
AmdReleaseStruct(&AmdParamStruct);
return status;
@@ -299,7 +299,7 @@ AGESA_STATUS agesawrapper_amdinitlate(void)
AmdCreateStruct(&AmdParamStruct);
AmdLateParams = (AMD_LATE_PARAMS *) AmdParamStruct.NewStructPtr;
status = AmdInitLate(AmdLateParams);
- AGESA_EVENTLOG(status, AmdLateParams->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, &AmdLateParams->StdHeader);
ASSERT(status == AGESA_SUCCESS);
DmiTable = AmdLateParams->DmiTable;
diff --git a/src/northbridge/amd/agesa/family16kb/northbridge.c b/src/northbridge/amd/agesa/family16kb/northbridge.c
index 849f40cbd2..db12fc32e7 100644
--- a/src/northbridge/amd/agesa/family16kb/northbridge.c
+++ b/src/northbridge/amd/agesa/family16kb/northbridge.c
@@ -42,7 +42,6 @@
#include <cpu/amd/amdfam16.h>
#include <cpuRegisters.h>
#include <northbridge/amd/agesa/agesawrapper.h>
-#include <northbridge/amd/agesa/agesawrapper_call.h>
#define MAX_NODE_NUMS (MAX_NODES * MAX_DIES)
@@ -737,14 +736,14 @@ static void domain_read_resources(device_t dev)
static void domain_enable_resources(device_t dev)
{
if (acpi_is_wakeup_s3())
- AGESAWRAPPER(fchs3laterestore);
+ agesawrapper_fchs3laterestore();
/* Must be called after PCI enumeration and resource allocation */
if (!acpi_is_wakeup_s3()) {
/* Enable MMIO on AMD CPU Address Map Controller */
agesawrapper_amdinitcpuio();
- AGESAWRAPPER(amdinitmid);
+ agesawrapper_amdinitmid();
}
printk(BIOS_DEBUG, " ader - leaving domain_enable_resources.\n");
}