diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2014-01-08 12:55:18 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-01-13 12:27:19 -0600 |
commit | e660f75a8db5d41967e3e74db2f192f62fdb16f3 (patch) | |
tree | adcf4b73a2248a92d85acbeb094d27c11238cc0e /src/usr | |
parent | 0653695de6a1b29a8665dfe3eb708beeafc12f58 (diff) | |
download | talos-hostboot-e660f75a8db5d41967e3e74db2f192f62fdb16f3.tar.gz talos-hostboot-e660f75a8db5d41967e3e74db2f192f62fdb16f3.zip |
BEAM fixes for fsi,runtime
Change-Id: I6d285e9ca357ebbf0c1b0f7118da0f5b727113d3
RTC: 84070
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/7947
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/fsi/fsidd.C | 8 | ||||
-rw-r--r-- | src/usr/fsi/test/fsiddtest.H | 64 | ||||
-rw-r--r-- | src/usr/runtime/hdatservice.C | 12 |
3 files changed, 11 insertions, 73 deletions
diff --git a/src/usr/fsi/fsidd.C b/src/usr/fsi/fsidd.C index 9809b9b27..530753053 100644 --- a/src/usr/fsi/fsidd.C +++ b/src/usr/fsi/fsidd.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -662,7 +662,7 @@ void FsiDD::getFsiFFDC(FSI::fsiFFDCType_t i_ffdc_type, ctl_reg|FSI_MDTRB0_1DC }; - for( size_t x=0; x<(sizeof(dump_regs)/dump_regs[0]); x++ ) + for( size_t x=0; x<(sizeof(dump_regs)/sizeof(dump_regs[0])); x++ ) { tmp_err = read( dump_regs[x], &data ); if( tmp_err ) @@ -716,7 +716,7 @@ void FsiDD::getFsiFFDC(FSI::fsiFFDCType_t i_ffdc_type, 0x285C,//2817=GP8 }; uint32_t databuf = 32; - for( size_t x=0; x<(sizeof(dump_regs)/dump_regs[0]); x++ ) + for( size_t x=0; x<(sizeof(dump_regs)/sizeof(dump_regs[0])); x++ ) { tmp_err = read( i_target, dump_regs[x], &databuf ); if( tmp_err ) @@ -1129,7 +1129,7 @@ errlHndl_t FsiDD::handleOpbErrors(FsiAddrInfo_t& i_addrInfo, else { // bits 0:3 are a specific error code - switch( (mesrb0_data & 0xF) >> 28 ) + switch( (mesrb0_data & 0xF0000000) >> 28 ) { case(0x1) : //OPB error case(0x2) : //invalid state of OPB state machine diff --git a/src/usr/fsi/test/fsiddtest.H b/src/usr/fsi/test/fsiddtest.H index 20f901e5c..c1d1210b7 100644 --- a/src/usr/fsi/test/fsiddtest.H +++ b/src/usr/fsi/test/fsiddtest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -48,68 +48,6 @@ class FsiDDTest : public CxxTest::TestSuite { public: /** - * @brief FSI DD test - Initialization - * Test FSI Master/Slave Initialization - */ - void test_init(void) - { -#if 0 //istep is calling this now - TRACFCOMP( g_trac_fsi, "FsiDDTest::test_init> Start" ); - uint64_t fails = 0; - uint64_t total = 0; - errlHndl_t l_err = NULL; - - total++; - l_err = FSI::initializeHardware(); - if( l_err ) - { - fails++; - TRACFCOMP(g_trac_fsi, "FsiDDTest::test_init> Error from device : RC=%X", l_err->reasonCode() ); - TS_FAIL( "FsiDDTest::test_init> ERROR : Unexpected error log from initMaster" ); - errlCommit(l_err,FSI_COMP_ID); - } - - TRACFCOMP( g_trac_fsi, "FsiDDTest::test_init> %d/%d fails", fails, total ); -#endif - }; - - - //testcode for Simics verification - void test_blah(void) - { -#if 0 - return; - errlHndl_t l_err = NULL; - TARGETING::Target* fsi_target = NULL; - - // master processor target - TARGETING::EntityPath epath(TARGETING::EntityPath::PATH_PHYSICAL); - epath.addLast(TARGETING::TYPE_SYS,0); - epath.addLast(TARGETING::TYPE_NODE,0); - epath.addLast(TARGETING::TYPE_PROC,0); - fsi_target = TARGETING::targetService().toTarget(epath); - - uint32_t read_data = 0; - size_t op_size = sizeof(read_data); - - while(1) - { - nanosleep( 1, 0 ); - op_size = sizeof(read_data); - l_err = DeviceFW::deviceRead( fsi_target, - &read_data, - op_size, - DEVICE_FSI_ADDRESS(0x3418) ); - if( l_err ) - { - TRACFCOMP(g_trac_fsi, "FsiDDTest::test_blah> Error from device : RC=%X", l_err->reasonCode() ); - delete l_err; - } - } -#endif - }; - - /** * @brief FSI DD test - Read/Write * Perform basic read/write operations */ diff --git a/src/usr/runtime/hdatservice.C b/src/usr/runtime/hdatservice.C index 2f715e871..d58ba041b 100644 --- a/src/usr/runtime/hdatservice.C +++ b/src/usr/runtime/hdatservice.C @@ -325,9 +325,9 @@ hdatService::hdatService(void) ,iv_spiraH(NULL) ,iv_spiraS(NULL) { - for( RUNTIME::SectionId id = RUNTIME::FIRST_SECTION; - id <= RUNTIME::LAST_SECTION; - id = (RUNTIME::SectionId)(id+1) ) + for( uint8_t id = static_cast<uint8_t>(RUNTIME::FIRST_SECTION); + id <= static_cast<uint8_t>(RUNTIME::LAST_SECTION); + id++ ) { iv_actuals[id] = ACTUAL_NOT_SET; } @@ -586,7 +586,7 @@ errlHndl_t hdatService::getHostDataSection( SectionId i_section, assert(sys != NULL); // Figure out what kind of payload we have - TARGETING::ATTR_PAYLOAD_KIND_type payload_kind + TARGETING::PAYLOAD_KIND payload_kind = sys->getAttr<TARGETING::ATTR_PAYLOAD_KIND>(); #ifdef REAL_HDAT_TEST @@ -1057,7 +1057,7 @@ errlHndl_t hdatService::findSpira( void ) // Figure out what kind of payload we have TARGETING::Target * sys = NULL; TARGETING::targetService().getTopLevelTarget( sys ); - TARGETING::ATTR_PAYLOAD_KIND_type payload_kind + TARGETING::PAYLOAD_KIND payload_kind = sys->getAttr<TARGETING::ATTR_PAYLOAD_KIND>(); // Go get the physical address we mapped in @@ -1257,7 +1257,7 @@ errlHndl_t hdatService::updateHostDataSectionActual( SectionId i_section, assert(sys != NULL); // Figure out what kind of payload we have - TARGETING::ATTR_PAYLOAD_KIND_type payload_kind + TARGETING::PAYLOAD_KIND payload_kind = sys->getAttr<TARGETING::ATTR_PAYLOAD_KIND>(); if( TARGETING::PAYLOAD_KIND_NONE == payload_kind ) |