diff options
author | Richard J. Knight <rjknight@us.ibm.com> | 2018-01-11 08:29:37 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-03-06 16:17:40 -0500 |
commit | b456c82ad8202fee197dee0274959cd020009f79 (patch) | |
tree | b099ac1a763d869ec2013213d06095ac336ee949 /src/usr/isteps/istep11/call_cen_pll_initf.C | |
parent | 82aaa7df696af0aa1b4b593a25f15671e2214e7d (diff) | |
download | talos-hostboot-b456c82ad8202fee197dee0274959cd020009f79.tar.gz talos-hostboot-b456c82ad8202fee197dee0274959cd020009f79.zip |
Modify putrRing code to pull rings from centaur hw image
-Remove hardcoded data data used for centaur init
-Add code to extract RS4 compressed ring data from centaur
hardware image
Change-Id: If3f5faaebe384a4e0756b06f518b270c7bd2062b
RTC: 171739
CMVC-Prereq: 1043602
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52063
Reviewed-by: Prachi Gupta <pragupta@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: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/isteps/istep11/call_cen_pll_initf.C')
-rw-r--r-- | src/usr/isteps/istep11/call_cen_pll_initf.C | 116 |
1 files changed, 86 insertions, 30 deletions
diff --git a/src/usr/isteps/istep11/call_cen_pll_initf.C b/src/usr/isteps/istep11/call_cen_pll_initf.C index b41458f8a..bf869dfcd 100644 --- a/src/usr/isteps/istep11/call_cen_pll_initf.C +++ b/src/usr/isteps/istep11/call_cen_pll_initf.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -33,6 +33,8 @@ #include <initservice/isteps_trace.H> +#include <pnor/pnorif.H> + // targeting support #include <targeting/common/commontargeting.H> #include <targeting/common/utilFilter.H> @@ -59,49 +61,103 @@ void* call_cen_pll_initf (void *io_pArgs) errlHndl_t l_err = NULL; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_pll_initf entry" ); + do + { - TARGETING::TargetHandleList l_membufTargetList; - getAllChips(l_membufTargetList, TYPE_MEMBUF); + TARGETING::TargetHandleList l_membufTargetList; + getAllChips(l_membufTargetList, TYPE_MEMBUF); - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_pll_initf: %d membufs found", - l_membufTargetList.size()); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_pll_initf: %d membufs found", + l_membufTargetList.size()); - for (const auto & l_membuf_target : l_membufTargetList) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "cen_pll_initf HWP target HUID %.8x", - TARGETING::get_huid(l_membuf_target)); +#ifdef CONFIG_SECUREBOOT + // only load the hw image if there are membufs present + if( l_membufTargetList.size() ) + { + l_err = loadSecureSection(PNOR::CENTAUR_HW_IMG); + + if(l_err) + { + // Create IStep error log and cross reference to error + // that occurred + l_StepError.addErrorDetails( l_err ); + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + ERR_MRK "Failed in call to loadSecureSection " + "for section PNOR:CENTAUR_HW_IMG"); + + // Commit Error + errlCommit( l_err, ISTEP_COMP_ID ); + break; + } + } + else + { + // no membufs, just exit + break; + } +#endif + for (const auto & l_membuf_target : l_membufTargetList) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "cen_pll_initf HWP target HUID %.8x", + TARGETING::get_huid(l_membuf_target)); - // call the HWP with each target - fapi2::Target <fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapi_membuf_target + // call the HWP with each target + fapi2::Target <fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapi_membuf_target (l_membuf_target); - FAPI_INVOKE_HWP(l_err, cen_pll_initf, l_fapi_membuf_target); + FAPI_INVOKE_HWP(l_err, cen_pll_initf, l_fapi_membuf_target); - // process return code. - if ( l_err ) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X: cen_pll_initf HWP on target HUID %.8x", - l_err->reasonCode(), TARGETING::get_huid(l_membuf_target) ); + // process return code. + if ( l_err ) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X: cen_pll_initf HWP on target HUID %.8x", + l_err->reasonCode(), + TARGETING::get_huid(l_membuf_target) ); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_membuf_target).addToLog( l_err ); - // capture the target data in the elog - ErrlUserDetailsTarget(l_membuf_target).addToLog( l_err ); + // Create IStep error log and cross reference the original + l_StepError.addErrorDetails( l_err ); - // Create IStep error log and cross reference to error that occurred - l_StepError.addErrorDetails( l_err ); + // Commit Error + errlCommit( l_err, ISTEP_COMP_ID ); + break; + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : cen_pll_initf HWP"); + } - // Commit Error - errlCommit( l_err, ISTEP_COMP_ID ); } - else + +#ifdef CONFIG_SECUREBOOT + if( l_membufTargetList.size() ) { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : cen_pll_initf HWP"); + l_err = unloadSecureSection(PNOR::CENTAUR_HW_IMG); + + if(l_err) + { + // Create IStep error log and cross reference to error that + // occurred + l_StepError.addErrorDetails( l_err ); + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + ERR_MRK "Failed in call to unloadSecureSection for " + "section PNOR:CENTAUR_HW_IMG"); + + // Commit Error + errlCommit( l_err, ISTEP_COMP_ID ); + break; + } } +#endif - } - + }while(0); TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_pll_initf exit" ); |