summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2012-08-13 19:51:02 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-08-16 13:47:12 -0500
commit3afee991ccf79716b952706edfdf128b16154810 (patch)
tree1822259c9915d14842de1c17c028b80fc532fe25
parentd268066a67809fa018b840f53163805f583aadcd (diff)
downloadtalos-hostboot-3afee991ccf79716b952706edfdf128b16154810.tar.gz
talos-hostboot-3afee991ccf79716b952706edfdf128b16154810.zip
HWPF: Add fapiSpecialWakeup interface
RTC: 46930 Change-Id: I7bddfeccd78278d96a367a9e5842fa504dedbe30 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1523 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Van H. Lee <vanlee@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/include/usr/hwpf/fapi/fapiUtil.H34
-rw-r--r--src/usr/hwpf/plat/fapiPlatUtil.C59
2 files changed, 71 insertions, 22 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiUtil.H b/src/include/usr/hwpf/fapi/fapiUtil.H
index 2991913c6..aba050859 100644
--- a/src/include/usr/hwpf/fapi/fapiUtil.H
+++ b/src/include/usr/hwpf/fapi/fapiUtil.H
@@ -44,6 +44,7 @@
* camvanng 11/15/2011 Pass target to fapiLoadInitFile
* and doxygen changes;
* needed by cronus
+ * mjjones 08/13/2012 Add fapiSpecialWakeup
*/
#ifndef FAPIUTIL_H_
@@ -180,6 +181,39 @@ fapi::ReturnCode fapiUnloadInitFile(const char * i_file, const char *& io_addr,
void fapiBreakPoint(uint32_t i_info);
+/**
+ * @brief Enable/Disable special wakeup on processor chip core(s)
+ *
+ * Special Wakeup Enable must be done when a HWP is doing an operation that
+ * requires core(s) to be awake (e.g. modifying the Sleep-Winkle image). For
+ * each Special Wakeup Enable call, there must be a subsequent Special Wakeup
+ * Disable call.
+ *
+ * This does not apply to SCOM operations, platforms must handle Special Wakeup
+ * for SCOM operations internally.
+ *
+ * If Special Wakeup is enabled, a core will not go to sleep (if already
+ * sleeping, it is woken up). If Special Wakeup is disabled, if there are no
+ * other active Enables, the core is allowed to sleep.
+ *
+ * @note Implemented by platform code calling the proc_cpu_special_wakeup HWP.
+ * This is a FAPI function because each platform may do different things
+ * Hostboot: Does nothing (cores cannot sleep while Hostboot running)
+ * FSP: Uses an algorithm to decide when to disable special wakeup
+ * Cronus: Does Special Wakeup enable/disable as requested
+ *
+ * @param[in] i_target
+ * TARGET_TYPE_PROC_CHIP: Enables/Disables Special Wakeup on all
+ * cores (EX chiplets) of the specified chip
+ * TARGET_TYPE_EX_CHIPLET: Enables/Disables Special Wakeup on the
+ * specified core (EX chiplet)
+ * @param[in] i_enable. true = enable. false = disable.
+ *
+ * @return ReturnCode. Zero on success, else platform specified error.
+ */
+fapi::ReturnCode fapiSpecialWakeup(const fapi::Target & i_target,
+ const bool i_enable);
+
}
namespace fapi
diff --git a/src/usr/hwpf/plat/fapiPlatUtil.C b/src/usr/hwpf/plat/fapiPlatUtil.C
index d5cbbf817..94bd2fc58 100644
--- a/src/usr/hwpf/plat/fapiPlatUtil.C
+++ b/src/usr/hwpf/plat/fapiPlatUtil.C
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/hwpf/plat/fapiPlatUtil.C $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/plat/fapiPlatUtil.C $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2011-2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
/**
* @file fapiPlatUtil.C
*
@@ -207,9 +208,23 @@ fapi::ReturnCode fapiUnloadInitFile(const char * i_file, const char *& io_addr,
return l_rc;
}
+//******************************************************************************
+// fapiBreakPoint
+//******************************************************************************
void fapiBreakPoint( uint32_t i_info)
{
INITSERVICE::iStepBreakPoint( i_info );
}
+//******************************************************************************
+// fapiSpecialWakeup
+//******************************************************************************
+fapi::ReturnCode fapiSpecialWakeup(const fapi::Target & i_target,
+ const bool i_enable)
+{
+ // On Hostboot, processor cores cannot sleep so return success to the
+ // fapiSpecialWakeup enable/disable calls
+ return fapi::FAPI_RC_SUCCESS;
+}
+
}
OpenPOWER on IntegriCloud