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/asrock/imb-a180 | |
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/asrock/imb-a180')
-rw-r--r-- | src/mainboard/asrock/imb-a180/agesawrapper.c | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/src/mainboard/asrock/imb-a180/agesawrapper.c b/src/mainboard/asrock/imb-a180/agesawrapper.c index 8c24a7f9bf..62fc0531e0 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", |