diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-10-21 14:19:04 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-12-03 08:04:53 +0100 |
commit | 27c4edace6ff3246c6b0345300931850d9e7f4bc (patch) | |
tree | 4b66f94b7bb04ab298a96bb13027c6a4dc17fcd3 /src/mainboard/tyan/s8226/agesawrapper.c | |
parent | f21c2ac0556eefad4b66a8c39734a431610d9139 (diff) | |
download | coreboot-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/tyan/s8226/agesawrapper.c')
-rw-r--r-- | src/mainboard/tyan/s8226/agesawrapper.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/src/mainboard/tyan/s8226/agesawrapper.c b/src/mainboard/tyan/s8226/agesawrapper.c index 4cc8e182c1..36aa35a33f 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; } |