summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Dahle <dedahle@us.ibm.com>2013-06-17 12:10:59 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-07-01 10:21:32 -0500
commitc72b5d677c90ff1e3b17df2ad16f7d5377bc20ca (patch)
tree46d505ad3b775cc15b9cbbbb659def7e29458354
parent771ff7ddf36fa45b3e21238521dc6974385da12a (diff)
downloadtalos-hostboot-c72b5d677c90ff1e3b17df2ad16f7d5377bc20ca.tar.gz
talos-hostboot-c72b5d677c90ff1e3b17df2ad16f7d5377bc20ca.zip
Modify Hostboot error logging code to change UD section order.
Hostboot error logging code was modified to flatten the user-defined sections in a specific order, where hardware callouts are always first, and traces always last. Change-Id: Ie282869950790a1a8404095ac5e4b6a751a8383c RTC: 45890 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5048 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/usr/errl/errlentry.C84
1 files changed, 76 insertions, 8 deletions
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index ed6986545..d74175446 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -788,20 +788,88 @@ uint64_t ErrlEntry::flatten( void * o_pBuffer, uint64_t i_bufsize )
// flatten the optional user-defined sections
+ // Flattens in the following order: 1. Hardware Callouts
+ // 2. Other UD sections (non-trace)
+ // 3. Traces
+ // When the user-defined sections exceed 16kB, FSP ERRL discards
+ // any remaining user-defined sections. Therefore this order
+ // preserves the callouts, and then gives priority to other
+ // non-trace sections.
std::vector<ErrlUD*>::iterator it;
for(it = iv_SectionVector.begin(); it != iv_SectionVector.end(); it++)
{
- l_cb = (*it)->flatten( pBuffer, i_bufsize );
- if( 0 == l_cb )
+ // If UD section is a hardware callout.
+ if( (ERRL_COMP_ID == (*it)->iv_header.iv_compId) &&
+ (ERRL_UDT_CALLOUT == (*it)->iv_header.iv_sst) )
{
- // Rare.
- TRACFCOMP( g_trac_errl, ERR_MRK"ud.flatten error");
- l_flatCount = 0;
- break;
+ l_cb = (*it)->flatten( pBuffer, i_bufsize );
+ if( 0 == l_cb )
+ {
+ // Rare.
+ TRACFCOMP( g_trac_errl, ERR_MRK"ud.flatten error");
+ l_flatCount = 0;
+ break;
+ }
+ pBuffer += l_cb;
+ i_bufsize -= l_cb;
}
- pBuffer += l_cb;
- i_bufsize -= l_cb;
}
+
+ if( 0 == l_flatCount )
+ {
+ break;
+ }
+
+ for(it = iv_SectionVector.begin(); it != iv_SectionVector.end(); it++)
+ {
+ // If UD section is not a hardware callout and not a trace.
+ if( !(((ERRL_COMP_ID == (*it)->iv_header.iv_compId) &&
+ (ERRL_UDT_CALLOUT == (*it)->iv_header.iv_sst)) ||
+ ((FIPS_ERRL_COMP_ID == (*it)->iv_header.iv_compId) &&
+ (FIPS_ERRL_UDT_TRACE == (*it)->iv_header.iv_sst))) )
+ {
+ l_cb = (*it)->flatten( pBuffer, i_bufsize );
+ if( 0 == l_cb )
+ {
+ // Rare.
+ TRACFCOMP( g_trac_errl, ERR_MRK"ud.flatten error");
+ l_flatCount = 0;
+ break;
+ }
+ pBuffer += l_cb;
+ i_bufsize -= l_cb;
+ }
+ }
+
+ if( 0 == l_flatCount )
+ {
+ break;
+ }
+
+ for(it = iv_SectionVector.begin(); it != iv_SectionVector.end(); it++)
+ {
+ // If UD section is a trace.
+ if( (FIPS_ERRL_COMP_ID == (*it)->iv_header.iv_compId) &&
+ (FIPS_ERRL_UDT_TRACE == (*it)->iv_header.iv_sst) )
+ {
+ l_cb = (*it)->flatten( pBuffer, i_bufsize );
+ if( 0 == l_cb )
+ {
+ // Rare.
+ TRACFCOMP( g_trac_errl, ERR_MRK"ud.flatten error");
+ l_flatCount = 0;
+ break;
+ }
+ pBuffer += l_cb;
+ i_bufsize -= l_cb;
+ }
+ }
+
+ if( 0 == l_flatCount )
+ {
+ break;
+ }
+
}
while( 0 );
OpenPOWER on IntegriCloud