diff options
Diffstat (limited to 'src/usr/hwpf/hwp')
-rw-r--r-- | src/usr/hwpf/hwp/occ/occ.C | 55 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/occ/runtime/rt_occ.C | 25 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/start_payload/HBconfig | 4 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/start_payload/start_payload.C | 59 |
4 files changed, 85 insertions, 58 deletions
diff --git a/src/usr/hwpf/hwp/occ/occ.C b/src/usr/hwpf/hwp/occ/occ.C index e28a51415..a154893dd 100644 --- a/src/usr/hwpf/hwp/occ/occ.C +++ b/src/usr/hwpf/hwp/occ/occ.C @@ -24,6 +24,7 @@ /* IBM_PROLOG_END_TAG */ #include <stdint.h> +#include <config.h> #include <occ/occ.H> #include <initservice/taskargs.H> @@ -490,7 +491,7 @@ namespace HBOCC //////////////////////////////////////////////// - errlHndl_t loadnStartAllOccs() + errlHndl_t loadnStartAllOccs(TARGETING::Target *& o_failedOccTarget) { errlHndl_t l_errl = NULL; void* homerVirtAddrBase = NULL; @@ -573,11 +574,16 @@ namespace HBOCC homerPhysAddrBase); if(l_errl) { - TRACFCOMP( g_fapiImpTd, ERR_MRK"loadnStartAllOccs: loadnStartOcc failed!" ); + o_failedOccTarget = *itr; + TRACFCOMP( g_fapiImpTd, ERR_MRK + "loadnStartAllOccs:loadnStartOcc failed"); break; } } - + if (l_errl) + { + break; + } } else @@ -625,15 +631,24 @@ namespace HBOCC homerPhysAddrBase); if(l_errl) { - TRACFCOMP( g_fapiImpTd, ERR_MRK"loadnStartAllOccs: loadnStartOcc failed!" ); + o_failedOccTarget = *itr; + TRACFCOMP( g_fapiImpTd, ERR_MRK + "loadnStartAllOccs:loadnStartOcc failed"); break; } } + if (l_errl) + { + break; + } } } while(0); errlHndl_t l_tmpErrl = NULL; +//Unless HTMGT is in use, there are no further accesses to HOMER memory +//required during the IPL +#ifndef CONFIG_HTMGT if(homerVirtAddrBase) { int rc = 0; @@ -671,7 +686,7 @@ namespace HBOCC } } } - +#endif //make sure we always unload the module if (winkle_loaded) { @@ -696,6 +711,36 @@ namespace HBOCC return l_errl; } + errlHndl_t activateOCC () + { + errlHndl_t l_errl = NULL; + TARGETING::Target* l_failedOccTarget = NULL; + //uint8_t l_errStatus = 0; + + l_errl = loadnStartAllOccs (l_failedOccTarget); + if (l_errl) + { + errlCommit (l_errl, HWPF_COMP_ID); + //l_errStatus = 1; + } + + //TODO RTC:116027 + //HB configures/enables the occ buffers + + //TODO RTC:115636 + //HB enables the scon-via-i2c logic on the OCCs +#ifdef CONFIG_HTMGT + //TODO RTC:115585 + //HTMGT::htmgtOccLoadStartStatus + // (l_errStatus,l_failedOccTarget); + if (l_errl) + { + errlCommit (l_errl, HWPF_COMP_ID); + } +#endif + return l_errl; + } + } //end OCC namespace diff --git a/src/usr/hwpf/hwp/occ/runtime/rt_occ.C b/src/usr/hwpf/hwp/occ/runtime/rt_occ.C index 07f63e79f..27160e478 100644 --- a/src/usr/hwpf/hwp/occ/runtime/rt_occ.C +++ b/src/usr/hwpf/hwp/occ/runtime/rt_occ.C @@ -70,6 +70,24 @@ namespace RT_OCC //------------------------------------------------------------------------ + void occ_error (uint64_t i_chipId) + { + do + { + TARGETING::Target* l_failedOccTarget = NULL; + errlHndl_t l_errl =RT_TARG::getHbTarget(i_chipId,l_failedOccTarget); + if (l_errl) + { + TRACFCOMP (g_fapiTd, "occ_error: getHbTarget failed at %d chipId", i_chipId); + errlCommit (l_errl, HWPF_COMP_ID); + break; + } + //TODO RTC: 114906 + //HTMGT::htmgtProcessOccError(l_failedOccTarget); + } while (0); + } + + //--------------------------------------------------------------------- errlHndl_t addHostData(uint64_t i_hostdata_addr) { errlHndl_t err = NULL; @@ -612,9 +630,10 @@ namespace RT_OCC { runtimeInterfaces_t * rt_intf = getRuntimeInterfaces(); rt_intf->get_lid_list = &UtilLidMgr::getLidList; - rt_intf->loadOCC = &executeLoadOCC; - rt_intf->startOCCs = &executeStartOCCs; - rt_intf->stopOCCs = &executeStopOCCs; + rt_intf->occ_load = &executeLoadOCC; + rt_intf->occ_start = &executeStartOCCs; + rt_intf->occ_stop = &executeStopOCCs; + rt_intf->occ_error = &occ_error; // If we already loaded OCC during the IPL we need to fix up // the virtual address because we're now not using virtual diff --git a/src/usr/hwpf/hwp/start_payload/HBconfig b/src/usr/hwpf/hwp/start_payload/HBconfig index 3ab9e3e8d..70fdcb55e 100644 --- a/src/usr/hwpf/hwp/start_payload/HBconfig +++ b/src/usr/hwpf/hwp/start_payload/HBconfig @@ -2,3 +2,7 @@ config SET_NOMINAL_PSTATE default n help Set the PState to Nominal just before starting the payload. +config START_OCC_DURING_BOOT + default n + help + Activates all the OCCs during IPL diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.C b/src/usr/hwpf/hwp/start_payload/start_payload.C index 19fb2dcec..920edcc0b 100644 --- a/src/usr/hwpf/hwp/start_payload/start_payload.C +++ b/src/usr/hwpf/hwp/start_payload/start_payload.C @@ -86,7 +86,6 @@ #include <sys/mm.h> #include <algorithm> #include <config.h> - // Uncomment these files as they become available: // #include "host_start_payload/host_start_payload.H" @@ -313,58 +312,18 @@ void* call_host_runtime_setup( void *io_pArgs ) break; } - //Start OCC in AVP - if( is_avp_load() ) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Starting OCC" ); - - //Load modules needed by OCC - bool occ_loaded = false; - - if ( !VFS::module_is_loaded( "libocc.so" ) ) - { - l_err = VFS::module_load( "libocc.so" ); - - if ( l_err ) - { - // load module returned with errl set - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Could not load occ module" ); - // break from do loop if error occured - break; - } - occ_loaded = true; - } - - l_err = HBOCC::loadnStartAllOccs(); - if(l_err) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - ERR_MRK"loadnStartAllOccs failed" ); - } - - //make sure we always unload the module - if (occ_loaded) - { - errlHndl_t l_tmpErrl = NULL; - l_tmpErrl = VFS::module_unload( "libocc.so" ); - if ( l_tmpErrl ) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - ERR_MRK"Error unloading libocc module" ); - if(l_err) - { - errlCommit( l_tmpErrl, HWPF_COMP_ID ); - } - else - { - l_err = l_tmpErrl; - } - } - } + bool l_activateOCC = is_avp_load(); +#ifdef CONFIG_START_OCC_DURING_BOOT + l_activateOCC = true; +#endif + if(l_activateOCC) + { + l_err = HBOCC::activateOCC(); if (l_err) { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "activateOCC failed"); break; } } |