diff options
author | Mike Baiocchi <baiocchi@us.ibm.com> | 2014-10-14 11:23:37 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-10-31 10:00:20 -0500 |
commit | acd26bc5132d001051405e408f724fc6a1c7088b (patch) | |
tree | 5001e23e021a261871456304dc672679fa952905 | |
parent | 2e8ca6f64615f69f41db15b01342fc3dff873d6c (diff) | |
download | talos-hostboot-acd26bc5132d001051405e408f724fc6a1c7088b.tar.gz talos-hostboot-acd26bc5132d001051405e408f724fc6a1c7088b.zip |
Improve FAPI Bus Callouts (working/830)
When FAPI calls out a bus an additional procedure callout is made and
there are changes in priorities of other items being called out.
This commit covers the working/830 change.
Change-Id: I3f265371436be100124b8ec97d808d2295ea59db
CQ: SW263291
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13974
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r-- | src/include/usr/hwpf/fapi/fapiErrorInfo.H | 7 | ||||
-rw-r--r-- | src/usr/hwpf/fapi/fapiReturnCode.C | 24 | ||||
-rw-r--r-- | src/usr/hwpf/plat/fapiPlatHwpInvoker.C | 3 | ||||
-rw-r--r-- | src/usr/hwpf/test/fapiRcTest.C | 141 | ||||
-rw-r--r-- | src/usr/hwpf/test/fapirctest.H | 38 |
5 files changed, 150 insertions, 63 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiErrorInfo.H b/src/include/usr/hwpf/fapi/fapiErrorInfo.H index 2f2f7f610..4b9d03e24 100644 --- a/src/include/usr/hwpf/fapi/fapiErrorInfo.H +++ b/src/include/usr/hwpf/fapi/fapiErrorInfo.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -20,7 +22,7 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: fapiErrorInfo.H,v 1.13 2014/03/12 00:47:58 whs Exp $ +// $Id: fapiErrorInfo.H,v 1.15 2014/10/27 16:36:24 baiocchi Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiErrorInfo.H,v $ /** @@ -102,6 +104,7 @@ enum ProcedureCallout CODE = 0, // Code problem LVL_SUPPORT = 1, // Call next level of support MEMORY_PLUGGING_ERROR = 2, // DIMM Plugging error + BUS_CALLOUT = 3, // Bus Called Out }; } diff --git a/src/usr/hwpf/fapi/fapiReturnCode.C b/src/usr/hwpf/fapi/fapiReturnCode.C index f8d14ad05..27d23e9be 100644 --- a/src/usr/hwpf/fapi/fapiReturnCode.C +++ b/src/usr/hwpf/fapi/fapiReturnCode.C @@ -22,7 +22,7 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: fapiReturnCode.C,v 1.20 2014/07/23 16:20:32 whs Exp $ +// $Id: fapiReturnCode.C,v 1.21 2014/10/27 15:38:22 baiocchi Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiReturnCode.C,v $ /** @@ -342,7 +342,27 @@ void ReturnCode::addErrorInfo(const void * const * i_pObjects, const Target * l_pTarget2 = static_cast<const Target *>( i_pObjects[l_ep2Index]); - // Add the ErrorInfo + // Add Procedure ErrorInfo section first + ProcedureCallouts::ProcedureCallout l_proc = + ProcedureCallouts::BUS_CALLOUT; + FAPI_DBG("addErrorInfo: Bus Callout: Adding procedure " + "proc: %d, pri: %d", + l_proc, l_pri); + addEIProcedureCallout(l_proc, l_pri); + + // Update priority for bus callout (with targets): + // use priority 1 level down of initial callout priority + if (l_pri == CalloutPriorities::HIGH) + { + l_pri = CalloutPriorities::MEDIUM; + } + else + { + // Medium or low, so set to low + l_pri = CalloutPriorities::LOW; + } + + // Add the Bus Callout ErrorInfo section next with updated priority FAPI_DBG("addErrorInfo: Adding bus callout, pri: %d", l_pri); addEIBusCallout(*l_pTarget1, *l_pTarget2, l_pri); } diff --git a/src/usr/hwpf/plat/fapiPlatHwpInvoker.C b/src/usr/hwpf/plat/fapiPlatHwpInvoker.C index 02188ab8a..7bf801828 100644 --- a/src/usr/hwpf/plat/fapiPlatHwpInvoker.C +++ b/src/usr/hwpf/plat/fapiPlatHwpInvoker.C @@ -121,7 +121,8 @@ HWAS::epubProcedureID xlateProcedureCallout( const HWAS::epubProcedureID HWAS_PROC[] = { HWAS::EPUB_PRC_HB_CODE, HWAS::EPUB_PRC_LVL_SUPP, - HWAS::EPUB_PRC_MEMORY_PLUGGING_ERROR}; + HWAS::EPUB_PRC_MEMORY_PLUGGING_ERROR, + HWAS::EPUB_PRC_EIBUS_ERROR}; if (l_index < (sizeof(HWAS_PROC)/sizeof(HWAS::epubProcedureID))) { diff --git a/src/usr/hwpf/test/fapiRcTest.C b/src/usr/hwpf/test/fapiRcTest.C index 63552982e..abed12a5c 100644 --- a/src/usr/hwpf/test/fapiRcTest.C +++ b/src/usr/hwpf/test/fapiRcTest.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -20,6 +22,8 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ +// $Id: fapiRcTest.C,v 1.10 2014/10/27 17:55:42 baiocchi Exp $ +// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapiTest/fapiRcTest.C,v $ /** * @file fapiTargetTest.C * @@ -632,7 +636,8 @@ uint32_t rcTest12() l_entries[2].iv_type = fapi::ReturnCode::EI_TYPE_BUS_CALLOUT; l_entries[2].bus_callout.iv_endpoint1ObjIndex = 1; l_entries[2].bus_callout.iv_endpoint2ObjIndex = 2; - l_entries[2].bus_callout.iv_calloutPriority = fapi::CalloutPriorities::LOW; + l_entries[2].bus_callout.iv_calloutPriority = + fapi::CalloutPriorities::MEDIUM; l_entries[3].iv_type = fapi::ReturnCode::EI_TYPE_CDG; l_entries[3].target_cdg.iv_targetObjIndex = 1; l_entries[3].target_cdg.iv_callout = 1; @@ -739,7 +744,8 @@ uint32_t rcTest12() break; } - if (l_pErrInfo->iv_procedureCallouts.size() != 1) + // Additional procedure called out due to Bus Callout + if (l_pErrInfo->iv_procedureCallouts.size() != 2) { FAPI_ERR("rcTest12. %d proc-callouts", l_pErrInfo->iv_procedureCallouts.size()); @@ -750,7 +756,7 @@ uint32_t rcTest12() if (l_pErrInfo->iv_procedureCallouts[0]->iv_procedure != ProcedureCallouts::CODE) { - FAPI_ERR("rcTest12. procedure callout mismatch (%d)", + FAPI_ERR("rcTest12. procedure callout[0] mismatch (%d)", l_pErrInfo->iv_procedureCallouts[0]->iv_procedure); l_result = 12; break; @@ -759,31 +765,49 @@ uint32_t rcTest12() if (l_pErrInfo->iv_procedureCallouts[0]->iv_calloutPriority != CalloutPriorities::MEDIUM) { - FAPI_ERR("rcTest12. procedure callout priority mismatch (%d)", + FAPI_ERR("rcTest12. procedure callout[0] priority mismatch (%d)", l_pErrInfo->iv_procedureCallouts[0]->iv_calloutPriority); l_result = 13; break; } + if (l_pErrInfo->iv_procedureCallouts[1]->iv_procedure != + ProcedureCallouts::BUS_CALLOUT) + { + FAPI_ERR("rcTest12. procedure callout[1] mismatch (%d)", + l_pErrInfo->iv_procedureCallouts[1]->iv_procedure); + l_result = 14; + break; + } + + if (l_pErrInfo->iv_procedureCallouts[1]->iv_calloutPriority != + CalloutPriorities::MEDIUM) + { + FAPI_ERR("rcTest12. procedure callout[1] priority mismatch (%d)", + l_pErrInfo->iv_procedureCallouts[1]->iv_calloutPriority); + l_result = 15; + break; + } + if (l_pErrInfo->iv_busCallouts.size() != 1) { FAPI_ERR("rcTest12. %d bus-callouts", l_pErrInfo->iv_busCallouts.size()); - l_result = 14; + l_result = 16; break; } if (l_pErrInfo->iv_busCallouts[0]->iv_target1 != l_target) { FAPI_ERR("rcTest12. bus target mismatch 1"); - l_result = 15; + l_result = 17; break; } if (l_pErrInfo->iv_busCallouts[0]->iv_target2 != l_target2) { FAPI_ERR("rcTest12. bus target mismatch 2"); - l_result = 16; + l_result = 18; break; } @@ -792,7 +816,7 @@ uint32_t rcTest12() { FAPI_ERR("rcTest12. bus callout priority mismatch (%d)", l_pErrInfo->iv_busCallouts[0]->iv_calloutPriority); - l_result = 17; + l_result = 19; break; } @@ -800,14 +824,14 @@ uint32_t rcTest12() { FAPI_ERR("rcTest12. %d children-cdgs", l_pErrInfo->iv_childrenCDGs.size()); - l_result = 18; + l_result = 20; break; } if (l_pErrInfo->iv_childrenCDGs[0]->iv_parent != l_target) { FAPI_ERR("rcTest12. parent chip mismatch"); - l_result = 19; + l_result = 21; break; } @@ -816,7 +840,7 @@ uint32_t rcTest12() { FAPI_ERR("rcTest12. child type mismatch (0x%08x)", l_pErrInfo->iv_childrenCDGs[0]->iv_childType); - l_result = 20; + l_result = 22; break; } @@ -825,28 +849,28 @@ uint32_t rcTest12() { FAPI_ERR("rcTest12. child cdg priority mismatch (%d)", l_pErrInfo->iv_childrenCDGs[0]->iv_calloutPriority); - l_result = 21; + l_result = 23; break; } if (l_pErrInfo->iv_childrenCDGs[0]->iv_callout != false) { FAPI_ERR("rcTest12. child cdg callout set"); - l_result = 22; + l_result = 24; break; } if (l_pErrInfo->iv_childrenCDGs[0]->iv_deconfigure != true) { FAPI_ERR("rcTest12. child cdg deconfigure not set"); - l_result = 23; + l_result = 25; break; } if (l_pErrInfo->iv_childrenCDGs[0]->iv_gard != false) { FAPI_ERR("rcTest12. child cdg GARD set"); - l_result = 24; + l_result = 26; break; } @@ -854,7 +878,7 @@ uint32_t rcTest12() { FAPI_ERR("rcTest12. %d hw-callouts", l_pErrInfo->iv_hwCallouts.size()); - l_result = 25; + l_result = 27; break; } @@ -863,7 +887,7 @@ uint32_t rcTest12() { FAPI_ERR("rcTest12. hw callout mismatch (%d)", l_pErrInfo->iv_hwCallouts[0]->iv_hw); - l_result = 26; + l_result = 28; break; } @@ -872,7 +896,7 @@ uint32_t rcTest12() { FAPI_ERR("rcTest12. hw callout priority mismatch (%d)", l_pErrInfo->iv_hwCallouts[0]->iv_calloutPriority); - l_result = 27; + l_result = 29; break; } @@ -1330,7 +1354,8 @@ uint32_t rcTest16() break; } - if (l_pErrInfo->iv_procedureCallouts.size() != 2) + // Additional procedures called out due to Bus Callout + if (l_pErrInfo->iv_procedureCallouts.size() != 4) { FAPI_ERR("rcTest16. %d proc-callouts", l_pErrInfo->iv_procedureCallouts.size()); @@ -1374,25 +1399,61 @@ uint32_t rcTest16() break; } + if (l_pErrInfo->iv_procedureCallouts[2]->iv_procedure != + ProcedureCallouts::BUS_CALLOUT) + { + FAPI_ERR("rcTest16. procedure[2] callout mismatch (%d)", + l_pErrInfo->iv_procedureCallouts[2]->iv_procedure); + l_result = 23; + break; + } + + if (l_pErrInfo->iv_procedureCallouts[2]->iv_calloutPriority != + CalloutPriorities::LOW) + { + FAPI_ERR("rcTest16. procedure[2] callout priority mismatch (%d)", + l_pErrInfo->iv_procedureCallouts[2]->iv_calloutPriority); + l_result = 24; + break; + } + + if (l_pErrInfo->iv_procedureCallouts[3]->iv_procedure != + ProcedureCallouts::BUS_CALLOUT) + { + FAPI_ERR("rcTest16. procedure[3] callout mismatch (%d)", + l_pErrInfo->iv_procedureCallouts[3]->iv_procedure); + l_result = 25; + break; + } + + if (l_pErrInfo->iv_procedureCallouts[3]->iv_calloutPriority != + CalloutPriorities::HIGH) + { + FAPI_ERR("rcTest16. procedure[3] callout priority mismatch (%d)", + l_pErrInfo->iv_procedureCallouts[3]->iv_calloutPriority); + l_result = 26; + break; + } + if (l_pErrInfo->iv_busCallouts.size() != 2) { FAPI_ERR("rcTest16. %d bus-callouts", l_pErrInfo->iv_busCallouts.size()); - l_result = 23; + l_result = 27; break; } if (l_pErrInfo->iv_busCallouts[0]->iv_target1 != l_target) { FAPI_ERR("rcTest16. bus target mismatch 1"); - l_result = 24; + l_result = 28; break; } if (l_pErrInfo->iv_busCallouts[0]->iv_target2 != l_target2) { FAPI_ERR("rcTest16. bus target mismatch 2"); - l_result = 25; + l_result = 29; break; } @@ -1401,30 +1462,30 @@ uint32_t rcTest16() { FAPI_ERR("rcTest16. bus callout priority mismatch 1 (%d)", l_pErrInfo->iv_busCallouts[0]->iv_calloutPriority); - l_result = 26; + l_result = 30; break; } if (l_pErrInfo->iv_busCallouts[1]->iv_target1 != l_target) { FAPI_ERR("rcTest16. bus target mismatch 3"); - l_result = 27; + l_result = 31; break; } if (l_pErrInfo->iv_busCallouts[1]->iv_target2 != l_target2) { FAPI_ERR("rcTest16. bus target mismatch 4"); - l_result = 28; + l_result = 32; break; } if (l_pErrInfo->iv_busCallouts[1]->iv_calloutPriority != - CalloutPriorities::HIGH) + CalloutPriorities::MEDIUM) { FAPI_ERR("rcTest16. bus callout priority mismatch 2 (%d)", l_pErrInfo->iv_busCallouts[1]->iv_calloutPriority); - l_result = 29; + l_result = 33; break; } @@ -1432,14 +1493,14 @@ uint32_t rcTest16() { FAPI_ERR("rcTest16. %d children-cdgs", l_pErrInfo->iv_childrenCDGs.size()); - l_result = 30; + l_result = 34; break; } if (l_pErrInfo->iv_childrenCDGs[0]->iv_parent != l_target) { FAPI_ERR("rcTest16. parent chip mismatch 1"); - l_result = 31; + l_result = 35; break; } @@ -1448,7 +1509,7 @@ uint32_t rcTest16() { FAPI_ERR("rcTest16. child type mismatch 1 (0x%08x)", l_pErrInfo->iv_childrenCDGs[0]->iv_childType); - l_result = 32; + l_result = 36; break; } @@ -1457,28 +1518,28 @@ uint32_t rcTest16() { FAPI_ERR("rcTest16. child cdg priority mismatch 1 (%d)", l_pErrInfo->iv_childrenCDGs[0]->iv_calloutPriority); - l_result = 33; + l_result = 37; break; } if (l_pErrInfo->iv_childrenCDGs[0]->iv_callout != true) { FAPI_ERR("rcTest16. child cdg callout not set 1"); - l_result = 34; + l_result = 38; break; } if (l_pErrInfo->iv_childrenCDGs[0]->iv_deconfigure != true) { FAPI_ERR("rcTest16. child cdg deconfigure not set 1"); - l_result = 35; + l_result = 39; break; } if (l_pErrInfo->iv_childrenCDGs[0]->iv_gard != false) { FAPI_ERR("rcTest16. child cdg GARD set 1"); - l_result = 36; + l_result = 40; break; } @@ -1487,7 +1548,7 @@ uint32_t rcTest16() { FAPI_ERR("rcTest16. child type mismatch 2 (0x%08x)", l_pErrInfo->iv_childrenCDGs[1]->iv_childType); - l_result = 37; + l_result = 41; break; } @@ -1496,28 +1557,28 @@ uint32_t rcTest16() { FAPI_ERR("rcTest16. child cdg priority mismatch 2 (%d)", l_pErrInfo->iv_childrenCDGs[1]->iv_calloutPriority); - l_result = 38; + l_result = 42; break; } if (l_pErrInfo->iv_childrenCDGs[1]->iv_callout != true) { FAPI_ERR("rcTest16. child cdg callout not set 2"); - l_result = 39; + l_result = 43; break; } if (l_pErrInfo->iv_childrenCDGs[1]->iv_deconfigure != false) { FAPI_ERR("rcTest16. child cdg deconfigure set 2"); - l_result = 40; + l_result = 44; break; } if (l_pErrInfo->iv_childrenCDGs[1]->iv_gard != true) { FAPI_ERR("rcTest16. child cdg GARD not set 2"); - l_result = 41; + l_result = 45; break; } diff --git a/src/usr/hwpf/test/fapirctest.H b/src/usr/hwpf/test/fapirctest.H index f90740327..cd4c95999 100644 --- a/src/usr/hwpf/test/fapirctest.H +++ b/src/usr/hwpf/test/fapirctest.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -48,7 +50,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc1. Fail"); + TS_FAIL("testRc1. Fail l_res=%d", l_res); } } @@ -62,7 +64,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc2. Fail"); + TS_FAIL("testRc2. Fail l_res=%d", l_res); } } @@ -75,7 +77,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc3. Fail"); + TS_FAIL("testRc3. Fail l_res=%d", l_res); } return; } @@ -89,7 +91,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc4. Fail"); + TS_FAIL("testRc4. Fail l_res=%d", l_res); } return; } @@ -103,7 +105,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc5. Fail"); + TS_FAIL("testRc5. Fail l_res=%d", l_res); } return; } @@ -117,7 +119,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc6. Fail"); + TS_FAIL("testRc6. Fail l_res=%d", l_res); } return; } @@ -131,7 +133,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc7. Fail"); + TS_FAIL("testRc7. Fail l_res=%d", l_res); } return; } @@ -145,7 +147,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc8. Fail"); + TS_FAIL("testRc8. Fail l_res=%d", l_res); } } @@ -158,7 +160,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc9. Fail"); + TS_FAIL("testRc9. Fail l_res=%d", l_res); } return; } @@ -172,7 +174,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc10. Fail"); + TS_FAIL("testRc10. Fail l_res=%d", l_res); } return; } @@ -186,7 +188,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc11. Fail"); + TS_FAIL("testRc11. Fail l_res=%d", l_res); } } @@ -200,7 +202,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc12. Fail"); + TS_FAIL("testRc12. Fail l_res=%d", l_res); } } @@ -213,7 +215,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc13. Fail"); + TS_FAIL("testRc13. Fail l_res=%d", l_res); } return; } @@ -227,7 +229,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc14. Fail"); + TS_FAIL("testRc14. Fail l_res=%d", l_res); } return; } @@ -241,7 +243,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc15. Fail"); + TS_FAIL("testRc15. Fail l_res=%d", l_res); } return; } @@ -255,7 +257,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc16. Fail"); + TS_FAIL("testRc16. Fail l_res=%d", l_res); } return; } @@ -269,7 +271,7 @@ public: if (l_res != 0) { - TS_FAIL("testRc17. Fail"); + TS_FAIL("testRc17. Fail l_res=%d", l_res); } return; } |