Skip to content

Commit

Permalink
Capture rc in Async FFDC usecases
Browse files Browse the repository at this point in the history
Update asyncrhonus failure to capture SBE rc

Change-Id: Iaa49b106595dc9992d9642209a7e1821ff5be69d
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53431
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
  • Loading branch information
Shakeebbk authored and sgupta2m committed Feb 12, 2018
1 parent 55fa800 commit 7e91363
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/sbefw/app/power/sbecmdcntrldmt.C
Expand Up @@ -45,6 +45,7 @@
#include "p9_block_wakeup_intr.H"
#include "sbeTimerSvc.H"
#include "sbeglobals.H"
#include "sbeFFDC.H"

using namespace fapi2;

Expand Down Expand Up @@ -82,7 +83,8 @@ void sbeDmtPkExpiryCallback(void *)
pk_halt();
}

(void)SbeRegAccess::theSbeRegAccess().updateAsyncFFDCBit(true);
captureAsyncFFDC(SBE_PRI_GENERIC_EXECUTION_FAILURE,
SBE_SEC_DMT_TIMEOUT);
#undef SBE_FUNC
}

Expand Down
7 changes: 5 additions & 2 deletions src/sbefw/core/ipl.C
Expand Up @@ -24,6 +24,8 @@
/* IBM_PROLOG_END_TAG */
#include "fapi2.H"
#include "sberegaccess.H"
#include "sbe_sp_intf.H"
#include "sbeFFDC.H"

#include "ipl.H"

Expand Down Expand Up @@ -109,8 +111,9 @@ void sbeDoContinuousIpl()
SBE_ERROR(SBE_FUNC"Failed istep execution in plck mode: "
"Major: %d, Minor: %d",
istepTableEntry->istepMajorNum, step);
(void)SbeRegAccess::theSbeRegAccess().updateAsyncFFDCBit(
true);

captureAsyncFFDC(SBE_PRI_GENERIC_EXECUTION_FAILURE,
SBE_SEC_GENERIC_FAILURE_IN_EXECUTION);
// exit outer loop as well
entry = istepTable.len;
break;
Expand Down
9 changes: 9 additions & 0 deletions src/sbefw/core/sbeFFDC.C
Expand Up @@ -31,6 +31,15 @@
#include "sbeglobals.H"
#include "sbecmdcntrldmt.H"

void captureAsyncFFDC(uint32_t primRc, uint32_t secRc)
{
SBE_GLOBAL->failedPrimStatus = primRc;
SBE_GLOBAL->failedSecStatus = secRc;

// Set async ffdc bit
(void)SbeRegAccess::theSbeRegAccess().updateAsyncFFDCBit(true);
}

void SbeFFDCPackage::updateUserDataHeader(uint32_t i_fieldsConfig)
{
// Set failed command information
Expand Down
10 changes: 10 additions & 0 deletions src/sbefw/core/sbeFFDC.H
Expand Up @@ -37,6 +37,16 @@
//PIBMEM attribute dump
extern G_sbe_attrs_t G_sbe_attrs;

/*
* @brief - Capture Async failure FFDC
*
* @param[in] primRc Primary failure rc
* @param[in] secRc Secondary failure rc
*
*/
void captureAsyncFFDC(uint32_t primRc,
uint32_t secRc);

//Configuration of user data blobs present in SBE FFDC
//Data is sent in the order defined here
//Definition - Identifier
Expand Down
1 change: 1 addition & 0 deletions src/sbefw/core/sbe_sp_intf.H
Expand Up @@ -219,6 +219,7 @@ enum sbeSecondaryResponse
SBE_SEC_INPUT_BUFFER_OVERFLOW = 0x18,
SBE_SEC_INVALID_PARAMS = 0x19,
SBE_SEC_BLACKLISTED_CHIPOP_ACCESS = 0x20,
SBE_SEC_DMT_TIMEOUT = 0x21,
};

/**
Expand Down

0 comments on commit 7e91363

Please sign in to comment.