Skip to content

Commit

Permalink
Increment HBRT EID on every commit
Browse files Browse the repository at this point in the history
When HBRT first boots we read ATTR_HOSTSVC_PLID to set our starting
PLID/EID number.  However, we never increment that attribute as we
create new logs.  This will result in HBRT reusing PLIDs if it ever
reboots (e.g. after a crash or as part of a code update) and also
when it restarts after a mpipl.

Change-Id: I9f3b83f2be793908b62f3fb959fbbe590a4a1464
CQ: SW446539
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66611
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Disable-CI: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
  • Loading branch information
dcrowell77 authored and wghoffa committed Sep 28, 2018
1 parent e82eda2 commit 2cfc8b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/usr/errl/runtime/rt_errlmanager.C
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ ErrlManager::ErrlManager() :
if(sys)
{
iv_currLogId = sys->getAttr<TARGETING::ATTR_HOSTSVC_PLID>();
TRACFCOMP( g_trac_errl,"Initial Error Log ID = %.8X", iv_currLogId );

// set whether we want to skip certain error logs or not.
iv_hiddenErrLogsEnable =
Expand Down Expand Up @@ -304,6 +305,15 @@ void ErrlManager::commitErrLog(errlHndl_t& io_err, compId_t i_committerComp )
break;
}

// Increment our persistent counter so we don't reuse EIDs
// after reboots or mpipl
TARGETING::Target * sys = NULL;
if( TARGETING::targetService().isInitialized() )
{
TARGETING::targetService().getTopLevelTarget( sys );
sys->setAttr<TARGETING::ATTR_HOSTSVC_PLID>(io_err->eid()+1);
}

TRACFCOMP(g_trac_errl, "commitErrLog() called by %.4X for plid=0x%X,"
"Reasoncode=%.4X", i_committerComp,
io_err->plid(), io_err->reasonCode() );
Expand Down
3 changes: 2 additions & 1 deletion src/usr/targeting/common/xmltohb/attribute_types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,8 @@

<attribute>
<description>
Value of the next PLID that host service should send
Value of the next EID that host service should send.
(Note - EID is more accurate, PLID being kept to handle legacy code.)
</description>
<id>HOSTSVC_PLID</id>
<persistency>non-volatile</persistency>
Expand Down

0 comments on commit 2cfc8b1

Please sign in to comment.