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/supermicro | |
parent | f21c2ac0556eefad4b66a8c39734a431610d9139 (diff) |
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/supermicro')
-rw-r--r-- | src/mainboard/supermicro/h8qgi/agesawrapper.c | 30 | ||||
-rw-r--r-- | src/mainboard/supermicro/h8scm/agesawrapper.c | 28 |
2 files changed, 20 insertions, 38 deletions
diff --git a/src/mainboard/supermicro/h8qgi/agesawrapper.c b/src/mainboard/supermicro/h8qgi/agesawrapper.c index 6facc19bab..30bb996da8 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 f738f42052..d7a1c23588 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; } |