summaryrefslogtreecommitdiff
path: root/src/mainboard/amd
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:04:53 +0100
commit27c4edace6ff3246c6b0345300931850d9e7f4bc (patch)
tree4b66f94b7bb04ab298a96bb13027c6a4dc17fcd3 /src/mainboard/amd
parentf21c2ac0556eefad4b66a8c39734a431610d9139 (diff)
downloadcoreboot-27c4edace6ff3246c6b0345300931850d9e7f4bc.tar.xz
AGESA: Report events with AGESA_EVENTLOG()
NOTE: For fam12 and fam14 ASSERT() is defined empty so execution may fall through critical failures. Change-Id: Ifef65d749d340f1df3a43b5fcb38c4315ef944e8 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7154 Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/mainboard/amd')
-rw-r--r--src/mainboard/amd/dinar/agesawrapper.c23
-rw-r--r--src/mainboard/amd/inagua/agesawrapper.c22
-rw-r--r--src/mainboard/amd/olivehill/agesawrapper.c35
-rw-r--r--src/mainboard/amd/parmer/agesawrapper.c35
-rw-r--r--src/mainboard/amd/persimmon/agesawrapper.c36
-rw-r--r--src/mainboard/amd/south_station/agesawrapper.c22
-rw-r--r--src/mainboard/amd/thatcher/agesawrapper.c35
-rw-r--r--src/mainboard/amd/torpedo/agesawrapper.c18
-rw-r--r--src/mainboard/amd/union_station/agesawrapper.c22
9 files changed, 96 insertions, 152 deletions
diff --git a/src/mainboard/amd/dinar/agesawrapper.c b/src/mainboard/amd/dinar/agesawrapper.c
index fd9f637771..07cbcb937c 100644
--- a/src/mainboard/amd/dinar/agesawrapper.c
+++ b/src/mainboard/amd/dinar/agesawrapper.c
@@ -280,7 +280,7 @@ AGESA_STATUS agesawrapper_amdinitreset(void)
AmdCreateStruct (&AmdParamStruct);
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
#else
status = AGESA_SUCCESS;
@@ -312,7 +312,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
OemCustomizeInitEarly (AmdEarlyParamsPtr);
status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -369,7 +369,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void)
OemCustomizeInitPost ((AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr);
status = AmdInitPost ((AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
/* Initialize heap space */
@@ -396,7 +396,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
AmdParamStruct.StdHeader.ImageBasePtr = 0;
AmdCreateStruct (&AmdParamStruct);
status = AmdInitEnv ((AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -454,7 +454,7 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
AmdCreateStruct (&AmdParamStruct);
status = AmdInitMid ((AMD_MID_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -485,11 +485,8 @@ AGESA_STATUS agesawrapper_amdinitlate(void)
printk(BIOS_DEBUG, "agesawrapper_amdinitlate: AmdLateParamsPtr = %X\n", (u32)AmdLateParamsPtr);
Status = AmdInitLate(AmdLateParamsPtr);
- if (Status != AGESA_SUCCESS) {
- //agesawrapper_amdreadeventlog(AmdLateParamsPtr->StdHeader.HeapStatus);
- agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status);
+ ASSERT(Status == AGESA_SUCCESS);
DmiTable = AmdLateParamsPtr->DmiTable;
AcpiPstate = AmdLateParamsPtr->AcpiPState;
AcpiSrat = AmdLateParamsPtr->AcpiSrat;
@@ -527,10 +524,8 @@ AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *Conf
AmdLateParams.StdHeader.ImageBasePtr = 0;
Status = AmdLateRunApTask (&AmdLateParams);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status);
+ ASSERT(Status == AGESA_SUCCESS);
return Status;
}
diff --git a/src/mainboard/amd/inagua/agesawrapper.c b/src/mainboard/amd/inagua/agesawrapper.c
index cee9d6c8b7..343f22cf74 100644
--- a/src/mainboard/amd/inagua/agesawrapper.c
+++ b/src/mainboard/amd/inagua/agesawrapper.c
@@ -167,7 +167,7 @@ AGESA_STATUS agesawrapper_amdinitreset (
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
}
@@ -194,7 +194,7 @@ AGESA_STATUS agesawrapper_amdinitearly (
OemCustomizeInitEarly (AmdEarlyParamsPtr);
status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -218,7 +218,7 @@ AGESA_STATUS agesawrapper_amdinitpost (
AmdCreateStruct (&AmdParamStruct);
status = AmdInitPost ((AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
/* Initialize heap space */
@@ -246,7 +246,7 @@ AGESA_STATUS agesawrapper_amdinitenv (
AmdParamStruct.StdHeader.ImageBasePtr = 0;
AmdCreateStruct (&AmdParamStruct);
status = AmdInitEnv ((AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
/* Initialize Subordinate Bus Number and Secondary Bus Number
* In platform BIOS this address is allocated by PCI enumeration code
Modify D1F0x18
@@ -371,7 +371,7 @@ AGESA_STATUS agesawrapper_amdinitmid (
AmdCreateStruct (&AmdParamStruct);
status = AmdInitMid ((AMD_MID_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -400,10 +400,8 @@ AGESA_STATUS agesawrapper_amdinitlate (
printk (BIOS_DEBUG, "agesawrapper_amdinitlate: AmdLateParamsPtr = %X\n", (u32)AmdLateParamsPtr);
Status = AmdInitLate (AmdLateParamsPtr);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status);
+ ASSERT(Status == AGESA_SUCCESS);
DmiTable = AmdLateParamsPtr->DmiTable;
AcpiPstate = AmdLateParamsPtr->AcpiPState;
@@ -445,10 +443,8 @@ AGESA_STATUS agesawrapper_amdlaterunaptask (
ApExeParams.RelatedDataBlock = ConfigPtr;
Status = AmdLateRunApTask (&ApExeParams);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status);
+ ASSERT(Status == AGESA_SUCCESS);
return Status;
}
diff --git a/src/mainboard/amd/olivehill/agesawrapper.c b/src/mainboard/amd/olivehill/agesawrapper.c
index f58c6bbfb8..22522db291 100644
--- a/src/mainboard/amd/olivehill/agesawrapper.c
+++ b/src/mainboard/amd/olivehill/agesawrapper.c
@@ -165,7 +165,7 @@ AGESA_STATUS agesawrapper_amdinitreset(void)
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
return status;
}
@@ -193,7 +193,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
OemCustomizeInitEarly (AmdEarlyParamsPtr);
status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -220,7 +220,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void)
AmdCreateStruct (&AmdParamStruct);
PostParams = (AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr;
status = AmdInitPost (PostParams);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(PostParams->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, PostParams->StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
/* Initialize heap space */
EmptyHeap();
@@ -249,7 +249,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
EnvParam = (AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr;
status = AmdInitEnv (EnvParam);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(EnvParam->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, EnvParam->StdHeader.HeapStatus);
/* Initialize Subordinate Bus Number and Secondary Bus Number
* In platform BIOS this address is allocated by PCI enumeration code
Modify D1F0x18
@@ -309,7 +309,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);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -338,10 +338,8 @@ AGESA_STATUS agesawrapper_amdinitlate(void)
AmdCreateStruct(&AmdParamStruct);
AmdLateParams = (AMD_LATE_PARAMS *)AmdParamStruct.NewStructPtr;
Status = AmdInitLate(AmdLateParams);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog(AmdLateParams->StdHeader.HeapStatus);
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status, AmdLateParams->StdHeader.HeapStatus);
+ ASSERT(Status == AGESA_SUCCESS);
DmiTable = AmdLateParams->DmiTable;
AcpiPstate = AmdLateParams->AcpiPState;
@@ -386,10 +384,7 @@ AGESA_STATUS agesawrapper_amdlaterunaptask (
ApExeParams.RelatedDataBlock = ConfigPtr;
Status = AmdLateRunApTask (&ApExeParams);
- if (Status != AGESA_SUCCESS) {
- /* agesawrapper_amdreadeventlog(); */
- ASSERT(Status == AGESA_SUCCESS);
- }
+ ASSERT(Status == AGESA_SUCCESS);
return Status;
}
@@ -426,7 +421,7 @@ AGESA_STATUS agesawrapper_amdinitresume(void)
status = AmdInitResume ((AMD_RESUME_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -487,10 +482,8 @@ AGESA_STATUS agesawrapper_amds3laterestore(void)
(void **) &AmdS3LateParamsPtr->S3DataBlock.VolatileStorage);
Status = AmdS3LateRestore (AmdS3LateParamsPtr);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog(AmdInterfaceParams.StdHeader.HeapStatus);
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status, AmdInterfaceParams.StdHeader.HeapStatus);
+ ASSERT(Status == AGESA_SUCCESS);
return Status;
}
@@ -560,10 +553,8 @@ AGESA_STATUS agesawrapper_amdS3Save(void)
AmdS3SaveParamsPtr->StdHeader = AmdInterfaceParams.StdHeader;
Status = AmdS3Save(AmdS3SaveParamsPtr);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog(AmdInterfaceParams.StdHeader.HeapStatus);
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status, AmdInterfaceParams.StdHeader.HeapStatus);
+ ASSERT(Status == AGESA_SUCCESS);
S3DataType = S3DataTypeNonVolatile;
printk(BIOS_DEBUG, "NvStorageSize=%x, NvStorage=%x\n",
diff --git a/src/mainboard/amd/parmer/agesawrapper.c b/src/mainboard/amd/parmer/agesawrapper.c
index 2f58f38b1d..c457fa3b5f 100644
--- a/src/mainboard/amd/parmer/agesawrapper.c
+++ b/src/mainboard/amd/parmer/agesawrapper.c
@@ -165,7 +165,7 @@ AGESA_STATUS agesawrapper_amdinitreset(void)
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
return status;
}
@@ -193,7 +193,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
OemCustomizeInitEarly (AmdEarlyParamsPtr);
status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -220,7 +220,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void)
AmdCreateStruct (&AmdParamStruct);
PostParams = (AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr;
status = AmdInitPost (PostParams);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(PostParams->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, PostParams->StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
/* Initialize heap space */
EmptyHeap();
@@ -250,7 +250,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
EnvParam = (AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr;
status = AmdInitEnv (EnvParam);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(EnvParam->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, EnvParam->StdHeader.HeapStatus);
/* Initialize Subordinate Bus Number and Secondary Bus Number
* In platform BIOS this address is allocated by PCI enumeration code
Modify D1F0x18
@@ -310,7 +310,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);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -339,10 +339,8 @@ AGESA_STATUS agesawrapper_amdinitlate(void)
AmdCreateStruct(&AmdParamStruct);
AmdLateParams = (AMD_LATE_PARAMS *)AmdParamStruct.NewStructPtr;
Status = AmdInitLate(AmdLateParams);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog(AmdLateParams->StdHeader.HeapStatus);
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status, AmdLateParams->StdHeader.HeapStatus);
+ ASSERT(Status == AGESA_SUCCESS);
DmiTable = AmdLateParams->DmiTable;
AcpiPstate = AmdLateParams->AcpiPState;
@@ -387,10 +385,7 @@ AGESA_STATUS agesawrapper_amdlaterunaptask (
ApExeParams.RelatedDataBlock = ConfigPtr;
Status = AmdLateRunApTask (&ApExeParams);
- if (Status != AGESA_SUCCESS) {
- /* agesawrapper_amdreadeventlog(); */
- ASSERT(Status == AGESA_SUCCESS);
- }
+ ASSERT(Status == AGESA_SUCCESS);
return Status;
}
@@ -427,7 +422,7 @@ AGESA_STATUS agesawrapper_amdinitresume(void)
status = AmdInitResume ((AMD_RESUME_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -489,10 +484,8 @@ AGESA_STATUS agesawrapper_amds3laterestore(void)
(void **) &AmdS3LateParamsPtr->S3DataBlock.VolatileStorage);
Status = AmdS3LateRestore (AmdS3LateParamsPtr);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog(AmdInterfaceParams.StdHeader.HeapStatus);
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status, AmdInterfaceParams.StdHeader.HeapStatus);
+ ASSERT(Status == AGESA_SUCCESS);
return Status;
}
@@ -563,10 +556,8 @@ AGESA_STATUS agesawrapper_amdS3Save(void)
AmdS3SaveParamsPtr->StdHeader = AmdInterfaceParams.StdHeader;
Status = AmdS3Save(AmdS3SaveParamsPtr);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog(AmdInterfaceParams.StdHeader.HeapStatus);
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status, AmdInterfaceParams.StdHeader.HeapStatus);
+ ASSERT(Status == AGESA_SUCCESS);
S3DataType = S3DataTypeNonVolatile;
printk(BIOS_DEBUG, "NvStorageSize=%x, NvStorage=%x\n",
diff --git a/src/mainboard/amd/persimmon/agesawrapper.c b/src/mainboard/amd/persimmon/agesawrapper.c
index a9eda6bdca..991e0804fa 100644
--- a/src/mainboard/amd/persimmon/agesawrapper.c
+++ b/src/mainboard/amd/persimmon/agesawrapper.c
@@ -166,7 +166,7 @@ AGESA_STATUS agesawrapper_amdinitreset (
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
}
@@ -193,7 +193,7 @@ AGESA_STATUS agesawrapper_amdinitearly (
OemCustomizeInitEarly (AmdEarlyParamsPtr);
status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -217,7 +217,7 @@ AGESA_STATUS agesawrapper_amdinitpost (
AmdCreateStruct (&AmdParamStruct);
status = AmdInitPost ((AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
/* Initialize heap space */
@@ -245,7 +245,7 @@ AGESA_STATUS agesawrapper_amdinitenv (
AmdParamStruct.StdHeader.ImageBasePtr = 0;
AmdCreateStruct (&AmdParamStruct);
status = AmdInitEnv ((AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
/* Initialize Subordinate Bus Number and Secondary Bus Number
* In platform BIOS this address is allocated by PCI enumeration code
Modify D1F0x18
@@ -370,7 +370,7 @@ AGESA_STATUS agesawrapper_amdinitmid (
AmdCreateStruct (&AmdParamStruct);
status = AmdInitMid ((AMD_MID_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -399,10 +399,8 @@ AGESA_STATUS agesawrapper_amdinitlate (
printk (BIOS_DEBUG, "agesawrapper_amdinitlate: AmdLateParamsPtr = %X\n", (u32)AmdLateParamsPtr);
Status = AmdInitLate (AmdLateParamsPtr);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status);
+ ASSERT(Status == AGESA_SUCCESS);
DmiTable = AmdLateParamsPtr->DmiTable;
AcpiPstate = AmdLateParamsPtr->AcpiPState;
@@ -456,7 +454,7 @@ AGESA_STATUS agesawrapper_amdinitresume (
status = AmdInitResume ((AMD_RESUME_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -492,10 +490,8 @@ AGESA_STATUS agesawrapper_amds3laterestore (
(void **) &AmdS3LateParamsPtr->S3DataBlock.VolatileStorage);
Status = AmdS3LateRestore (AmdS3LateParamsPtr);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status);
+ ASSERT(Status == AGESA_SUCCESS);
return Status;
}
@@ -525,10 +521,8 @@ AGESA_STATUS agesawrapper_amdS3Save (
AmdS3SaveParamsPtr->StdHeader = AmdInterfaceParams.StdHeader;
Status = AmdS3Save (AmdS3SaveParamsPtr);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status);
+ ASSERT(Status == AGESA_SUCCESS);
S3DataType = S3DataTypeNonVolatile;
@@ -573,10 +567,8 @@ AGESA_STATUS agesawrapper_amdlaterunaptask (
ApExeParams.RelatedDataBlock = ConfigPtr;
Status = AmdLateRunApTask (&ApExeParams);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status);
+ ASSERT(Status == AGESA_SUCCESS);
return Status;
}
diff --git a/src/mainboard/amd/south_station/agesawrapper.c b/src/mainboard/amd/south_station/agesawrapper.c
index f7432027a9..8a7a24336f 100644
--- a/src/mainboard/amd/south_station/agesawrapper.c
+++ b/src/mainboard/amd/south_station/agesawrapper.c
@@ -167,7 +167,7 @@ AGESA_STATUS agesawrapper_amdinitreset (
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
}
@@ -194,7 +194,7 @@ AGESA_STATUS agesawrapper_amdinitearly (
OemCustomizeInitEarly (AmdEarlyParamsPtr);
status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -218,7 +218,7 @@ AGESA_STATUS agesawrapper_amdinitpost (
AmdCreateStruct (&AmdParamStruct);
status = AmdInitPost ((AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
/* Initialize heap space */
@@ -246,7 +246,7 @@ AGESA_STATUS agesawrapper_amdinitenv (
AmdParamStruct.StdHeader.ImageBasePtr = 0;
AmdCreateStruct (&AmdParamStruct);
status = AmdInitEnv ((AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
/* Initialize Subordinate Bus Number and Secondary Bus Number
* In platform BIOS this address is allocated by PCI enumeration code
Modify D1F0x18
@@ -371,7 +371,7 @@ AGESA_STATUS agesawrapper_amdinitmid (
AmdCreateStruct (&AmdParamStruct);
status = AmdInitMid ((AMD_MID_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -400,10 +400,8 @@ AGESA_STATUS agesawrapper_amdinitlate (
printk (BIOS_DEBUG, "agesawrapper_amdinitlate: AmdLateParamsPtr = %X\n", (u32)AmdLateParamsPtr);
Status = AmdInitLate (AmdLateParamsPtr);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status);
+ ASSERT(Status == AGESA_SUCCESS);
DmiTable = AmdLateParamsPtr->DmiTable;
AcpiPstate = AmdLateParamsPtr->AcpiPState;
@@ -440,10 +438,8 @@ AGESA_STATUS agesawrapper_amdlaterunaptask (
ApExeParams.RelatedDataBlock = ConfigPtr;
Status = AmdLateRunApTask (&ApExeParams);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status);
+ ASSERT(Status == AGESA_SUCCESS);
return Status;
}
diff --git a/src/mainboard/amd/thatcher/agesawrapper.c b/src/mainboard/amd/thatcher/agesawrapper.c
index 289f0789d0..cc3c0697bf 100644
--- a/src/mainboard/amd/thatcher/agesawrapper.c
+++ b/src/mainboard/amd/thatcher/agesawrapper.c
@@ -165,7 +165,7 @@ AGESA_STATUS agesawrapper_amdinitreset(void)
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
return status;
}
@@ -193,7 +193,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
OemCustomizeInitEarly (AmdEarlyParamsPtr);
status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -220,7 +220,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void)
AmdCreateStruct (&AmdParamStruct);
PostParams = (AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr;
status = AmdInitPost (PostParams);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(PostParams->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, PostParams->StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
/* Initialize heap space */
EmptyHeap();
@@ -249,7 +249,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void)
EnvParam = (AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr;
status = AmdInitEnv (EnvParam);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(EnvParam->StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, EnvParam->StdHeader.HeapStatus);
/* Initialize Subordinate Bus Number and Secondary Bus Number
* In platform BIOS this address is allocated by PCI enumeration code
Modify D1F0x18
@@ -309,7 +309,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);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -338,10 +338,8 @@ AGESA_STATUS agesawrapper_amdinitlate(void)
AmdCreateStruct(&AmdParamStruct);
AmdLateParams = (AMD_LATE_PARAMS *)AmdParamStruct.NewStructPtr;
Status = AmdInitLate(AmdLateParams);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog(AmdLateParams->StdHeader.HeapStatus);
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status, AmdLateParams->StdHeader.HeapStatus);
+ ASSERT(Status == AGESA_SUCCESS);
DmiTable = AmdLateParams->DmiTable;
AcpiPstate = AmdLateParams->AcpiPState;
@@ -386,10 +384,7 @@ AGESA_STATUS agesawrapper_amdlaterunaptask (
ApExeParams.RelatedDataBlock = ConfigPtr;
Status = AmdLateRunApTask (&ApExeParams);
- if (Status != AGESA_SUCCESS) {
- /* agesawrapper_amdreadeventlog(); */
- ASSERT(Status == AGESA_SUCCESS);
- }
+ ASSERT(Status == AGESA_SUCCESS);
return Status;
}
@@ -428,7 +423,7 @@ AGESA_STATUS agesawrapper_amdinitresume(void)
status = AmdInitResume ((AMD_RESUME_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
+ AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -491,10 +486,8 @@ AGESA_STATUS agesawrapper_amds3laterestore(void)
#endif
Status = AmdS3LateRestore (AmdS3LateParamsPtr);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog(AmdInterfaceParams.StdHeader.HeapStatus);
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status, AmdInterfaceParams.StdHeader.HeapStatus);
+ ASSERT(Status == AGESA_SUCCESS);
return Status;
}
@@ -564,10 +557,8 @@ AGESA_STATUS agesawrapper_amdS3Save(void)
AmdS3SaveParamsPtr->StdHeader = AmdInterfaceParams.StdHeader;
Status = AmdS3Save(AmdS3SaveParamsPtr);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog(AmdInterfaceParams.StdHeader.HeapStatus);
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status, AmdInterfaceParams.StdHeader.HeapStatus);
+ ASSERT(Status == AGESA_SUCCESS);
S3DataType = S3DataTypeNonVolatile;
printk(BIOS_DEBUG, "NvStorageSize=%x, NvStorage=%x\n",
diff --git a/src/mainboard/amd/torpedo/agesawrapper.c b/src/mainboard/amd/torpedo/agesawrapper.c
index 30a919c4d1..05387975b8 100644
--- a/src/mainboard/amd/torpedo/agesawrapper.c
+++ b/src/mainboard/amd/torpedo/agesawrapper.c
@@ -293,7 +293,7 @@ AGESA_STATUS agesawrapper_amdinitreset (
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
}
@@ -323,7 +323,7 @@ AGESA_STATUS agesawrapper_amdinitearly (
OemCustomizeInitEarly (AmdEarlyParamsPtr);
status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -350,7 +350,7 @@ AGESA_STATUS agesawrapper_amdinitpost (
AmdCreateStruct (&AmdParamStruct);
status = AmdInitPost ((AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
/* Initialize heap space */
@@ -379,7 +379,7 @@ AGESA_STATUS agesawrapper_amdinitenv (
AmdParamStruct.StdHeader.ImageBasePtr = 0;
AmdCreateStruct (&AmdParamStruct);
status = AmdInitEnv ((AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -438,7 +438,7 @@ AGESA_STATUS agesawrapper_amdinitmid (
AmdCreateStruct (&AmdParamStruct);
status = AmdInitMid ((AMD_MID_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -462,10 +462,8 @@ AGESA_STATUS agesawrapper_amdinitlate (
AmdLateParams.StdHeader.ImageBasePtr = 0;
Status = AmdInitLate (&AmdLateParams);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(Status);
ASSERT(Status == AGESA_SUCCESS);
- }
DmiTable = AmdLateParams.DmiTable;
AcpiPstate = AmdLateParams.AcpiPState;
@@ -495,10 +493,8 @@ AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *Conf
ApExeParams.StdHeader.ImageBasePtr = 0;
Status = AmdLateRunApTask (&ApExeParams);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(Status);
ASSERT(Status == AGESA_SUCCESS);
- }
return Status;
}
diff --git a/src/mainboard/amd/union_station/agesawrapper.c b/src/mainboard/amd/union_station/agesawrapper.c
index f7432027a9..8a7a24336f 100644
--- a/src/mainboard/amd/union_station/agesawrapper.c
+++ b/src/mainboard/amd/union_station/agesawrapper.c
@@ -167,7 +167,7 @@ AGESA_STATUS agesawrapper_amdinitreset (
AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
}
@@ -194,7 +194,7 @@ AGESA_STATUS agesawrapper_amdinitearly (
OemCustomizeInitEarly (AmdEarlyParamsPtr);
status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -218,7 +218,7 @@ AGESA_STATUS agesawrapper_amdinitpost (
AmdCreateStruct (&AmdParamStruct);
status = AmdInitPost ((AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
/* Initialize heap space */
@@ -246,7 +246,7 @@ AGESA_STATUS agesawrapper_amdinitenv (
AmdParamStruct.StdHeader.ImageBasePtr = 0;
AmdCreateStruct (&AmdParamStruct);
status = AmdInitEnv ((AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
/* Initialize Subordinate Bus Number and Secondary Bus Number
* In platform BIOS this address is allocated by PCI enumeration code
Modify D1F0x18
@@ -371,7 +371,7 @@ AGESA_STATUS agesawrapper_amdinitmid (
AmdCreateStruct (&AmdParamStruct);
status = AmdInitMid ((AMD_MID_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
+ AGESA_EVENTLOG(status);
AmdReleaseStruct (&AmdParamStruct);
return status;
@@ -400,10 +400,8 @@ AGESA_STATUS agesawrapper_amdinitlate (
printk (BIOS_DEBUG, "agesawrapper_amdinitlate: AmdLateParamsPtr = %X\n", (u32)AmdLateParamsPtr);
Status = AmdInitLate (AmdLateParamsPtr);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status);
+ ASSERT(Status == AGESA_SUCCESS);
DmiTable = AmdLateParamsPtr->DmiTable;
AcpiPstate = AmdLateParamsPtr->AcpiPState;
@@ -440,10 +438,8 @@ AGESA_STATUS agesawrapper_amdlaterunaptask (
ApExeParams.RelatedDataBlock = ConfigPtr;
Status = AmdLateRunApTask (&ApExeParams);
- if (Status != AGESA_SUCCESS) {
- agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
- }
+ AGESA_EVENTLOG(Status);
+ ASSERT(Status == AGESA_SUCCESS);
return Status;
}