summaryrefslogtreecommitdiffstats
path: root/src/sbefw/sbecmdgeneric.C
diff options
context:
space:
mode:
authorSunil.Kumar <skumar8j@in.ibm.com>2016-07-26 08:36:33 -0500
committerAMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>2016-09-13 06:45:28 -0400
commitae6df59506b64974d5fb330d2800370a3e93c0b0 (patch)
treefbdd477663a94491cfc59be19e5e29eae6ca0413 /src/sbefw/sbecmdgeneric.C
parent618c1dd87d43f3e516dfb0dd50583febec8b95c8 (diff)
downloadtalos-sbe-ae6df59506b64974d5fb330d2800370a3e93c0b0.tar.gz
talos-sbe-ae6df59506b64974d5fb330d2800370a3e93c0b0.zip
RTC 128326 SBE : SBE ChipOps : Generic Messages : Get SBE FFDC
Change-Id: I034a43f67244a6f5e50c54b10f8bd4e013c6076a Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27610 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: RAJA DAS <rajadas2@in.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Diffstat (limited to 'src/sbefw/sbecmdgeneric.C')
-rw-r--r--src/sbefw/sbecmdgeneric.C54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/sbefw/sbecmdgeneric.C b/src/sbefw/sbecmdgeneric.C
index 88e79d01..31165e50 100644
--- a/src/sbefw/sbecmdgeneric.C
+++ b/src/sbefw/sbecmdgeneric.C
@@ -6,6 +6,7 @@
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -34,6 +35,7 @@
#include "sbe_sp_intf.H"
#include "sbe_build_info.H"
#include "sbeFifoMsgUtils.H"
+#include "sbeFFDC.H"
// Forward declaration
sbeCapabilityRespMsg::sbeCapabilityRespMsg()
@@ -47,6 +49,8 @@ sbeCapabilityRespMsg::sbeCapabilityRespMsg()
{
capability[idx] = 0;
}
+ // @TODO via RTC : 160602
+ // Update Capability flags based on lastes spec.
capability[IPL_CAPABILITY_START_IDX] =
EXECUTE_ISTEP_SUPPPORTED;
@@ -57,6 +61,7 @@ sbeCapabilityRespMsg::sbeCapabilityRespMsg()
PUT_SCOM_UNDER_MASK_SUPPPORTED ;
capability[GENERIC_CHIPOP_CAPABILITY_START_IDX] =
+ GET_SBE_FFDC_SUPPPORTED |
GET_SBE_CAPABILITIES_SUPPPORTED;
capability[MEMORY_CAPABILITY_START_IDX] =
@@ -115,3 +120,52 @@ uint32_t sbeGetCapabilities (uint8_t *i_pArg)
return rc;
#undef SBE_FUNC
}
+
+
+// Functions
+//----------------------------------------------------------------------------
+uint32_t sbeGetFfdc (uint8_t *i_pArg)
+{
+ #define SBE_FUNC "sbeGetFfdc "
+ SBE_DEBUG(SBE_FUNC);
+ uint32_t rc = SBE_SEC_OPERATION_SUCCESSFUL;
+ uint32_t len = 0;
+ sbeRespGenHdr_t respHdr;
+ respHdr.init();
+
+ do
+ {
+ // Dequeue the EOT entry as no more data is expected.
+ rc = sbeUpFifoDeq_mult (len, NULL);
+
+ if ( rc != SBE_SEC_OPERATION_SUCCESSFUL )
+ {
+ // Let command processor routine to handle the RC
+ break;
+ }
+
+ SbeFFDCPackage sbeFfdcPack;
+ len = 0;
+ //Send the FFDC data over FIFO.
+ // @TODO via RTC : 149074
+ // primary and secondary status should be picked
+ // from the globals.
+ rc = sbeFfdcPack.sendOverFIFO(respHdr.primaryStatus,
+ respHdr.secondaryStatus,
+ SBE_FFDC_ALL_DUMP,len,
+ true);
+ if (rc)
+ {
+ break;
+ }
+ rc = sbeDsSendRespHdr(respHdr);
+
+ }while(0);
+
+ if( rc )
+ {
+ SBE_ERROR( SBE_FUNC"Failed. rc[0x%X]", rc);
+ }
+ return rc;
+ #undef SBE_FUNC
+}
OpenPOWER on IntegriCloud