Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7154
-gerrit
commit 4aa32e1edffe5afa05655cc8acaa51887e17faf0 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Tue Oct 21 14:19:04 2014 +0300
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 --- src/mainboard/amd/dinar/agesawrapper.c | 23 ++++++-------- src/mainboard/amd/inagua/agesawrapper.c | 22 ++++++------- src/mainboard/amd/olivehill/agesawrapper.c | 35 ++++++++------------- src/mainboard/amd/parmer/agesawrapper.c | 35 ++++++++------------- src/mainboard/amd/persimmon/agesawrapper.c | 36 +++++++++------------- src/mainboard/amd/south_station/agesawrapper.c | 22 ++++++------- src/mainboard/amd/thatcher/agesawrapper.c | 35 ++++++++------------- src/mainboard/amd/torpedo/agesawrapper.c | 18 +++++------ src/mainboard/amd/union_station/agesawrapper.c | 22 ++++++------- src/mainboard/asrock/e350m1/agesawrapper.c | 22 ++++++------- src/mainboard/asrock/imb-a180/agesawrapper.c | 35 ++++++++------------- src/mainboard/asus/f2a85-m/agesawrapper.c | 35 ++++++++------------- src/mainboard/gizmosphere/gizmo/agesawrapper.c | 36 +++++++++------------- src/mainboard/hp/pavilion_m6_1035dx/agesawrapper.c | 35 ++++++++------------- src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c | 36 +++++++++------------- src/mainboard/lenovo/g505s/agesawrapper.c | 35 ++++++++------------- .../lippert/frontrunner-af/agesawrapper.c | 36 +++++++++------------- src/mainboard/lippert/toucan-af/agesawrapper.c | 36 +++++++++------------- src/mainboard/supermicro/h8qgi/agesawrapper.c | 30 +++++++----------- src/mainboard/supermicro/h8scm/agesawrapper.c | 28 ++++++----------- src/mainboard/tyan/s8226/agesawrapper.c | 28 ++++++----------- src/northbridge/amd/agesa/agesawrapper.h | 1 + src/northbridge/amd/agesa/agesawrapper_call.h | 9 ++++++ 23 files changed, 252 insertions(+), 398 deletions(-)
diff --git a/src/mainboard/amd/dinar/agesawrapper.c b/src/mainboard/amd/dinar/agesawrapper.c index fd9f637..07cbcb9 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 cee9d6c..343f22c 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 f58c6bb..22522db 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 2f58f38..c457fa3 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 a9eda6b..991e080 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 f743202..8a7a243 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 289f078..cc3c069 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 30a919c..0538797 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 f743202..8a7a243 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; } diff --git a/src/mainboard/asrock/e350m1/agesawrapper.c b/src/mainboard/asrock/e350m1/agesawrapper.c index ed0b5dd..fc19e1d 100644 --- a/src/mainboard/asrock/e350m1/agesawrapper.c +++ b/src/mainboard/asrock/e350m1/agesawrapper.c @@ -196,7 +196,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; } @@ -223,7 +223,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; @@ -247,7 +247,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 */ @@ -275,7 +275,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 @@ -400,7 +400,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; @@ -429,10 +429,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; @@ -469,10 +467,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/asrock/imb-a180/agesawrapper.c b/src/mainboard/asrock/imb-a180/agesawrapper.c index 8c24a7f..62fc053 100644 --- a/src/mainboard/asrock/imb-a180/agesawrapper.c +++ b/src/mainboard/asrock/imb-a180/agesawrapper.c @@ -194,7 +194,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; } @@ -222,7 +222,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; @@ -249,7 +249,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(); @@ -278,7 +278,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 @@ -338,7 +338,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; @@ -367,10 +367,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; @@ -415,10 +413,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; } @@ -455,7 +450,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; @@ -516,10 +511,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; } @@ -589,10 +582,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/asus/f2a85-m/agesawrapper.c b/src/mainboard/asus/f2a85-m/agesawrapper.c index 4f4d2f8..2a5f5c8 100644 --- a/src/mainboard/asus/f2a85-m/agesawrapper.c +++ b/src/mainboard/asus/f2a85-m/agesawrapper.c @@ -178,7 +178,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; } @@ -206,7 +206,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; @@ -233,7 +233,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(); @@ -262,7 +262,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 @@ -322,7 +322,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; @@ -351,10 +351,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; @@ -399,10 +397,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; } @@ -441,7 +436,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; @@ -504,10 +499,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; } @@ -577,10 +570,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/gizmosphere/gizmo/agesawrapper.c b/src/mainboard/gizmosphere/gizmo/agesawrapper.c index 129c162..1ec8782 100755 --- a/src/mainboard/gizmosphere/gizmo/agesawrapper.c +++ b/src/mainboard/gizmosphere/gizmo/agesawrapper.c @@ -186,7 +186,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; } @@ -213,7 +213,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; @@ -237,7 +237,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 */ @@ -265,7 +265,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 @@ -390,7 +390,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; @@ -419,10 +419,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; @@ -476,7 +474,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; @@ -512,10 +510,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; } @@ -545,10 +541,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;
@@ -593,10 +587,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/hp/pavilion_m6_1035dx/agesawrapper.c b/src/mainboard/hp/pavilion_m6_1035dx/agesawrapper.c index 024011b..5de359e 100644 --- a/src/mainboard/hp/pavilion_m6_1035dx/agesawrapper.c +++ b/src/mainboard/hp/pavilion_m6_1035dx/agesawrapper.c @@ -179,7 +179,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; } @@ -207,7 +207,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; @@ -234,7 +234,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(); @@ -263,7 +263,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 @@ -323,7 +323,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; @@ -352,10 +352,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; @@ -400,10 +398,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; } @@ -440,7 +435,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; @@ -502,10 +497,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; } @@ -576,10 +569,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/jetway/nf81-t56n-lf/agesawrapper.c b/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c index f82388d..46c0faf 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c +++ b/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c @@ -147,7 +147,7 @@ AGESA_STATUS agesawrapper_amdinitreset(void) AmdResetParams.HtConfig.Depth = 0;
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr); - if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(); + AGESA_EVENTLOG(status); AmdReleaseStruct (&AmdParamStruct);
return status; @@ -173,7 +173,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; @@ -195,7 +195,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void)
AmdCreateStruct (&AmdParamStruct); status = AmdInitPost ((AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr); - if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(); + AGESA_EVENTLOG(status); AmdReleaseStruct (&AmdParamStruct);
/* Initialize heap space */ @@ -221,7 +221,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); /* Initialize Subordinate Bus Number and Secondary Bus Number * In platform BIOS this address is allocated by PCI enumeration code Modify D1F0x18 @@ -341,7 +341,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; @@ -368,10 +368,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(); - ASSERT(status == AGESA_SUCCESS); - } + AGESA_EVENTLOG(status); + ASSERT(status == AGESA_SUCCESS);
DmiTable = AmdLateParamsPtr->DmiTable; AcpiPstate = AmdLateParamsPtr->AcpiPState; @@ -423,7 +421,7 @@ AGESA_STATUS agesawrapper_amdinitresume(void)
status = AmdInitResume ((AMD_RESUME_PARAMS *)AmdParamStruct.NewStructPtr);
- if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(); + AGESA_EVENTLOG(status); AmdReleaseStruct (&AmdParamStruct);
return status; @@ -457,10 +455,8 @@ AGESA_STATUS agesawrapper_amds3laterestore(void) (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; } @@ -488,10 +484,8 @@ AGESA_STATUS agesawrapper_amdS3Save(void) 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;
@@ -532,10 +526,8 @@ AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *Conf 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/lenovo/g505s/agesawrapper.c b/src/mainboard/lenovo/g505s/agesawrapper.c index 024011b..5de359e 100644 --- a/src/mainboard/lenovo/g505s/agesawrapper.c +++ b/src/mainboard/lenovo/g505s/agesawrapper.c @@ -179,7 +179,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; } @@ -207,7 +207,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; @@ -234,7 +234,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(); @@ -263,7 +263,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 @@ -323,7 +323,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; @@ -352,10 +352,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; @@ -400,10 +398,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; } @@ -440,7 +435,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; @@ -502,10 +497,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; } @@ -576,10 +569,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/lippert/frontrunner-af/agesawrapper.c b/src/mainboard/lippert/frontrunner-af/agesawrapper.c index ffeb08d..480ad27 100644 --- a/src/mainboard/lippert/frontrunner-af/agesawrapper.c +++ b/src/mainboard/lippert/frontrunner-af/agesawrapper.c @@ -185,7 +185,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; } @@ -212,7 +212,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; @@ -236,7 +236,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 */ @@ -264,7 +264,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 @@ -389,7 +389,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; @@ -418,10 +418,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; @@ -475,7 +473,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; @@ -511,10 +509,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; } @@ -544,10 +540,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;
@@ -592,10 +586,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/lippert/toucan-af/agesawrapper.c b/src/mainboard/lippert/toucan-af/agesawrapper.c index ffeb08d..480ad27 100644 --- a/src/mainboard/lippert/toucan-af/agesawrapper.c +++ b/src/mainboard/lippert/toucan-af/agesawrapper.c @@ -185,7 +185,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; } @@ -212,7 +212,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; @@ -236,7 +236,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 */ @@ -264,7 +264,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 @@ -389,7 +389,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; @@ -418,10 +418,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; @@ -475,7 +473,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; @@ -511,10 +509,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; } @@ -544,10 +540,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;
@@ -592,10 +586,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/supermicro/h8qgi/agesawrapper.c b/src/mainboard/supermicro/h8qgi/agesawrapper.c index 6facc19..30bb996 100644 --- a/src/mainboard/supermicro/h8qgi/agesawrapper.c +++ b/src/mainboard/supermicro/h8qgi/agesawrapper.c @@ -237,8 +237,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 - if (status != AGESA_SUCCESS) - agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus); + AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus); AmdReleaseStruct(&AmdParamStruct);
return status; @@ -272,8 +271,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void) OemCustomizeInitEarly(AmdEarlyParamsPtr);
status = AmdInitEarly(AmdEarlyParamsPtr); - if (status != AGESA_SUCCESS) - agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus); + AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
GetCpuServicesOfCurrentCore((CONST CPU_SPECIFIC_SERVICES **)&FamilySpecificServices, &AmdParamStruct.StdHeader); FamilySpecificServices->GetTscRate(FamilySpecificServices, &TscRateInMhz, &AmdParamStruct.StdHeader); @@ -309,9 +307,8 @@ AGESA_STATUS agesawrapper_amdinitpost(void) } 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 */ @@ -348,8 +345,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void) } EnvParams = (AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr; status = AmdInitEnv(EnvParams); - if (status != AGESA_SUCCESS) - agesawrapper_amdreadeventlog(EnvParams->StdHeader.HeapStatus); + AGESA_EVENTLOG(status, EnvParams->StdHeader.HeapStatus);
AmdReleaseStruct(&AmdParamStruct); return status; @@ -407,8 +403,7 @@ AGESA_STATUS agesawrapper_amdinitmid(void) return status; } 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; @@ -438,10 +433,9 @@ 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); - ASSERT(Status == AGESA_SUCCESS); - } + AGESA_EVENTLOG(Status, AmdLateParamsPtr->StdHeader.HeapStatus); + ASSERT(Status == AGESA_SUCCESS); + DmiTable = AmdLateParamsPtr->DmiTable; AcpiPstate = AmdLateParamsPtr->AcpiPState; AcpiSrat = AmdLateParamsPtr->AcpiSrat; @@ -485,10 +479,8 @@ 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); - if (Status != AGESA_SUCCESS) { - agesawrapper_amdreadeventlog(AmdLateParams.StdHeader.HeapStatus); - ASSERT(Status <= AGESA_UNSUPPORTED); - } + AGESA_EVENTLOG(Status, AmdLateParams.StdHeader.HeapStatus); + ASSERT((Status == AGESA_SUCCESS) || (Status == AGESA_UNSUPPORTED));
return Status; } diff --git a/src/mainboard/supermicro/h8scm/agesawrapper.c b/src/mainboard/supermicro/h8scm/agesawrapper.c index f738f42..d7a1c23 100644 --- a/src/mainboard/supermicro/h8scm/agesawrapper.c +++ b/src/mainboard/supermicro/h8scm/agesawrapper.c @@ -237,8 +237,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 - if (status != AGESA_SUCCESS) - agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus); + AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus); AmdReleaseStruct(&AmdParamStruct);
return status; @@ -272,8 +271,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void) OemCustomizeInitEarly(AmdEarlyParamsPtr);
status = AmdInitEarly(AmdEarlyParamsPtr); - if (status != AGESA_SUCCESS) - agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus); + AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
GetCpuServicesOfCurrentCore((CONST CPU_SPECIFIC_SERVICES **)&FamilySpecificServices, &AmdParamStruct.StdHeader); FamilySpecificServices->GetTscRate(FamilySpecificServices, &TscRateInMhz, &AmdParamStruct.StdHeader); @@ -309,9 +307,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void) } 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 */ @@ -348,8 +344,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void) } EnvParams = (AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr; status = AmdInitEnv(EnvParams); - if (status != AGESA_SUCCESS) - agesawrapper_amdreadeventlog(EnvParams->StdHeader.HeapStatus); + AGESA_EVENTLOG(status, EnvParams->StdHeader.HeapStatus);
AmdReleaseStruct(&AmdParamStruct); return status; @@ -407,8 +402,7 @@ AGESA_STATUS agesawrapper_amdinitmid(void) return status; } 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; @@ -438,10 +432,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); - ASSERT(Status == AGESA_SUCCESS); - } + AGESA_EVENTLOG(Status, AmdLateParamsPtr->StdHeader.HeapStatus); + ASSERT(Status == AGESA_SUCCESS); DmiTable = AmdLateParamsPtr->DmiTable; AcpiPstate = AmdLateParamsPtr->AcpiPState; AcpiSrat = AmdLateParamsPtr->AcpiSrat; @@ -485,10 +477,8 @@ 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); - if (Status != AGESA_SUCCESS) { - agesawrapper_amdreadeventlog(AmdLateParams.StdHeader.HeapStatus); - ASSERT(Status <= AGESA_UNSUPPORTED); - } + AGESA_EVENTLOG(Status, AmdLateParams.StdHeader.HeapStatus); + ASSERT((Status == AGESA_SUCCESS) || (Status == AGESA_UNSUPPORTED));
return Status; } diff --git a/src/mainboard/tyan/s8226/agesawrapper.c b/src/mainboard/tyan/s8226/agesawrapper.c index 4cc8e18..36aa35a 100644 --- a/src/mainboard/tyan/s8226/agesawrapper.c +++ b/src/mainboard/tyan/s8226/agesawrapper.c @@ -244,8 +244,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 - if (status != AGESA_SUCCESS) - agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus); + AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus); AmdReleaseStruct(&AmdParamStruct);
return status; @@ -279,8 +278,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void) OemCustomizeInitEarly(AmdEarlyParamsPtr);
status = AmdInitEarly(AmdEarlyParamsPtr); - if (status != AGESA_SUCCESS) - agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus); + AGESA_EVENTLOG(status, AmdParamStruct.StdHeader.HeapStatus);
GetCpuServicesOfCurrentCore((CONST CPU_SPECIFIC_SERVICES **)&FamilySpecificServices, &AmdParamStruct.StdHeader); FamilySpecificServices->GetTscRate(FamilySpecificServices, &TscRateInMhz, &AmdParamStruct.StdHeader); @@ -316,9 +314,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void) } 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 */ @@ -355,8 +351,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void) } EnvParams = (AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr; status = AmdInitEnv(EnvParams); - if (status != AGESA_SUCCESS) - agesawrapper_amdreadeventlog(EnvParams->StdHeader.HeapStatus); + AGESA_EVENTLOG(status, EnvParams->StdHeader.HeapStatus);
AmdReleaseStruct(&AmdParamStruct); return status; @@ -414,8 +409,7 @@ AGESA_STATUS agesawrapper_amdinitmid(void) return status; } 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; @@ -445,10 +439,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); - ASSERT(Status == AGESA_SUCCESS); - } + AGESA_EVENTLOG(Status, AmdLateParamsPtr->StdHeader.HeapStatus); + ASSERT(Status == AGESA_SUCCESS); DmiTable = AmdLateParamsPtr->DmiTable; AcpiPstate = AmdLateParamsPtr->AcpiPState; AcpiSrat = AmdLateParamsPtr->AcpiSrat; @@ -492,10 +484,8 @@ 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); - if (Status != AGESA_SUCCESS) { - agesawrapper_amdreadeventlog(AmdLateParams.StdHeader.HeapStatus); - ASSERT(Status <= AGESA_UNSUPPORTED); - } + AGESA_EVENTLOG(Status, AmdLateParams.StdHeader.HeapStatus); + ASSERT((Status == AGESA_SUCCESS) || (Status == AGESA_UNSUPPORTED));
return Status; } diff --git a/src/northbridge/amd/agesa/agesawrapper.h b/src/northbridge/amd/agesa/agesawrapper.h index 72c9673..b18f43d 100644 --- a/src/northbridge/amd/agesa/agesawrapper.h +++ b/src/northbridge/amd/agesa/agesawrapper.h @@ -23,6 +23,7 @@ #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 diff --git a/src/northbridge/amd/agesa/agesawrapper_call.h b/src/northbridge/amd/agesa/agesawrapper_call.h index 792c3b1..0ddeb76 100644 --- a/src/northbridge/amd/agesa/agesawrapper_call.h +++ b/src/northbridge/amd/agesa/agesawrapper_call.h @@ -59,4 +59,13 @@ static inline u32 do_agesawrapper(AGESA_STATUS (*func)(void), const char *name)
#define AGESAWRAPPER_PRE_CONSOLE(func) agesawrapper_ ## func()
+#if CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY12 || CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY14 || CONFIG_BOARD_AMD_DINAR + /* TODO: These families do not pass valid HeapStatus. */ +#define AGESA_EVENTLOG(status) \ + if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog() +#else +#define AGESA_EVENTLOG(status, heapstatus) \ + if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(heapstatus) +#endif + #endif