summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/plat
diff options
context:
space:
mode:
authorDoug Gilbert <dgilbert@us.ibm.com>2014-03-06 14:31:57 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-03-20 14:47:01 -0500
commit6c6ededed27870f024c4e46fecfcdd2b477d30ee (patch)
treeb33320cf16a12f30e5158733ff5ce92a7a7fe01d /src/usr/hwpf/plat
parentc753ba81874b631e12d42ea70dafb7ffa9a2b253 (diff)
downloadtalos-hostboot-6c6ededed27870f024c4e46fecfcdd2b477d30ee.tar.gz
talos-hostboot-6c6ededed27870f024c4e46fecfcdd2b477d30ee.zip
HBRT fapi wakeup support
RTC: 98665 Change-Id: Ib9e9f8f3656989975cc08a29304ba7faa25c59e4 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9364 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/plat')
-rw-r--r--src/usr/hwpf/plat/fapiPlatUtil.C56
1 files changed, 41 insertions, 15 deletions
diff --git a/src/usr/hwpf/plat/fapiPlatUtil.C b/src/usr/hwpf/plat/fapiPlatUtil.C
index 452158127..1c85d0a54 100644
--- a/src/usr/hwpf/plat/fapiPlatUtil.C
+++ b/src/usr/hwpf/plat/fapiPlatUtil.C
@@ -41,6 +41,8 @@
#ifdef __HOSTBOOT_RUNTIME
#include <runtime/interface.h>
#include <targeting/common/targetservice.H>
+#include <runtime/rt_targeting.H>
+#include <hwpf/hwpf_reasoncodes.H>
#endif
//******************************************************************************
@@ -261,24 +263,48 @@ fapi::ReturnCode fapiSpecialWakeup(const fapi::Target & i_target,
#ifdef __HOSTBOOT_RUNTIME
if(g_hostInterfaces && g_hostInterfaces->wakeup)
{
- // TODO Support wakeup RTC = 98665
- // We need to merge all rt - sapphire tareting id stuff into a
- // common runtime targeting util - right now some is in xscom and some
- // is in RT_OCC.
+ TARGETING::Target* target =
+ reinterpret_cast<TARGETING::Target*>(i_target.get());
- //TARGETING::Target* target =
- // reinterpret_cast<TARGETING::Target*>(i_target.get());
-
- //uint64_t core_id = 0;
- //int rc = g_hostInterfaces->wakeup(core_id,0);
- //if(rc)
- //{
- // FAPI_ERR("CPU core wakeup call to hypervisor returned rc = %d",
- // rc);
+ RT_TARG::rtChipId_t core_id = 0;
+ errlHndl_t err = RT_TARG::getRtTarget(target, core_id);
+ if(err)
+ {
+ fapi_rc.setPlatError(reinterpret_cast<void *>(err));
+ }
+ else
+ {
+ uint32_t mode = 0; //Force awake
+ if(!i_enable)
+ {
+ mode = 1; // clear force
+ }
+ int rc = g_hostInterfaces->wakeup(core_id, mode);
- // Make error log
+ if(rc)
+ {
+ FAPI_ERR("CPU core wakeup call to hypervisor returned rc = %d",
+ rc);
+ /*@
+ * @errortype
+ * @moduleid fapi::MOD_PLAT_SPECIAL_WAKEUP
+ * @reasoncode fapi::RC_RT_WAKEUP_FAILED
+ * @userdata1 Hypervisor return code
+ * @userdata2 Chiplet HUID
+ * @devdesc Error code from hypervisor wakeup call
+ */
+ const bool hbSwError = true;
+ err = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ fapi::MOD_PLAT_SPECIAL_WAKEUP,
+ fapi::RC_RT_WAKEUP_FAILED,
+ rc,
+ TARGETING::get_huid(target),
+ hbSwError);
- //}
+ fapi_rc.setPlatError(reinterpret_cast<void*>(err));
+ }
+ }
}
#endif
// On Hostboot, processor cores cannot sleep so return success to the
OpenPOWER on IntegriCloud