diff options
author | Marty Gloff <mgloff@us.ibm.com> | 2017-07-07 16:52:37 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-07-17 11:07:38 -0400 |
commit | 735531f69b8db22ec2acc8b0aa1b73106a892f77 (patch) | |
tree | 3f664e2b18c3f8f4e59f1ff6260882507318be84 /src/usr/sbe | |
parent | 9ecbdfd70311bd7074ce341201779791a14e381c (diff) | |
download | talos-hostboot-735531f69b8db22ec2acc8b0aa1b73106a892f77.tar.gz talos-hostboot-735531f69b8db22ec2acc8b0aa1b73106a892f77.zip |
Log build level for SBE and HCODE customization
Extract build information from the XIP header for the SBE and HCODE
images. Trace the information.
Also use it as FFDC for related error logs.
Save the SBE build information in the SB keyword of MVPD.
Change-Id: I600a71ae6cbf342643261da14f6b3b2e6bf3cbf1
RTC: 168827
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42951
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
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>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/sbe')
-rw-r--r-- | src/usr/sbe/sbe_update.C | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/usr/sbe/sbe_update.C b/src/usr/sbe/sbe_update.C index b3366adf0..6fe32951d 100644 --- a/src/usr/sbe/sbe_update.C +++ b/src/usr/sbe/sbe_update.C @@ -38,6 +38,7 @@ #include <util/align.H> #include <util/crc32.H> #include <util/misc.H> +#include <util/utilxipimage.H> #include <errno.h> #include <pnor/pnorif.H> #include <pnor/ecc.H> @@ -1750,6 +1751,13 @@ namespace SBE errlHndl_t err = NULL; void *sbeHbblImgPtr = NULL; + // Clear build information + io_sbeState.new_imageBuild.buildDate = 0; + io_sbeState.new_imageBuild.buildTime = 0; + memset(io_sbeState.new_imageBuild.buildTag, + '\0', + sizeof(io_sbeState.new_imageBuild.buildTag) ); + do{ /************************************************************/ @@ -1832,6 +1840,11 @@ namespace SBE TRACFCOMP( g_trac_sbe, "getSbeInfoState() - " "sbePnorPtr=%p, sbePnorImageSize=0x%08X (%d)", sbePnorPtr, sbePnorImageSize, sbePnorImageSize); + + // Pull build information from XIP header and trace it + Util::pullTraceBuildInfo(sbePnorPtr, + io_sbeState.new_imageBuild, + g_trac_sbe); } // copy tmp_pnorVersion to the main structure @@ -2190,6 +2203,17 @@ namespace SBE }while(0); + if(err && (io_sbeState.new_imageBuild.buildDate != 0) && + (io_sbeState.new_imageBuild.buildTime != 0)) + { + err->addFFDC(SBE_COMP_ID, + &(io_sbeState.new_imageBuild), + sizeof(io_sbeState.new_imageBuild), + 0, // Version + ERRL_UDT_NOFORMAT, // parser ignores data + false ); // merge + } + return err; } @@ -2700,6 +2724,12 @@ namespace SBE &io_sbeState.new_seeprom_ver, sbeInfoSize ); + // Also update with new Build date, time, and tag for MVPD + memcpy( io_sbeState.seeprom_side_to_update == EEPROM::SBE_PRIMARY + ? &io_sbeState.mvpdSbKeyword.seeprom_0_build + : &io_sbeState.mvpdSbKeyword.seeprom_1_build, + &io_sbeState.new_imageBuild, + sizeof(Util::imageBuild_t) ); }while(0); // Free allocated memory |