diff options
author | Brian Stegmiller <bjs@us.ibm.com> | 2016-03-16 15:34:20 -0500 |
---|---|---|
committer | Stephen Cprek <smcprek@us.ibm.com> | 2016-04-21 13:51:23 -0500 |
commit | d9447589f91c6ae1a9b81cc1aed666dba6cc5c95 (patch) | |
tree | 1f51bb747fdc6cc55125cccefc25bd0718e17ce8 /src/usr | |
parent | 0b0966881401b80ab66f0a93ef34a6362ae62f7c (diff) | |
download | talos-hostboot-d9447589f91c6ae1a9b81cc1aed666dba6cc5c95.tar.gz talos-hostboot-d9447589f91c6ae1a9b81cc1aed666dba6cc5c95.zip |
Impacts for hostboot attn handling with checkForIplAttns
Change-Id: Ib83b73c37b3c4daf6a376ca7048ac18a5a114eb7
RTC: 147941
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22144
Tested-by: Jenkins Server
Tested-by: FSP CI Jenkins
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/diag/attn/common/attnbits.C | 42 | ||||
-rw-r--r-- | src/usr/diag/attn/common/attnbits.H | 33 | ||||
-rw-r--r-- | src/usr/diag/attn/common/attnfwd.H | 11 | ||||
-rw-r--r-- | src/usr/diag/attn/common/attnlist.C | 4 | ||||
-rw-r--r-- | src/usr/diag/attn/common/attnmem.C | 9 | ||||
-rw-r--r-- | src/usr/diag/attn/common/attnproc.C | 21 | ||||
-rw-r--r-- | src/usr/diag/attn/common/attnsvc_common.C | 106 | ||||
-rw-r--r-- | src/usr/diag/attn/common/attntrace.H | 14 | ||||
-rw-r--r-- | src/usr/diag/attn/ipl/attn.C | 3 | ||||
-rw-r--r-- | src/usr/diag/attn/ipl/test/attnfakeipoll.C | 6 | ||||
-rw-r--r-- | src/usr/diag/attn/ipl/test/attntest.C | 13 | ||||
-rw-r--r-- | src/usr/diag/attn/ipl/test/attntestipl.H | 33 | ||||
-rw-r--r-- | src/usr/diag/attn/ipl/test/attntestmem.H | 6 | ||||
-rw-r--r-- | src/usr/diag/attn/ipl/test/attntestsvc.H | 4 | ||||
-rw-r--r-- | src/usr/diag/attn/ipl/test/makefile | 3 | ||||
-rw-r--r-- | src/usr/diag/attn/runtime/attn_rt.C | 4 |
16 files changed, 172 insertions, 140 deletions
diff --git a/src/usr/diag/attn/common/attnbits.C b/src/usr/diag/attn/common/attnbits.C index 4edcddb7e..9b93eebcc 100644 --- a/src/usr/diag/attn/common/attnbits.C +++ b/src/usr/diag/attn/common/attnbits.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -91,7 +91,22 @@ void forEach( namespace IPOLL { -const uint64_t address = 0x1020013; +const uint64_t address = IPOLL_MASK_REG; + +// NOTE: This reg should get flushed to zeroes. +// Hence, the 'routing to host' and +// 'routing to FSP' should be enabled. +// (along with all interrupt types to FSP) +// --------------------------------------------- +// {ROUTE_TO_HOST, 0x0400000000000000ull}, +// +// {TOSP_CHECK_STOP, 0x0200000000000000ull}, +// {TOSP_RECOVERABLE, 0x0100000000000000ull}, +// {TOSP_SPECIAL, 0x0080000000000000ull}, +// {TOSP_UNIT_CS, 0x0040000000000000ull}, +// {TOSP_HOST, 0x0020000000000000ull}, +// {ROUTE_TO_SP, 0x0010000000000000ull}, +// --------------------------------------------- void getCheckbitsAssociations( const RegAssoc * & o_first, @@ -99,10 +114,11 @@ void getCheckbitsAssociations( { static const RegAssoc first[] = { - {CHECK_STOP, 0x8000000000000000ull}, + {CHECK_STOP, 0x8000000000000000ull}, {RECOVERABLE, 0x4000000000000000ull}, - {SPECIAL, 0x2000000000000000ull}, - {HOST, 0x1000000000000000ull}, + {SPECIAL, 0x2000000000000000ull}, + {UNIT_CS, 0x1000000000000000ull}, + {HOST_ATTN, 0x0800000000000000ull}, }; static const RegAssoc * last = first + @@ -145,9 +161,11 @@ bool getAddress( { static const RegAssoc first[] = { - {CHECK_STOP, 0x570f001c}, + {CHECK_STOP, 0x570f001c}, {RECOVERABLE, 0x570f001b}, - {SPECIAL, 0x570f001a}, + {SPECIAL, 0x570f001a}, + {UNIT_CS, 0x57040018}, + {HOST_ATTN, 0x57040009}, }; static const RegAssoc * last = first + @@ -162,9 +180,11 @@ bool getCheckbits( { static const RegAssoc first[] = { - {CHECK_STOP, 0xffffffffffffffffull}, + {CHECK_STOP, 0xffffffffffffffffull}, {RECOVERABLE, 0xffffffffffffffffull}, - {SPECIAL, 0xffffffffffffffffull}, + {SPECIAL, 0xffffffffffffffffull}, + {UNIT_CS, 0xffffffffffffffffull}, + {HOST_ATTN, 0xffffffffffffffffull}, }; static const RegAssoc * last = first + @@ -176,7 +196,7 @@ bool getCheckbits( namespace MCI { - +// Not valid / used for now on P9 const uint64_t address = 0x2011840; void getCheckbitsAssociations( @@ -222,7 +242,7 @@ void forEach( namespace GP1 { - +// Not valid / used for now on P9 const uint64_t address = 0x2000001ull; void getCheckbitsAssociations( diff --git a/src/usr/diag/attn/common/attnbits.H b/src/usr/diag/attn/common/attnbits.H index e26c5aa30..af34cb5b4 100644 --- a/src/usr/diag/attn/common/attnbits.H +++ b/src/usr/diag/attn/common/attnbits.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2015 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -176,14 +176,31 @@ bool getCheckbits( */ enum { - INTR_TYPE_LCL_ERR_STATUS_AND_REG = 0x01020002, - INTR_TYPE_MASK_OR_REG = 0x0102000d, - INTR_TYPE_MASK_AND_REG = 0x0102000e, - INTR_TYPE_CONFIG_AND_REG = 0x01020011, + // Interrupt Type Mask Register + INTR_TYPE_MASK_OR_REG = 0x000F002D, + INTR_TYPE_MASK_AND_REG = 0x000F002E, + + // Interrupt Type Config Register + // (contains MUX'ing bits now) + INTR_TYPE_CONFIG_AND_REG = 0x000F0031, + + // This was for MCS usage, but not needed right now GP2_REG = 0x02000002, - IPOLL_STATUS_REG = 0x01020014, - INTR_TYPE_LCL_ERR_STATUS_OR_REG = 0x01020001, - INTR_TYPE_LCL_ERR_STATUS_REG = 0x01020000 + + // IPOLL MASK register + IPOLL_MASK_REG = 0x000F0033, + // (IPOLL) Error status reg + IPOLL_STATUS_REG = 0x000F0034, + + // Interrupt Presentation Reg (IPR) + INTR_TYPE_LCL_ERR_STATUS_REG = 0x000F0020, + INTR_TYPE_LCL_ERR_STATUS_OR_REG = 0x000F0021, + INTR_TYPE_LCL_ERR_STATUS_AND_REG = 0x000F0022, }; + + + + + } #endif diff --git a/src/usr/diag/attn/common/attnfwd.H b/src/usr/diag/attn/common/attnfwd.H index 18061ee38..d613bca9e 100644 --- a/src/usr/diag/attn/common/attnfwd.H +++ b/src/usr/diag/attn/common/attnfwd.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -64,15 +64,22 @@ class ScomImpl; class ProcOps; class MemOps; + enum { /** * @brief HOST Represents host attentions, * distinct from the local error attentions. */ - HOST = PRDF::END_ATTENTION_TYPE, + HOST_ATTN = 5, + END_ATTENTION_TYPE = 6, + //@TODO: RTC:149395 These enums should be removed once + // the other commit from PRD makes it to hostboot code. + // https://ralgit01.raleigh.ibm.com/gerrit1/#/c/22141/ }; + + /** * @brief MessageType Attention service message types. */ diff --git a/src/usr/diag/attn/common/attnlist.C b/src/usr/diag/attn/common/attnlist.C index 864625f04..9fbc82795 100644 --- a/src/usr/diag/attn/common/attnlist.C +++ b/src/usr/diag/attn/common/attnlist.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -31,6 +31,7 @@ #include "common/attnfwd.H" #include "common/attnlist.H" #include "common/attnops.H" +#include "common/attntrace.H" #include <algorithm> using namespace std; @@ -52,6 +53,7 @@ void AttentionList::getAttnList(PRDF::AttnList & o_dest) const sit->getData(d); o_dest.push_back(d); + ATTN_TRACE("getAttnList saving type: %d", d.attnType); ++sit; } diff --git a/src/usr/diag/attn/common/attnmem.C b/src/usr/diag/attn/common/attnmem.C index 9357ca240..8eb89088a 100644 --- a/src/usr/diag/attn/common/attnmem.C +++ b/src/usr/diag/attn/common/attnmem.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -33,6 +33,7 @@ #include "common/attnmem.H" #include "common/attnlist.H" #include "common/attntarget.H" +#include "attntrace.H" using namespace std; using namespace PRDF; @@ -112,6 +113,11 @@ errlHndl_t MemOps::resolve( { errlHndl_t err = 0; + //@TODO: RTC:150944 + // Don't need this for now as this is Centaur Chip related + ATTN_TRACE("MemOps::resolve - P9 Noop"); + +#if 0 uint64_t gp1ScomData = 0; do { @@ -135,6 +141,7 @@ errlHndl_t MemOps::resolve( GP1::forEach(gp1ScomData, &args, &resolveMcs); } while(0); +#endif return err; } diff --git a/src/usr/diag/attn/common/attnproc.C b/src/usr/diag/attn/common/attnproc.C index 79f5a7732..2efef93d2 100644 --- a/src/usr/diag/attn/common/attnproc.C +++ b/src/usr/diag/attn/common/attnproc.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -53,6 +53,9 @@ errlHndl_t ProcOps::query(const AttnData & i_attnToCheck, bool & o_active) err = getScom(i_attnToCheck.targetHndl, address, scomData); + ATTN_TRACE("procOpsQuery:Addr:%016llx ChkBits:%016llx Data:%016llx", + address, checkbits, scomData); + if(!err) { if(scomData & checkbits) @@ -82,7 +85,6 @@ errlHndl_t ProcOps::resolveIpoll( // supported bits on in the // status register, in case the other // thread hasn't masked it yet - err = getScom(i_proc, IPOLL_STATUS_REG, on); if(err) @@ -93,7 +95,6 @@ errlHndl_t ProcOps::resolveIpoll( // also look for any supported bits on in the // mask register, indicating that the other thread // saw the error and masked it. - err = getScom(i_proc, IPOLL::address, observed); if(err) @@ -101,6 +102,9 @@ errlHndl_t ProcOps::resolveIpoll( errlCommit(err, ATTN_COMP_ID); } + ATTN_TRACE("resolveIpoll: Status:%016llx Mask:%016llx", + on, observed); + for(uint64_t type = INVALID_ATTENTION_TYPE; type != END_ATTENTION_TYPE; ++type) @@ -111,16 +115,15 @@ errlHndl_t ProcOps::resolveIpoll( { // this object doesn't support // this attention type - continue; } // analysis should be done if the bit for this // attention type is either on in the status reg // or masked in the mask reg - if(!(supported & (on | observed))) { + ATTN_TRACE("resolveIpoll: Skipping"); continue; } @@ -128,6 +131,7 @@ errlHndl_t ProcOps::resolveIpoll( d.targetHndl = i_proc; // to be sure, query corresponding GFIR + ATTN_TRACE("rslvIpoll: Qry type :%016llx", d.attnType); err = query(d, active); if(err) { @@ -143,6 +147,8 @@ errlHndl_t ProcOps::resolveIpoll( return err; } +// @TODO RTC:149395 check into this when we handle 'interrupt driven' attns +// (One thing is 'Can we switch to pure Ipoll vs GFIR ??' ) errlHndl_t ProcOps::resolve( TargetHandle_t i_proc, uint64_t i_typeMask, @@ -156,6 +162,7 @@ errlHndl_t ProcOps::resolve( uint64_t ignored; + ATTN_TRACE("procOps::resolve"); for(uint64_t type = INVALID_ATTENTION_TYPE; type != END_ATTENTION_TYPE; ++type) @@ -165,6 +172,7 @@ errlHndl_t ProcOps::resolve( break; } + ATTN_TRACE("procOps::Validate attn types"); if(!GFIR::getCheckbits(type, ignored)) { // this object doesn't support @@ -176,6 +184,8 @@ errlHndl_t ProcOps::resolve( uint64_t mask = 0; IPOLL::getCheckbits(type, mask); + ATTN_TRACE("procOps::Chkbits type:%016llx mask:%016llx iMask:%016llx", + type, mask, i_typeMask); if(!(mask & ~i_typeMask)) { @@ -186,6 +196,7 @@ errlHndl_t ProcOps::resolve( d.attnType = static_cast<ATTENTION_VALUE_TYPE>(type); + ATTN_TRACE("procOps::Query type :%016llx", d.attnType ); err = query(d, active); if(err) diff --git a/src/usr/diag/attn/common/attnsvc_common.C b/src/usr/diag/attn/common/attnsvc_common.C index 50674388a..068e93b46 100644 --- a/src/usr/diag/attn/common/attnsvc_common.C +++ b/src/usr/diag/attn/common/attnsvc_common.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2015 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -43,6 +43,9 @@ using namespace ERRORLOG; namespace ATTN { +//@TODO: RTC:149395 Runtime case has workaround +// in place using these regs to regenerate. +// interrupts. Delete these if not needed. const uint64_t MCIFIRACT0 = 0x02011846; const uint64_t MCIFIRACT1 = 0x02011847; @@ -50,16 +53,13 @@ const uint64_t MCIFIRMASK = 0x02011843; const uint64_t MCIFIRMASK_AND = 0x02011844; const uint64_t MCIFIRMASK_OR = 0x02011845; - -void getPbGp2Mask(uint64_t i_pos, void * i_data) +enum { - uint64_t & mask = *static_cast<uint64_t *>(i_data); + // interrupts to host bridge -IPOLL MASK + ROUTE_TO_HOST = 0x0400000000000000ull +}; - uint64_t tmp = 0; - GP1::getCheckbits(i_pos, tmp); - mask |= tmp; -} /** * @brief calculated mask cache for ipoll @@ -71,7 +71,13 @@ class HostMask HostMask() : iv_hostMask(0), iv_nonHostMask(0) { - IPOLL::getCheckbits(HOST, iv_hostMask); + uint64_t l_hostMask; + + // Get attentions only reported on proc/host side + IPOLL::getCheckbits(UNIT_CS, l_hostMask); + IPOLL::getCheckbits(HOST_ATTN, iv_hostMask); + iv_hostMask |= l_hostMask; + IPOLL::forEach(~0, &iv_nonHostMask, &getIpollMask); iv_nonHostMask = iv_nonHostMask & ~iv_hostMask; @@ -118,42 +124,14 @@ errlHndl_t ServiceCommon::configureInterrupts( while(it != procs.end()) { - uint64_t mask = 0; - - // clear GPIO interrupt type status register - - if(i_mode == UP) - { - err = putScom(*it, INTR_TYPE_LCL_ERR_STATUS_AND_REG, - 0); - } - - if(err) - { - break; - } - - // unmask GPIO interrupt type - - mask = 0x8000000000000000ull; - - err = putScom(*it, - (i_mode == UP - ? INTR_TYPE_MASK_AND_REG - : INTR_TYPE_MASK_OR_REG), - i_mode == UP ? ~mask : mask); - - if(err) - { - break; - } - // set GPIO interrupt type mode - or - if(i_mode == UP) { - err = putScom(*it, INTR_TYPE_CONFIG_AND_REG, - ~mask); + //@TODO: RTC:149395 Shouldn't need this GPIO setting anymore + // but need to check MUX setting in bits 0:7 eventually + // (Seems FSP related and more interrupt driven) + + // err = putScom(*it, INTR_TYPE_CONFIG_AND_REG, ~mask); } if(err) @@ -162,26 +140,20 @@ errlHndl_t ServiceCommon::configureInterrupts( } // enable/disable MCSes + //@TODO: RTC:149395 Do we need to enable/disable MCS ? + // seems to be related strictly to that GPIO P8 workaround - mask = 0; - - GP1::forEach(~0, &mask, &getPbGp2Mask); - - err = modifyScom(*it, - GP2_REG, - i_mode == UP ? mask : ~mask, - i_mode == UP ? SCOM_OR : SCOM_AND); - - if(err) - { - break; - } #ifndef __HOSTBOOT_RUNTIME + uint64_t mask = 0; // enable attentions in ipoll mask mask = HostMask::nonHost(); mask |= HostMask::host(); + // We never messed with FSP mask bits in P8, so + // not doing it on P9 either. + mask |= ATTN::ROUTE_TO_HOST; + // this doesn't have an and/or reg for some reason... err = modifyScom(*it, IPOLL::address, @@ -195,6 +167,11 @@ errlHndl_t ServiceCommon::configureInterrupts( #else // HOSTBOOT_RUNTIME + //@TODO: RTC:149395 + // We had a workaround for centaur/MCS related attns + // at runtime. Do we still need for P9? + // Kind of think we have to do this and maybe more + // since we now support recov/special/local xstop. if (i_mode == UP) { HwasState l_functional; @@ -301,19 +278,6 @@ void ServiceCommon::processAttnPreAck(const TargetHandle_t i_proc) data = hostMask | nonHostMask; } - if(data & hostMask) - { - // if host attention, clear the ITR macro gpio interrupt - // type status register. - - err = putScom(i_proc, INTR_TYPE_LCL_ERR_STATUS_AND_REG, 0); - - if(err) - { - errlCommit(err, ATTN_COMP_ID); - } - } - if(data & nonHostMask) { // mask local proc xstp,rec and/or special attns if on. @@ -355,7 +319,6 @@ void ServiceCommon::processAttentions(const TargetHandleList & i_procs) while(pit-- != i_procs.begin()) { // enumerate proc local attentions (xstp,spcl,rec). - err = procOps.resolveIpoll(*pit, attentions); if(err) @@ -364,8 +327,7 @@ void ServiceCommon::processAttentions(const TargetHandleList & i_procs) } // enumerate host attentions and convert - // to centaur targets - + // to centaur targets (NOOP for now on P9) err = memOps.resolve(*pit, attentions); if(err) @@ -443,7 +405,6 @@ errlHndl_t ServiceCommon::handleAttentions(const TargetHandle_t i_proc) attentions.clear(); // query the proc resolver for active attentions - err = procOps.resolve(i_proc, 0, attentions); if(err) @@ -464,6 +425,7 @@ errlHndl_t ServiceCommon::handleAttentions(const TargetHandle_t i_proc) break; } + ATTN_TRACE("handleAttns %d active( PRD)", attentions.size() ); if(!attentions.empty()) { err = getPrdWrapper().callPrd(attentions); diff --git a/src/usr/diag/attn/common/attntrace.H b/src/usr/diag/attn/common/attntrace.H index d6b12637d..1842f5491 100644 --- a/src/usr/diag/attn/common/attntrace.H +++ b/src/usr/diag/attn/common/attntrace.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2015 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -47,4 +47,16 @@ extern trace_desc_t * slowTd; #define ATTN_SLOW( _fmt_, _args_...) TRACFCOMP( ATTN::slowTd, INFO_MRK _fmt_, ##_args_) #define ATTN_ERR( _fmt_, _args_...) TRACFCOMP( ATTN::slowTd, ERR_MRK _fmt_, ##_args_) +// If you want to see what is going on, uncomment and rebuild +// #define ATTN_DEBUG + +// The ATTN_TRACE can be used to provide lots of debug help if compiled in. +// However, normal compiles will have this completely out (so no affect). +#ifdef ATTN_DEBUG + #define ATTN_TRACE( _fmt_, _args_...) \ + TRACFCOMP( ATTN::fastTd, INFO_MRK _fmt_, ##_args_) +#else + #define ATTN_TRACE( _fmt_, _args_...) +#endif + #endif diff --git a/src/usr/diag/attn/ipl/attn.C b/src/usr/diag/attn/ipl/attn.C index 2b0c7b950..8e5543e74 100644 --- a/src/usr/diag/attn/ipl/attn.C +++ b/src/usr/diag/attn/ipl/attn.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2015 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -78,6 +78,7 @@ errlHndl_t checkForIplAttentions() TargetHandleList::iterator tit = list.begin(); + ATTN_TRACE("checkForIplAttentions: %d chips", list.size() ); while(tit != list.end()) { err = Singleton<Service>::instance().handleAttentions(*tit); diff --git a/src/usr/diag/attn/ipl/test/attnfakeipoll.C b/src/usr/diag/attn/ipl/test/attnfakeipoll.C index 5d030a858..a05033d47 100644 --- a/src/usr/diag/attn/ipl/test/attnfakeipoll.C +++ b/src/usr/diag/attn/ipl/test/attnfakeipoll.C @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/diag/attn/hostboot/test/attnfakeipoll.C $ */ +/* $Source: src/usr/diag/attn/ipl/test/attnfakeipoll.C $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -187,7 +187,7 @@ FakeIpoll::FakeIpoll( iv_ipollbits(0), iv_presenter(&i_presenter) { - if(i_type == HOST) + if(i_type == HOST_ATTN) { // figure out what bits to monitor // in the nest gp1 register, if diff --git a/src/usr/diag/attn/ipl/test/attntest.C b/src/usr/diag/attn/ipl/test/attntest.C index c06b5e895..b195b400d 100644 --- a/src/usr/diag/attn/ipl/test/attntest.C +++ b/src/usr/diag/attn/ipl/test/attntest.C @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/diag/attn/hostboot/test/attntest.C $ */ +/* $Source: src/usr/diag/attn/ipl/test/attntest.C $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -92,15 +92,20 @@ ATTENTION_VALUE_TYPE getRandomAttentionType() { ATTENTION_VALUE_TYPE a; - switch (randint(1, 3)) + switch (randint(1, 5)) { case 2: a = RECOVERABLE; break; case 3: - default: a = SPECIAL; break; + case 4: + a = UNIT_CS; + break; + default: + a = (ATTENTION_VALUE_TYPE)HOST_ATTN; + break; }; return a; diff --git a/src/usr/diag/attn/ipl/test/attntestipl.H b/src/usr/diag/attn/ipl/test/attntestipl.H index 8c71ae5bb..a44b2fc4c 100644 --- a/src/usr/diag/attn/ipl/test/attntestipl.H +++ b/src/usr/diag/attn/ipl/test/attntestipl.H @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/diag/attn/hostboot/test/attntestipl.H $ */ +/* $Source: src/usr/diag/attn/ipl/test/attntestipl.H $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -73,29 +73,23 @@ class AttnCheckForIplAttentionsTest : public CxxTest::TestSuite FakeGfir xstpGfir(CHECK_STOP), spclGfir(SPECIAL), - recGfir(RECOVERABLE); + recGfir(RECOVERABLE), + lxstpGfir(UNIT_CS), + hostGfir((PRDF::ATTENTION_VALUE_TYPE)HOST_ATTN); xstpGfir.install(system); spclGfir.install(system); recGfir.install(system); + lxstpGfir.install(system); + hostGfir.install(system); - FakeMcs rec(RECOVERABLE), xstp(CHECK_STOP), special(SPECIAL); - FakeGp1 gp1; - - xstp.install(system); - special.install(system); - rec.install(system); - gp1.install(system); + // No Centaurs to mess with for now system.installScomImpl(); + FakeMemTargetService targetSvc(targetPoolSize); - FakeMemTargetService targetSvc( - targetPoolSize); - - TargetHandleList membufs, procs; - + TargetHandleList procs; targetSvc.getAllChips(procs, TYPE_PROC); - targetSvc.getAllChips(membufs, TYPE_MEMBUF); RandSource procSource(iterations, maxAttnsPerIteration, @@ -103,12 +97,6 @@ class AttnCheckForIplAttentionsTest : public CxxTest::TestSuite &procs[0], &procs[0] + procs.size()); - RandSource memSource( - iterations, - maxAttnsPerIteration, - system, - &membufs[0], - &membufs[0] + membufs.size()); targetSvc.installTargetService(); @@ -119,7 +107,6 @@ class AttnCheckForIplAttentionsTest : public CxxTest::TestSuite do { - memSource.run(); procSource.run(); err = checkForIplAttentions(); diff --git a/src/usr/diag/attn/ipl/test/attntestmem.H b/src/usr/diag/attn/ipl/test/attntestmem.H index 9b4997715..affa61488 100644 --- a/src/usr/diag/attn/ipl/test/attntestmem.H +++ b/src/usr/diag/attn/ipl/test/attntestmem.H @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/diag/attn/hostboot/test/attntestmem.H $ */ +/* $Source: src/usr/diag/attn/ipl/test/attntestmem.H $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -84,7 +84,7 @@ class AttnMemTest: public CxxTest::TestSuite targetSvc.getAllChips(membufs, TYPE_MEMBUF); - FakeIpoll hostIpoll(HOST, presenter); + FakeIpoll hostIpoll(HOST_ATTN, presenter); FakeMcs rec(RECOVERABLE), xstp(CHECK_STOP), special(SPECIAL); FakeGp1 gp1; diff --git a/src/usr/diag/attn/ipl/test/attntestsvc.H b/src/usr/diag/attn/ipl/test/attntestsvc.H index 314508b40..b8baa664d 100644 --- a/src/usr/diag/attn/ipl/test/attntestsvc.H +++ b/src/usr/diag/attn/ipl/test/attntestsvc.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2015 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -84,7 +84,7 @@ class AttnSvcTest: public CxxTest::TestSuite FakeIpoll xstpIpoll(CHECK_STOP, presenter), spclIpoll(SPECIAL, presenter), recIpoll(RECOVERABLE, presenter), - hostIpoll(HOST, presenter); + hostIpoll(HOST_ATTN, presenter); xstpIpoll.install(system); spclIpoll.install(system); diff --git a/src/usr/diag/attn/ipl/test/makefile b/src/usr/diag/attn/ipl/test/makefile index c9514872f..faaef1e16 100644 --- a/src/usr/diag/attn/ipl/test/makefile +++ b/src/usr/diag/attn/ipl/test/makefile @@ -43,7 +43,8 @@ OBJS += attnmeminject.o MODULE = testattn -#TODO RTC 148565 reenable when test cases are updated for P9 +# asdf bjs @TODO: RTC:151004 #TESTS = *.H +TESTS = attntestipl.H include ${ROOTPATH}/config.mk diff --git a/src/usr/diag/attn/runtime/attn_rt.C b/src/usr/diag/attn/runtime/attn_rt.C index 404ee42a9..ea66507ed 100644 --- a/src/usr/diag/attn/runtime/attn_rt.C +++ b/src/usr/diag/attn/runtime/attn_rt.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2015 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -145,7 +145,7 @@ namespace ATTN_RT // get set and we will end up in infinite loop. uint64_t hostMask = 0; - IPOLL::getCheckbits(HOST, hostMask); + IPOLL::getCheckbits(HOST_ATTN, hostMask); if( i_ipollMask & hostMask) { |