diff options
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C | 11 | ||||
-rw-r--r-- | src/usr/dump/test/dumptest.H | 140 | ||||
-rw-r--r-- | src/usr/errl/parser/errlparser.C | 17 | ||||
-rwxr-xr-x | src/usr/i2c/i2c.C | 4 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/istepdispatcher.C | 3 | ||||
-rw-r--r-- | src/usr/runtime/test/runtimeattrstest.H | 4 | ||||
-rw-r--r-- | src/usr/targeting/common/test/testcommontargeting.H | 29 | ||||
-rw-r--r-- | src/usr/testcore/kernel/vmmbasetest.H | 6 | ||||
-rw-r--r-- | src/usr/testcore/kernel/vmmpagetest.H | 6 |
9 files changed, 110 insertions, 110 deletions
diff --git a/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C b/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C index df840f91f..f26501364 100644 --- a/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C +++ b/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C @@ -137,12 +137,9 @@ errlHndl_t RuleMetaData::loadRuleFile( ScanFacility & i_scanFactory , RegMap_t l_regMap; Reset_t l_resetMap; ResetAndMaskPair l_currentResets; - uint32_t l_regMax = 0; uint32_t l_vregMax = 0; - uint32_t l_groupMax = 0; ActionMap_t l_actionMap; GroupMap_t l_groupMap; - uint32_t l_actionMax = 0; uint32_t l_id = 1; errlHndl_t l_errl = NULL ; SharedThreshold_t l_sharedThresholds; @@ -255,7 +252,7 @@ errlHndl_t RuleMetaData::loadRuleFile( ScanFacility & i_scanFactory , cv_hwCaptureGroups[1].push_back(l_regMap[l_id]); } - l_regMax = l_id++; + l_id++; } @@ -286,21 +283,21 @@ errlHndl_t RuleMetaData::loadRuleFile( ScanFacility & i_scanFactory , { iv_groupList.push_back( new Group( l_defaultResolution ) ); l_groupMap[l_id] = iv_groupList.back(); - l_groupMax = l_id++; + l_id++; }; for (int i = 0; i < l_chip->cv_actionCount; i++) { if (l_actionMap[i]) { - l_actionMax = l_id++; + l_id++; continue; } // createActionClass will add to the actionMap. this->createActionClass(i, l_localData); //l_actionMap[l_id] = l_tmp; - l_actionMax = l_id++; + l_id++; } for (int i = 0; i < l_chip->cv_groupCount; i++) diff --git a/src/usr/dump/test/dumptest.H b/src/usr/dump/test/dumptest.H index 7b9d16385..b3c21608a 100644 --- a/src/usr/dump/test/dumptest.H +++ b/src/usr/dump/test/dumptest.H @@ -126,19 +126,19 @@ class DumpTest: public CxxTest::TestSuite DUMP_TEST_DST_DATA_AREA + 192, 64}; - // Point to the location of the src Data pointer. - uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr); + // Point to the location of the src Data pointer. + uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr); - // Point to the location of the dest Data pointer. - uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr); + // Point to the location of the dest Data pointer. + uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr); uint64_t *resultTablePtr = reinterpret_cast<uint64_t *>(resultsTableAddr); - // Put the src addresses defined above into the MDST - memcpy(srcTablePtr, src_data, sizeof(src_data)); + // Put the src addresses defined above into the MDST + memcpy(srcTablePtr, src_data, sizeof(src_data)); - // Put the src addresses defined above into the MDDT - memcpy(dstTablePtr, dst_data, sizeof(dst_data)); + // Put the src addresses defined above into the MDDT + memcpy(dstTablePtr, dst_data, sizeof(dst_data)); // Need to memory map uint64_t src_Inputdata[4][8] = { @@ -179,19 +179,19 @@ class DumpTest: public CxxTest::TestSuite for (int i = 0; i<4; i++) { - + // Get the Va for the page aligned Physical address va_mapsrcTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[index])), THIRTYTWO_GB)); - // copy the mapped VA to a VA pointer we will + // copy the mapped VA to a VA pointer we will va_srcTableAddr = va_mapsrcTableAddr; // calculate offset based on page alignment. offset = src_data[index] - ALIGN_PAGE_DOWN(src_data[index]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_srcTableAddr += (offset/(sizeof (uint64_t))); memcpy(va_srcTableAddr, src_Inputdata[i], sizeof(src_Inputdata[i])); @@ -240,13 +240,13 @@ class DumpTest: public CxxTest::TestSuite static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])), THIRTYTWO_GB)); - // copy the mapped VA to a VA pointer we will + // copy the mapped VA to a VA pointer we will va_destTableAddr = va_mapdestTableAddr; // calculate offset based on page alignment. offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_destTableAddr += (offset/(sizeof (uint64_t))); uint64_t paddr = mm_virt_to_phys(va_destTableAddr); @@ -259,7 +259,7 @@ class DumpTest: public CxxTest::TestSuite } - // Check the destination table. + // Check the destination table. int src_rc = memcmp(va_destTableAddr,src_Inputdata[i],sizeof(src_Inputdata[i])); if (src_rc!=0) @@ -284,7 +284,7 @@ class DumpTest: public CxxTest::TestSuite } - // Check the results table. + // Check the results table. int result_rc = memcmp(resultTablePtr,result_data,sizeof (result_data)); if (result_rc!=0) @@ -299,7 +299,7 @@ class DumpTest: public CxxTest::TestSuite /** * @brief Basic dump test that has sequential src addresses to - * imbalanced destination locations and sizes. + * imbalanced destination locations and sizes. * */ void test_DumpCollectUnevenDest(void) @@ -337,12 +337,12 @@ class DumpTest: public CxxTest::TestSuite DUMP_TEST_DST_DATA_AREA+1024 + 96, 32, // 4600480 DUMP_TEST_DST_DATA_AREA+1024+ 128, 128}; // 46004C0 - uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr); - uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr); + uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr); + uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr); uint64_t *resultTablePtr = reinterpret_cast<uint64_t *>(resultsTableAddr); - memcpy(srcTablePtr, src_data, sizeof(src_data)); - memcpy(dstTablePtr, dst_data, sizeof(dst_data)); + memcpy(srcTablePtr, src_data, sizeof(src_data)); + memcpy(dstTablePtr, dst_data, sizeof(dst_data)); // Need to memory map @@ -365,7 +365,7 @@ class DumpTest: public CxxTest::TestSuite {0xdddddddddddddddd, 0xdddddddddddddddd, 0xdddddddddddddddd, 0xdddddddddddddddd, 0xdddddddddddddddd, 0xdddddddddddddddd, - 0xdddddddddddddddd, 0xdddddddddddddddd}, + 0xdddddddddddddddd, 0xdddddddddddddddd}, }; // results output data expected @@ -383,19 +383,19 @@ class DumpTest: public CxxTest::TestSuite int index = 0; for (int i = 0; i<4; i++) - { + { // Get the Va for the page aligned Physical address va_mapsrcTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[index])), THIRTYTWO_GB)); - // copy the mapped VA to a VA pointer + // copy the mapped VA to a VA pointer va_srcTableAddr = va_mapsrcTableAddr; // calculate offset based on page alignment. offset = src_data[index] - ALIGN_PAGE_DOWN(src_data[index]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_srcTableAddr += (offset/(sizeof (uint64_t))); memcpy(va_srcTableAddr, src_Inputdata[i], sizeof(src_Inputdata[i])); @@ -432,7 +432,7 @@ class DumpTest: public CxxTest::TestSuite } //---------------------------------------------------------------- - // !!!!! VERIFYING RESULTS + // !!!!! VERIFYING RESULTS // Verify that the data and the VA mapping is correct. //-------------------------------------------------------------- do @@ -453,13 +453,13 @@ class DumpTest: public CxxTest::TestSuite // Get the Va for the page aligned Physical address va_mapdestTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),THIRTYTWO_GB)); - // copy the mapped VA to a VA pointer we will + // copy the mapped VA to a VA pointer we will va_destTableAddr = va_mapdestTableAddr; // calculate offset based on page alignment. offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_destTableAddr += (offset/(sizeof (uint64_t))); paddr = mm_virt_to_phys(va_destTableAddr); @@ -479,7 +479,7 @@ class DumpTest: public CxxTest::TestSuite } else { - // Check the destination table. + // Check the destination table. src_rc = memcmp(va_destTableAddr,src_Inputdata[i],dst_data[index+1]); } @@ -511,13 +511,13 @@ class DumpTest: public CxxTest::TestSuite // Get the Va for the page aligned Physical address va_mapdestTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),THIRTYTWO_GB)); - // copy the mapped VA to a VA pointer we will + // copy the mapped VA to a VA pointer we will va_destTableAddr = va_mapdestTableAddr; // calculate offset based on page alignment. offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_destTableAddr += (offset/(sizeof (uint64_t))); paddr = mm_virt_to_phys(va_destTableAddr); @@ -532,12 +532,12 @@ class DumpTest: public CxxTest::TestSuite int dataentries = (dst_data[index+1]/16); - // start with 3rd src index.. + // start with 3rd src index.. int i = 2; // Src Data input. int dataIndex = 0; - // Now loop through the data at this memory address and compare it to the data + // Now loop through the data at this memory address and compare it to the data for (int j = 0; j<dataentries; j++) { if (va_destTableAddr[j] != src_Inputdata[i][dataIndex]) @@ -576,7 +576,7 @@ class DumpTest: public CxxTest::TestSuite }while(0); - // Check the results table. + // Check the results table. int result_rc = memcmp(resultTablePtr,result_data,sizeof (result_data)); if (result_rc!=0) @@ -585,7 +585,7 @@ class DumpTest: public CxxTest::TestSuite TS_FAIL( "DumpTest::DumpCollectUnevenDest ERROR : Unexpected error data mismatch in results table" ); } - + TRACFCOMP( g_trac_dump, "dumpTest::test_dumpCollectUnevenDest COMPLETE" ); } @@ -638,12 +638,12 @@ class DumpTest: public CxxTest::TestSuite DUMP_TEST_DST_DATA_AREA+3072+64, 128}; // 4600C40 - uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr); - uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr); + uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr); + uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr); uint64_t *resultTablePtr = reinterpret_cast<uint64_t *>(resultsTableAddr); - memcpy(srcTablePtr, src_data, sizeof(src_data)); - memcpy(dstTablePtr, dst_data, sizeof(dst_data)); + memcpy(srcTablePtr, src_data, sizeof(src_data)); + memcpy(dstTablePtr, dst_data, sizeof(dst_data)); // Need to memory map @@ -687,7 +687,7 @@ class DumpTest: public CxxTest::TestSuite offset = src_data[0] - ALIGN_PAGE_DOWN(src_data[0]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_srcTableAddr += (offset/(sizeof (uint64_t))); memcpy(va_srcTableAddr, src_data0, sizeof(src_data0)); @@ -713,7 +713,7 @@ class DumpTest: public CxxTest::TestSuite // calculate offset based on page alignment. offset = src_data[2] - ALIGN_PAGE_DOWN(src_data[2]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_srcTableAddr += (offset/(sizeof (uint64_t))); memcpy(va_srcTableAddr, src_data1, sizeof(src_data1)); @@ -739,7 +739,7 @@ class DumpTest: public CxxTest::TestSuite // calculate offset based on page alignment. offset = src_data[4] - ALIGN_PAGE_DOWN(src_data[4]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_srcTableAddr += (offset/(sizeof (uint64_t))); memcpy(va_srcTableAddr, src_data2, sizeof(src_data2)); @@ -765,7 +765,7 @@ class DumpTest: public CxxTest::TestSuite // calculate offset based on page alignment. offset = src_data[6] - ALIGN_PAGE_DOWN(src_data[6]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_srcTableAddr += (offset/(sizeof (uint64_t))); memcpy(va_srcTableAddr, src_data3, sizeof(src_data3)); @@ -804,7 +804,7 @@ class DumpTest: public CxxTest::TestSuite //---------------------------------------------------------------- - // !!!!! VERIFYING RESULTS + // !!!!! VERIFYING RESULTS // Verify that the data and the VA mapping is correct. //---------------------------------------------------------------- @@ -815,7 +815,6 @@ class DumpTest: public CxxTest::TestSuite uint64_t *va_destTableAddr = 0; offset = 0; int index = 0; - int i = 0; // FIRST Destination ENTRY source entires 0 and 1 !!!! @@ -824,13 +823,13 @@ class DumpTest: public CxxTest::TestSuite static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])), THIRTYTWO_GB)); - // copy the mapped VA to a VA pointer we will + // copy the mapped VA to a VA pointer we will va_destTableAddr = va_mapdestTableAddr; // calculate offset based on page alignment. offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_destTableAddr += (offset/(sizeof (uint64_t))); uint64_t paddr = mm_virt_to_phys(va_destTableAddr); @@ -847,7 +846,7 @@ class DumpTest: public CxxTest::TestSuite int curSrcEntry = 0; - // Now loop through the data at this memory address and compare it to the data + // Now loop through the data at this memory address and compare it to the data for (int j = 0; j<2; j++) { if (va_destTableAddr[j] != src_data0[j]) @@ -864,7 +863,7 @@ class DumpTest: public CxxTest::TestSuite } - // Now loop through the remainder of this destination to a new src data entry + // Now loop through the remainder of this destination to a new src data entry for (int j = 0; j<dataentries; j++) { if (va_destTableAddr[curSrcEntry] != src_data1[j]) @@ -900,13 +899,13 @@ class DumpTest: public CxxTest::TestSuite static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])), THIRTYTWO_GB)); - // copy the mapped VA to a VA pointer we will + // copy the mapped VA to a VA pointer we will va_destTableAddr = va_mapdestTableAddr; // calculate offset based on page alignment. offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_destTableAddr += (offset/(sizeof (uint64_t))); paddr = mm_virt_to_phys(va_destTableAddr); @@ -918,9 +917,8 @@ class DumpTest: public CxxTest::TestSuite } dataentries = (dst_data[index+1]/16); - i = 0; - // Now loop through the data at this memory address and compare it to the data + // Now loop through the data at this memory address and compare it to the data for (int j = 0; j<dataentries; j++) { if (va_destTableAddr[j] != src_data2[j]) @@ -951,13 +949,13 @@ class DumpTest: public CxxTest::TestSuite // Get the Va for the page aligned Physical address va_mapdestTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])),THIRTYTWO_GB)); - // copy the mapped VA to a VA pointer we will + // copy the mapped VA to a VA pointer we will va_destTableAddr = va_mapdestTableAddr; // calculate offset based on page alignment. offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_destTableAddr += (offset/(sizeof (uint64_t))); paddr = mm_virt_to_phys(va_destTableAddr); @@ -969,11 +967,11 @@ class DumpTest: public CxxTest::TestSuite } dataentries = (dst_data[index+1]/16); - + curSrcEntry = 0; - // Now loop through the data at this memory address and compare it to the data + // Now loop through the data at this memory address and compare it to the data for (int j = 0; j<dataentries; j++) { if (va_destTableAddr[j] != src_data3[j]) @@ -1008,13 +1006,13 @@ class DumpTest: public CxxTest::TestSuite static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(dst_data[index])), THIRTYTWO_GB)); - // copy the mapped VA to a VA pointer we will + // copy the mapped VA to a VA pointer we will va_destTableAddr = va_mapdestTableAddr; // calculate offset based on page alignment. offset = dst_data[index] - ALIGN_PAGE_DOWN(dst_data[index]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_destTableAddr += (offset/(sizeof (uint64_t))); paddr = mm_virt_to_phys(va_destTableAddr); @@ -1029,7 +1027,7 @@ class DumpTest: public CxxTest::TestSuite dataentries = (dst_data[index+1]/16); - // Now loop through the data at this memory address and compare it to the data + // Now loop through the data at this memory address and compare it to the data for (int j = 0; j<dataentries; j++) { if (va_destTableAddr[j] != src_data3[curSrcEntry]) @@ -1061,7 +1059,7 @@ class DumpTest: public CxxTest::TestSuite }while(0); - // Check the results table. + // Check the results table. int result_rc = memcmp(resultTablePtr,result_data,sizeof (result_data)); if (result_rc!=0) @@ -1120,20 +1118,20 @@ class DumpTest: public CxxTest::TestSuite uint64_t dst_data[8] = {DUMP_TEST_DST_DATA_AREA+4096, 64, // 4601000 DUMP_TEST_DST_DATA_AREA + 4096 + 64, 64, DUMP_TEST_DST_DATA_AREA + 4096 + 128, 64, - DUMP_TEST_DST_DATA_AREA + 4096 + 192, 32}; // NOTE>> TOO SMALL of a space.. + DUMP_TEST_DST_DATA_AREA + 4096 + 192, 32}; // NOTE>> TOO SMALL of a space.. - // Point to the location of the src Data pointer. - uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr); + // Point to the location of the src Data pointer. + uint64_t *srcTablePtr = reinterpret_cast<uint64_t *>(srcTableAddr); - // Point to the location of the dest Data pointer. - uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr); + // Point to the location of the dest Data pointer. + uint64_t *dstTablePtr = reinterpret_cast<uint64_t *>(dstTableAddr); - // Put the src addresses defined above into the MDST - memcpy(srcTablePtr, src_data, sizeof(src_data)); + // Put the src addresses defined above into the MDST + memcpy(srcTablePtr, src_data, sizeof(src_data)); - // Put the src addresses defined above into the MDDT - memcpy(dstTablePtr, dst_data, sizeof(dst_data)); + // Put the src addresses defined above into the MDDT + memcpy(dstTablePtr, dst_data, sizeof(dst_data)); // Need to memory map @@ -1170,13 +1168,13 @@ class DumpTest: public CxxTest::TestSuite // Get the Va for the page aligned Physical address va_mapsrcTableAddr = static_cast<uint64_t*>(mmio_dev_map(reinterpret_cast<void*>(ALIGN_PAGE_DOWN(src_data[index])),THIRTYTWO_GB)); - // copy the mapped VA to a VA pointer we will + // copy the mapped VA to a VA pointer we will va_srcTableAddr = va_mapsrcTableAddr; // calculate offset based on page alignment. offset = src_data[index] - ALIGN_PAGE_DOWN(src_data[index]); - // increment the offset to correct VA offset. + // increment the offset to correct VA offset. va_srcTableAddr += (offset/(sizeof (uint64_t))); memcpy(va_srcTableAddr, src_Inputdata[i], sizeof(src_Inputdata[i])); diff --git a/src/usr/errl/parser/errlparser.C b/src/usr/errl/parser/errlparser.C index 71d71aab5..ba6d2defa 100644 --- a/src/usr/errl/parser/errlparser.C +++ b/src/usr/errl/parser/errlparser.C @@ -25,21 +25,21 @@ /** * @file errlparser.C * - * @brief This program spawns the FipS x86 errl tool to display - * a Hostboot error log in full detail. This program can also show a - * brief list of error logs without the detail. When the user + * @brief This program spawns the FipS x86 errl tool to display + * a Hostboot error log in full detail. This program can also show a + * brief list of error logs without the detail. When the user * wants the full detail, this program extracts the error log from * the Hostboot image (or dump) and puts it into a temporary file. When * saved to file, then this program execs "errl -d..." to display - * the error log PEL data. - * + * the error log PEL data. + * * There are other options, such as "-p" which writes all the PEL files - * and does not exec errl. This is useful for debugging. - * + * and does not exec errl. This is useful for debugging. + * * Enter errlparser ? (or -? or -h or --help) to print help. * This program can be run standalone using a Simics * L3 memory image and the HB syms file, however it is more likely - * spawned via "simics> hb-errl" + * spawned via "simics> hb-errl" */ @@ -47,6 +47,7 @@ #include <stdlib.h> #include <netinet/in.h> #include <fcntl.h> +#include <sys/stat.h> #include <unistd.h> #include <string.h> #include <errno.h> diff --git a/src/usr/i2c/i2c.C b/src/usr/i2c/i2c.C index 2a80063a7..23398fbc3 100755 --- a/src/usr/i2c/i2c.C +++ b/src/usr/i2c/i2c.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -536,7 +536,6 @@ errlHndl_t i2cSetup ( TARGETING::Target * i_target, ENTER_MRK"i2cSetup()" ); // Define the registers that we'll use - statusreg status; modereg mode; cmdreg cmd; @@ -545,7 +544,6 @@ errlHndl_t i2cSetup ( TARGETING::Target * i_target, // TODO - Validate some of the arg values passed in // Wait for Command complete before we start - status.value = 0x0ull; err = i2cWaitForCmdComp( i_target, i_args ); diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C index 409c070d9..d09bb46b0 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C @@ -111,7 +111,7 @@ IStepDispatcher::IStepDispatcher () iv_curIStep = 0x0; iv_curSubStep = 0x0; iv_sync = false; - + // Save flag indicating whether we're in MPIPL mode iv_mpipl_mode = checkMpiplMode(); TRACFCOMP( g_trac_initsvc, "MPIPL mode = %u", @@ -887,6 +887,7 @@ void IStepDispatcher::handleBreakpoint ( uint32_t i_info ) // breakpoint msg_t * rspMsg; rspMsg = msg_wait( iv_msgQ ); + msg_free(rspMsg); } msg_free( myMsg ); diff --git a/src/usr/runtime/test/runtimeattrstest.H b/src/usr/runtime/test/runtimeattrstest.H index 7ab4b1592..5fedfe42c 100644 --- a/src/usr/runtime/test/runtimeattrstest.H +++ b/src/usr/runtime/test/runtimeattrstest.H @@ -142,7 +142,7 @@ class RuntimeAttrsTest: public CxxTest::TestSuite } } attr++; - } + } if( attr != sysdata->numAttr ) { @@ -423,6 +423,7 @@ class RuntimeAttrsTest: public CxxTest::TestSuite 0, sys_data_addr, sys_data_size ); + if (errhdl) delete errhdl; return( (hsvc_system_data_t*)(sys_data_addr) ); }; hsvc_node_data_t* getNodePtr(void) @@ -434,6 +435,7 @@ class RuntimeAttrsTest: public CxxTest::TestSuite 0, node_data_addr, node_data_size ); + if (errhdl) delete errhdl; return( (hsvc_node_data_t*)(node_data_addr) ); }; diff --git a/src/usr/targeting/common/test/testcommontargeting.H b/src/usr/targeting/common/test/testcommontargeting.H index fef4267f8..90681c12a 100644 --- a/src/usr/targeting/common/test/testcommontargeting.H +++ b/src/usr/targeting/common/test/testcommontargeting.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -165,12 +165,12 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite { TARG_TS_FAIL("Expected to get the original target"); } - - // Post init + + // Post init // Tested API: Target* toTarget( // const EntityPath& i_entityPath) const; - // Behavior: Given an arbitrary target, I should be able to take its - // affinity path and convert it to the original target + // Behavior: Given an arbitrary target, I should be able to take its + // affinity path and convert it to the original target PredicateCTM mbaPredicate(CLASS_UNIT,TYPE_MBA); TargetRangeFilter mbaFilter( targetService().begin(), @@ -558,7 +558,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite } PredicateHwas hwasPredicate; - + ATTR_HWAS_STATE_type savedHwasState = l_pTopLevel->getAttr<ATTR_HWAS_STATE>(); @@ -566,10 +566,14 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite // should return a match for(size_t i=0; i<32; ++i) { - ATTR_HWAS_STATE_type sweepHwasState - = { i&16, i&8, i&4, i&2, i&1 }; + ATTR_HWAS_STATE_type sweepHwasState + = { static_cast<uint8_t>(i&16), + static_cast<uint8_t>(i&8), + static_cast<uint8_t>(i&4), + static_cast<uint8_t>(i&2), + static_cast<uint8_t>(i&1) }; l_pTopLevel->setAttr<ATTR_HWAS_STATE>(sweepHwasState); - + if(!hwasPredicate(l_pTopLevel)) { TARG_TS_FAIL("Expected default HWAS predicate to match the " @@ -618,7 +622,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite TARG_TS_FAIL("Expected HWAS non-functional predicate to match the " "target's non-functional HWAS state"); } - + // Test: Given a predicate looking for target whose HWAS state // exactly matches all 5 configurable HWAS states, filter should // return true @@ -634,7 +638,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite } // Test: Given a predicate looking for target whose HWAS state - // exactly matches all 4 of 5 configurable HWAS states, filter + // exactly matches all 4 of 5 configurable HWAS states, filter // should return false allFiveHwasState.dumpfunctional = true; l_pTopLevel->setAttr<ATTR_HWAS_STATE>(allFiveHwasState); @@ -644,6 +648,9 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite "4/5 matching HWAS state configuration"); } + // Restore state. + l_pTopLevel->setAttr<ATTR_HWAS_STATE>(savedHwasState); + } while(0); TARG_TS_TRACE(EXIT_MRK "testPredicateHwas" ); diff --git a/src/usr/testcore/kernel/vmmbasetest.H b/src/usr/testcore/kernel/vmmbasetest.H index 15c853268..026290f4c 100644 --- a/src/usr/testcore/kernel/vmmbasetest.H +++ b/src/usr/testcore/kernel/vmmbasetest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -166,14 +166,12 @@ class VmmBaseTest : public CxxTest::TestSuite static void* msgDaemon(void* unused) { msg_t* message = NULL; - uint64_t ea = 0; while (1) { message = msg_wait(iv_mq); if (message) { - ea = message->data[0]; - /*printkd("Effective Addr: 0x%lX, %s\n",ea, + /*printkd("Effective Addr: 0x%lX, %s\n",message->data[0], message->type==MSG_MM_RP_READ?"READ":"WRITE");*/ message->data[1] = 0; msg_respond(iv_mq, message); diff --git a/src/usr/testcore/kernel/vmmpagetest.H b/src/usr/testcore/kernel/vmmpagetest.H index 51b40731e..32dcb5d06 100644 --- a/src/usr/testcore/kernel/vmmpagetest.H +++ b/src/usr/testcore/kernel/vmmpagetest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -214,14 +214,12 @@ class vmmpagetest: public CxxTest::TestSuite static void* testDaemon(void* unused) { msg_t* message = NULL; - uint64_t ea = 0; while (1) { message = msg_wait(iv_mq); if (message) { - ea = message->data[0]; - printkd("Effective Addr: 0x%lX, %s\n",ea, + printkd("Effective Addr: 0x%lX, %s\n",message->data[0], message->type==MSG_MM_RP_READ?"READ":"WRITE"); message->data[1] = 0; rc = msg_respond(iv_mq, message); |