diff options
author | Prachi Gupta <pragupta@us.ibm.com> | 2015-02-03 19:31:22 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-02-16 16:12:42 -0600 |
commit | 7c5d303237f2bec25b7072ec3119d6d4fef875fc (patch) | |
tree | b5228c9c3e0ce23e0714eb6263d81815c4b6d352 /src/usr | |
parent | 9ae3d4f24ad9af4e8d6e422cc7fab30a87127ec7 (diff) | |
download | talos-hostboot-7c5d303237f2bec25b7072ec3119d6d4fef875fc.tar.gz talos-hostboot-7c5d303237f2bec25b7072ec3119d6d4fef875fc.zip |
Skipping over readTOC if hostInterface for pnor_read/write doesn't exist
Change-Id: I7c94df2262e29bddafaaba34e5e00ecd35ac5c13
CQ: SW293755
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15542
Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/pnor/runtime/rt_pnor.C | 50 | ||||
-rw-r--r-- | src/usr/util/runtime/test/testlidmgr_rt.H | 7 |
2 files changed, 31 insertions, 26 deletions
diff --git a/src/usr/pnor/runtime/rt_pnor.C b/src/usr/pnor/runtime/rt_pnor.C index c61aa1d2d..f616e9874 100644 --- a/src/usr/pnor/runtime/rt_pnor.C +++ b/src/usr/pnor/runtime/rt_pnor.C @@ -588,31 +588,35 @@ errlHndl_t RtPnor::readTOC () break; } - // @TODO RTC:120733 - // RT code needs a way to get the active side tocs vs just defaulting - // to SIDE_A - l_err = readFromDevice (l_procId, PNOR::TOC, PNOR::SIDE_A_TOC_0_OFFSET, - PAGESIZE,false,toc0Buffer); - if (l_err) - { - TRACFCOMP(g_trac_pnor,"RtPnor::readTOC:readFromDevice failed" - " for TOC0"); - break; - } - l_err = readFromDevice (l_procId, PNOR::TOC, PNOR::SIDE_A_TOC_1_OFFSET, - PAGESIZE, false,toc1Buffer); - if (l_err) + if (g_hostInterfaces && g_hostInterfaces->pnor_read) { - TRACFCOMP(g_trac_pnor, "RtPnor::readTOC:readFromDevice failed" - " for TOC1"); - break; - } + //@TODO RTC:120733 + //RT code needs a way to get the active side tocs vs just defaulting + //to SIDE_A + l_err = readFromDevice(l_procId,PNOR::TOC,PNOR::SIDE_A_TOC_0_OFFSET, + PAGESIZE,false,toc0Buffer); + if (l_err) + { + TRACFCOMP(g_trac_pnor,"RtPnor::readTOC:readFromDevice failed" + " for TOC0"); + break; + } - l_err = PNOR::parseTOC(toc0Buffer, toc1Buffer, iv_TOC_used, iv_TOC, 0); - if (l_err) - { - TRACFCOMP(g_trac_pnor, "RtPnor::readTOC: parseTOC failed"); - break; + l_err = readFromDevice(l_procId,PNOR::TOC,PNOR::SIDE_A_TOC_1_OFFSET, + PAGESIZE, false,toc1Buffer); + if (l_err) + { + TRACFCOMP(g_trac_pnor, "RtPnor::readTOC:readFromDevice failed" + " for TOC1"); + break; + } + + l_err = PNOR::parseTOC(toc0Buffer,toc1Buffer,iv_TOC_used,iv_TOC,0); + if (l_err) + { + TRACFCOMP(g_trac_pnor, "RtPnor::readTOC: parseTOC failed"); + break; + } } } while (0); diff --git a/src/usr/util/runtime/test/testlidmgr_rt.H b/src/usr/util/runtime/test/testlidmgr_rt.H index 451468422..d869e3c81 100644 --- a/src/usr/util/runtime/test/testlidmgr_rt.H +++ b/src/usr/util/runtime/test/testlidmgr_rt.H @@ -26,6 +26,7 @@ #include <cxxtest/TestSuite.H> #include <errl/errlmanager.H> #include <utilbase.H> +#include <config.h> class LidMgrRtTest : public CxxTest::TestSuite { @@ -64,11 +65,11 @@ class LidMgrRtTest : public CxxTest::TestSuite PNOR::SectionInfo_t l_lidPnorInfo; l_errl = PNOR::getSectionInfo(PNOR::TEST, l_lidPnorInfo); - // Section only present in openPOWER systems if (l_errl) { - delete l_errl; - l_errl = NULL; + errlCommit(l_errl,UTIL_COMP_ID); + TS_FAIL("testLidInPnor: Error getting lidId=0x%.8x", + Util::TEST_LIDID); break; } |