Skip to content

Commit 1b80bec

Browse files
author
Ilya Smirnov
committedOct 23, 2023
Odyssey FFDC: Fetch SBE FIFO FFDC
This commit introduces a separate function to fetch SBE FIFO FFDC data from an Odyssey chip and create an error log with returned FFDC data (SBE traces and attributes). Change-Id: Iee4511f421c010d346ca128581394e106b605f14 JIRA: PFHB-254 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/158447 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Combined Simics CI <combined-simics-ci+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com> Reviewed-by: Matthew Raybuck <matthew.raybuck@ibm.com> Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
1 parent 4c9a165 commit 1b80bec

File tree

5 files changed

+88
-1
lines changed

5 files changed

+88
-1
lines changed
 

‎src/include/usr/sbeio/sbeioif.H

+22
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,28 @@ namespace SBEIO
768768
uint32_t i_interval,
769769
uint8_t i_dqa);
770770

771+
/**
772+
* @brief Grab the Odyssey FIFO FFDC and create informational error log(s) with
773+
* the returned data (SBE traces and attribute data). The function
774+
* uses a chipop to Odyssey to get the data.
775+
*
776+
* @param[in] i_chipTarget The Odyssey chip to perform the chipop on
777+
*
778+
* @return std::vector<errlHndl_t> all error logs returned from SBE as FFDC
779+
*
780+
* @note If a failure occurred during the chip op to the SBE, the error log
781+
* returned will be included in the vector.
782+
*/
783+
std::vector<errlHndl_t> genFifoSBEFFDCErrls(TARGETING::Target* i_chipTarget);
784+
785+
/**
786+
* @brief Calls genFifoSBEFFDCErrl per each functional Odyssey OBMC chip
787+
* on the system.
788+
*
789+
* @note All errors are committed internally.
790+
*/
791+
void handleGenFifoSBEFFDCErrlRequest();
792+
771793
} //end namespace SBEIO
772794

773795
#endif /* _SBEIOIF_H */

‎src/include/usr/sbeio/sbeioreasoncodes.H

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ enum sbeioModuleId
6868
SBEIO_RT_SCOM = 0x17,
6969
SBEIO_PROCESS_ATTR_ARRAY = 0x18,
7070
SBEIO_FIFO_ODY_CHECKS = 0x19,
71+
SBEIO_FIFO_SBE_FFDC = 0x1A,
7172
};
7273

7374
/**
@@ -173,6 +174,7 @@ enum sbeioReasonCode
173174
SBEIO_ATTR_MISMATCH_DETECTED = SBEIO_COMP_ID | 0x6F,
174175

175176
SBEIO_RECEIVE_CODE_LEVELS_BAD_MSG = SBEIO_COMP_ID | 0x70,
177+
SBEIO_FIFO_SBE_FFDC_INFORMATIONAL = SBEIO_COMP_ID | 0x71,
176178

177179
// Remove once we collect the FFDC ourselves - @todo-RTC:144313
178180
//termination_rc

‎src/usr/sbeio/common/common.mk

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ OBJS += sbe_psuSendCoreConfig.o
6363
OBJS += pmic_n_mode_detect.o
6464
OBJS += sbe_fifo_buffer.o
6565
OBJS += ody_extract_sbe_rc.o
66+
OBJS += sbe_getSBEFFDC.o
6667

6768
#Common VPATHs
6869
VPATH += ${ROOTPATH}/src/usr/sbeio/common

‎src/usr/sbeio/makefile

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ OBJS += sbe_fifodd.o
4646
OBJS += sbe_scomAccess.o
4747
OBJS += sbe_scomAccessdd.o
4848
OBJS += sbe_setFFDCAddr.o
49-
OBJS += sbe_getSBEFFDC.o
5049
OBJS += sbe_attributeAccess.o
5150
OBJS += sbe_codeUpdate.o
5251
OBJS += sbe_iplControl.o

‎src/usr/sbeio/sbe_getSBEFFDC.C

+63
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
#include "sbe_fifodd.H"
3333
#include <sbeio/sbeioreasoncodes.H>
3434
#include <targeting/common/targetservice.H>
35+
#include "sbe_fifo_buffer.H"
36+
#include <sbeio/sbe_ffdc_parser.H>
37+
#include <targeting/odyutil.H>
3538

3639
extern trace_desc_t* g_trac_sbeio;
3740

@@ -83,4 +86,64 @@ namespace SBEIO
8386
return l_errl;
8487
};
8588

89+
std::vector<errlHndl_t> genFifoSBEFFDCErrls(TARGETING::Target* i_chipTarget)
90+
{
91+
std::vector<errlHndl_t> l_errls;
92+
do {
93+
uint32_t l_responseSize = SbeFifoRespBuffer::MSG_BUFFER_SIZE_WORDS;
94+
uint32_t *l_pFifoResponse =
95+
reinterpret_cast<uint32_t *>(malloc(l_responseSize));
96+
97+
errlHndl_t l_errl = getFifoSBEFFDC(i_chipTarget,
98+
l_pFifoResponse,
99+
l_responseSize);
100+
if(l_errl)
101+
{
102+
SBE_TRACF(ERR_MRK"genFifoSBEFFDCErrl: Error returned from SBE FFDC chip op");
103+
l_errls.push_back(l_errl);
104+
break;
105+
}
106+
107+
auto l_ffdcParser = std::make_shared<SbeFFDCParser>();
108+
l_ffdcParser->parseFFDCData(l_pFifoResponse);
109+
l_errls = l_ffdcParser->generateSbeErrors(SBEIO_FIFO_SBE_FFDC,
110+
SBEIO_FIFO_SBE_FFDC_INFORMATIONAL,
111+
get_huid(i_chipTarget), // userdata1
112+
0); // userdata2
113+
}while(0);
114+
115+
return l_errls;
116+
}
117+
118+
void handleGenFifoSBEFFDCErrlRequest()
119+
{
120+
using namespace TARGETING;
121+
std::vector<errlHndl_t> l_errls;
122+
123+
TargetHandleList l_ocmbs;
124+
getAllChips(l_ocmbs, TYPE_OCMB_CHIP); // Functional and non-functional
125+
126+
for(auto l_ocmb : l_ocmbs)
127+
{
128+
if(!UTIL::isOdysseyChip(l_ocmb))
129+
{
130+
continue;
131+
}
132+
133+
l_errls = SBEIO::genFifoSBEFFDCErrls(l_ocmb);
134+
for(auto l_errl : l_errls)
135+
{
136+
SBE_TRACF(INFO_MRK"handleGenFifoSBEFFDCErrlRequest: Committing errl PLID 0x%x for OCMB 0x%x", l_errl->plid(), get_huid(l_ocmb));
137+
138+
// Force these to be informational so there is no potential
139+
// callouts logged/parts deconfigured.
140+
if(l_errl)
141+
{
142+
l_errl->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL);
143+
}
144+
errlCommit(l_errl, SBEIO_COMP_ID);
145+
}
146+
}
147+
}
148+
86149
} //end namespace SBEIO

0 commit comments

Comments
 (0)
Please sign in to comment.