diff options
author | Prachi Gupta <pragupta@us.ibm.com> | 2014-09-23 16:12:05 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-11-12 13:44:53 -0600 |
commit | 85a60a8998a743e65660a8282bc758b3e3ed0056 (patch) | |
tree | f7463f8f4dcc2374c7d4a1de2e2cdb045c6d1ab6 /src/usr/hwpf/hwp/occ | |
parent | 6313118b632d0f985d9595dfad54e942a6ed02cf (diff) | |
download | talos-hostboot-85a60a8998a743e65660a8282bc758b3e3ed0056.tar.gz talos-hostboot-85a60a8998a743e65660a8282bc758b3e3ed0056.zip |
added activateOCC during IPL and occ_error during runtime
Change-Id: Icdba24cc9d8fadc597bd79b8bea60f1c358d636e
RTC: 114906
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13551
Tested-by: Jenkins Server
Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/occ')
-rw-r--r-- | src/usr/hwpf/hwp/occ/occ.C | 55 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/occ/runtime/rt_occ.C | 25 |
2 files changed, 72 insertions, 8 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 |