diff options
author | Joe McGill <jmcgill@us.ibm.com> | 2015-09-22 22:15:06 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-06-10 22:14:58 -0400 |
commit | 44ab1ab0422516b8fb6375870c52ec6aab979096 (patch) | |
tree | 614d10292cbf65ccc23658b6b3697dcbf2a2e99b /src/import/chips/p9 | |
parent | 93efcd1d68dcce6680a6f68b048ccfd94863541b (diff) | |
download | talos-hostboot-44ab1ab0422516b8fb6375870c52ec6aab979096.tar.gz talos-hostboot-44ab1ab0422516b8fb6375870c52ec6aab979096.zip |
Shift HWP content to align with desired EKB layout
Change-Id: I112307522eeb9934842d07d922bb0894e19a6866
Original-Change-Id: Id22bf63b31e0631685139b9695c5a443cf4f2298
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20714
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25665
Tested-by: FSP CI Jenkins
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9')
6 files changed, 419 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.C new file mode 100644 index 000000000..6f0e4d27f --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.C @@ -0,0 +1,71 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: chips/p9/procedures/ipl/hwp/p9_pm_ocb_indir_access.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* EKB Project */ +/* */ +/* COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/// @file p9_pm_ocb_indir_access.C +/// @brief Performs the data transfer to/from an OCB indirect channel + +// *HWP HWP Owner : Greg Still <stillgs@us.ibm.com> +// *HWP Backup HWP Owner: +// *HWP FW Owner : Bilicon Patil <bilpatil@in.ibm.com> +// *HWP Team : PM +// *HWP Level : 1 +// *HWP Consumed by : HS + +/// +/// High-level procedure flow: +/// @verbatim +/// +/// Per HW220256, for Murano DD1, a push (Put) must first check for non-full +/// condition to avoid a data corruption scenario. This is fixed in +/// Venice DD1. +/// @endverbatim +/// + +// ---------------------------------------------------------------------- +// Includes +// ---------------------------------------------------------------------- +#include <p9_pm.H> +#include <p9_pm_ocb_indir_access.H> + + +// ---------------------------------------------------------------------- +// Constant definitions +// ---------------------------------------------------------------------- + +enum +{ + OCB_FULL_POLL_MAX = 4, + OCB_FULL_POLL_DELAY_HDW = 0, + OCB_FULL_POLL_DELAY_SIM = 0 +}; + +fapi2::ReturnCode p9_pm_ocb_indir_access( + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, + p9ocb::P9_OCB_CHAN_NUM i_ocb_chan, + p9ocb::P9_OCB_ACCESS_OP i_ocb_op, + const uint32_t i_ocb_req_length, + fapi2::buffer<uint64_t>& io_ocb_buffer, + uint32_t& o_ocb_act_length, + const bool i_oci_address_valid, + const uint32_t i_oci_address) +{ + FAPI_IMP("Entering..."); + + FAPI_IMP("Exit..."); + return fapi2::FAPI2_RC_SUCCESS; +} diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.H new file mode 100644 index 000000000..40f5fdb99 --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.H @@ -0,0 +1,103 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: chips/p9/procedures/ipl/hwp/p9_pm_ocb_indir_access.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* EKB Project */ +/* */ +/* COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* IBM_PROLOG_END_TAG */ +// @file p9_pm_ocb_indir_access.H +// @brief Access procedure to the OCC OCB indirect channels + +// *HWP HWP Owner : Greg Still <stillgs@us.ibm.com> +// *HWP Backup HWP Owner: +// *HWP FW Owner : Bilicon Patil <bilpatil@in.ibm.com> +// *HWP Team : PM +// *HWP Level : 1 +// *HWP Consumed by : HS + +#ifndef _P9_PM_OCBINDIRACC_H_ +#define _P9_PM_OCBINDIRACC_H_ + +//------------------------------------------------------------------------------ +// Includes +//------------------------------------------------------------------------------ +#include <fapi2.H> +#include <p9_pm_ocb_init.H> + +//------------------------------------------------------------------------------ +// Constant definitions +//------------------------------------------------------------------------------ + +namespace p9ocb +{ +enum P9_OCB_ACCESS_OP +{ + OCB_GET = 0x1, + OCB_PUT = 0x2 +}; +} + + +// function pointer typedef definition for HWP call support +typedef fapi2::ReturnCode (*p9_pm_ocb_indir_access_FP_t) +(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, + p9ocb::P9_OCB_CHAN_NUM i_ocb_chan, + p9ocb::P9_OCB_ACCESS_OP i_ocb_op, + const uint32_t i_ocb_req_length, + fapi2::buffer<uint64_t>& io_ocb_buffer, + uint32_t& o_ocb_act_length, + const bool i_oci_address_valid, + const uint32_t i_oci_address); + +//------------------------------------------------------------------------------ +// Function prototype +//------------------------------------------------------------------------------ + +extern "C" +{ + +/// @brief Provides for the abstract access to an OCB indirect channel that has +/// been configured previously via p9_pm_ocb_indir_setup_[linear/circular] +/// procedures +/// +/// @param[in] &i_target Chip target +/// @param[in] i_ocb_chan OCB channel number (0, 1, 2, 3) +/// @param[in] i_ocb_op Operation (Get, Put) +/// @param[in] i_ocb_req_length Requested length in the number of 8B +/// elements to be accessed (unit origin) +/// Number of bytes = (i_ocb_req_length) * +/// 8B +/// @param[in/out] &io_ocb_buffer Reference to fappi2::buffer +/// @param[out] &o_ocb_act_length Address containing to contain the actual +/// length in the number of 8B elements to +/// be accessed (zero origin) +/// Number of bytes = (i_ocb_act_length+1) * +/// 8B +/// @param[in] i_oci_address_valid Indicator that oci_address is to be used +/// @param[in] i_oci_address OCI Address to be used for the operation +/// @return FAPI2_RC_SUCCESS on success, else error. + + fapi2::ReturnCode p9_pm_ocb_indir_access( + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, + p9ocb::P9_OCB_CHAN_NUM i_ocb_chan, + p9ocb::P9_OCB_ACCESS_OP i_ocb_op, + const uint32_t i_ocb_req_length, + fapi2::buffer<uint64_t>& io_ocb_buffer, + uint32_t& o_ocb_act_length, + const bool i_oci_address_valid, + const uint32_t i_oci_address); + +} // extern "C" + +#endif // _P9_PM_OCBINDIRACC_H_ diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.mk b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.mk new file mode 100644 index 000000000..25e9cc284 --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_indir_access.mk @@ -0,0 +1,21 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: chips/p9/procedures/ipl/hwp/p9_pm_ocb_indir_access.mk $ +# +# IBM CONFIDENTIAL +# +# EKB Project +# +# COPYRIGHT 2015 +# [+] International Business Machines Corp. +# +# +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. +# +# IBM_PROLOG_END_TAG +PROCEDURE=p9_pm_ocb_indir_access +libp9_pm_ocb_indir_access_DEPLIBS += p9_pm_utils +$(call BUILD_PROCEDURE) diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C new file mode 100644 index 000000000..c9f785b12 --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C @@ -0,0 +1,139 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: chips/p9/procedures/ipl/hwp/p9_pm_reset.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* EKB Project */ +/* */ +/* COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/// +/// @file p9_pm_reset.C +/// @brief Wrapper that calls underlying HWPs to perform a Power Management +/// Reset function when needing to restart the OCC complex. +/// +// *HWP HWP Owner : Greg Still <stillgs@us.ibm.com> +// *HWP HWP Backup Owner : +// *HWP FW Owner : Bilicon Patil <bilpatil@in.ibm.com> +// *HWP Team : PM +// *HWP Level : 1 +// *HWP Consumed by : HS + +/// +/// High-level procedure flow: +/// +/// \verbatim +/// +/// do { +/// - Clear the Deep Exit Masks to allow Special Wake-up to occur +/// - Put all EX chiplets in special wakeup +/// - Mask the PM FIRs +/// - Disable PMC OCC HEARTBEAT before halting and reset OCC +/// - Halt and then Reset the PPC405 +/// - PMC moves to Vsafe value due to heartbeat loss +/// - Force Vsafe value into voltage controller to cover the case that +/// the Pstate hardware didn't move correctly +/// - Reset PCBS-PM +/// - Reset PMC +/// As the PMC reset kills ALL of the configuration, the idle +/// portion must be reestablished to allow that portion to operate. +/// - Run SLW Initialiation +/// - This allows special wake-up removal before exit +/// - Reset PSS +/// - Reset GPEs +/// - Reset PBA +/// - Reset SRAM Controller +/// - Reset OCB +/// - Clear special wakeups +/// } while(0); +/// +/// if error, clear special wakeups to leave this procedure clean +/// +/// SLW engine reset is not done here as this will blow away all setup +/// in istep 15. Thus, ALL manipulation of this is via calls to +/// p8_poreslw_ioit or by p8_poreslw_recovery. +/// +/// \endverbatim +/// + +// ----------------------------------------------------------------------------- +// Includes +// ----------------------------------------------------------------------------- +#include <p9_pm_reset.H> +#include <p9_pm_utils.H> + +// ----------------------------------------------------------------------------- +// Constant definitions +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// Global variables +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// Function prototypes +// ----------------------------------------------------------------------------- + +fapi2::ReturnCode special_wakeup_all( + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, + const bool i_action); + +fapi2::ReturnCode clear_deep_exit_mask( + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target); + +// ----------------------------------------------------------------------------- +// Function definitions +// ----------------------------------------------------------------------------- + +fapi2::ReturnCode p9_pm_reset( + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, + const uint32_t i_mode) +{ + FAPI_IMP("Entering..."); + + FAPI_IMP("Exiting..."); + + return fapi2::FAPI2_RC_SUCCESS; +} + +/// +/// @brief Sets or clears special wake-up on all configured EX on a target +/// +/// @param[in] i_target Chip target +/// @param[in] i_action true - ENABLE; false - DISABLE +/// +/// @return FAPI2_RC_SUCCESS If the special wake-up is successful, +/// else error code. +/// +fapi2::ReturnCode special_wakeup_all( + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, + const bool i_action) +{ + FAPI_INF("special_wakeup_all Enter"); + + return fapi2::FAPI2_RC_SUCCESS; +} + +/// +/// @brief Clear deep exit mask +/// +/// @param[in] i_target Chip target +/// +/// @return FAPI2_RC_SUCCESS on success, else error. +/// +fapi2::ReturnCode clear_deep_exit_mask( + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target) +{ + FAPI_INF("clear_deep_exit_mask Enter"); + + return fapi2::FAPI2_RC_SUCCESS; +} diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.H new file mode 100644 index 000000000..c866baecf --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.H @@ -0,0 +1,63 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: chips/p9/procedures/ipl/hwp/p9_pm_reset.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* EKB Project */ +/* */ +/* COPYRIGHT 2015 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/// +/// @file p9_pm_reset.H +/// @brief Wrapper that calls underlying HWPs to perform a Power Management +/// Reset function when needing to restart the OCC complex. +/// +// *HWP HWP Owner : Greg Still <stillgs@us.ibm.com> +// *HWP HWP Backup Owner : +// *HWP FW Owner : Bilicon Patil <bilpatil@in.ibm.com> +// *HWP Team : PM +// *HWP Level : 1 +// *HWP Consumed by : HS + +#ifndef _P9_PM_RESET_H +#define _P9_PM_RESET_H + +// ----------------------------------------------------------------------------- +// Constant definitions +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// Includes +// ----------------------------------------------------------------------------- +#include <p9_pm.H> +#include <fapi2.H> + +extern "C" +{ +//------------------------------------------------------------------------------ +/// +/// p9_pm_reset Call underlying unit procedures to perform readiness for +/// reinitialization of PM complex. +/// +/// @param[in] i_target Primary Chip target which will be passed +/// to all the procedures +/// @param[in] i_mode (PM_RESET (hard - will kill the PMC); +/// PM_RESET_SOFT (will not fully reset the PMC)) +/// +/// @return FAPI2_RC_SUCCESS on success, else error code. +/// + fapi2::ReturnCode p9_pm_reset( + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, + const uint32_t i_mode); +} + +#endif // _P9_PM_RESET_H diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk new file mode 100644 index 000000000..22d8f30ee --- /dev/null +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.mk @@ -0,0 +1,22 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: chips/p9/procedures/ipl/hwp/p9_pm_reset.mk $ +# +# IBM CONFIDENTIAL +# +# EKB Project +# +# COPYRIGHT 2015 +# [+] International Business Machines Corp. +# +# +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. +# +# IBM_PROLOG_END_TAG + +PROCEDURE=p9_pm_reset +libp9_pm_reset_DEPLIBS += p9_pm_utils +$(call BUILD_PROCEDURE) |