Skip to content

Commit

Permalink
L3 updates -- shell HWPs
Browse files Browse the repository at this point in the history
  p9_abus_scominit
  p9_attr_update
  p9_exit_cache_contained
  p9_pcie_hotplug_control

  All HWPs are currently empty, and planned to be so to my knowledge

Change-Id: If1210fd4fdbbaee6965beb70d2f6fac031d7c9d3
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41051
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: Benjamin Gass <bgass@us.ibm.com>
Reviewed-by: Peng Fei Gou <shgoupf@cn.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41055
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
jjmcgill authored and dcrowell77 committed Jun 13, 2017
1 parent 3e6b198 commit 78f670a
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 94 deletions.
21 changes: 9 additions & 12 deletions src/import/chips/p9/procedures/hwp/nest/p9_attr_update.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand All @@ -24,22 +24,23 @@
/* IBM_PROLOG_END_TAG */
///
/// @file p9_attr_update.C
/// @brief Stub HWP for FW to override attributes programmatically (FAPI2)
///
/// @brief Stub HWP for FW to override attributes programmatically
/// @author Joe McGill <jmcgill@us.ibm.com>
///

//
// *HWP HW Owner : Michael Dye <dyem@us.ibm.com>
// *HWP HW Owner : Joe McGill <jmcgill@us.ibm.com>
// *HWP FW Owner : Thi N. Tran <thi@us.ibm.com>
// *HWP Team : Nest
// *HWP Level : 2
// *HWP Level : 3
// *HWP Consumed by : HB
//

//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------
#include "p9_attr_update.H"
#include <p9_attr_update.H>

//------------------------------------------------------------------------------
// Function definitions
Expand All @@ -48,11 +49,7 @@
fapi2::ReturnCode
p9_attr_update(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target)
{
FAPI_DBG("Entering ...");

FAPI_DBG("Exiting ...");

//fapi_try_exit:
return fapi2::current_err;

FAPI_DBG("Start");
FAPI_DBG("End");
return fapi2::FAPI2_RC_SUCCESS;
}
18 changes: 10 additions & 8 deletions src/import/chips/p9/procedures/hwp/nest/p9_attr_update.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand All @@ -24,19 +24,19 @@
/* IBM_PROLOG_END_TAG */
///
/// @file p9_attr_update.H
/// @brief Stub HWP for FW to override attributes programmatically (FAPI2)
///
/// @brief Stub HWP for FW to override attributes programmatically
/// @author Joe McGill <jmcgill@us.ibm.com>
///

//
// *HWP HW Owner : Michael Dye <dyem@us.ibm.com>
// *HWP HW Owner : Joe McGill <jmcgill@us.ibm.com>
// *HWP FW Owner : Thi N. Tran <thi@us.ibm.com>
// *HWP Team : Nest
// *HWP Level : 1
// *HWP Level : 3
// *HWP Consumed by : HB
//


#ifndef _P9_ATTR_UPDATE_H_
#define _P9_ATTR_UPDATE_H_

Expand All @@ -48,8 +48,8 @@
//------------------------------------------------------------------------------
// Structure definitions
//------------------------------------------------------------------------------

typedef fapi2::ReturnCode (*p9_attr_update_FP_t)(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&);
typedef fapi2::ReturnCode (*p9_attr_update_FP_t)(
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&);

//------------------------------------------------------------------------------
// Function prototypes
Expand All @@ -58,11 +58,13 @@ typedef fapi2::ReturnCode (*p9_attr_update_FP_t)(const fapi2::Target<fapi2::TARG
extern "C"
{

///
/// @brief Placeholder for attribute overrides
///
/// @param[in] i_target Reference to processor chip target
/// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
fapi2::ReturnCode p9_attr_update(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target);
fapi2::ReturnCode p9_attr_update(
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target);

} // extern "C"

Expand Down
55 changes: 24 additions & 31 deletions src/import/chips/p9/procedures/hwp/nest/p9_exit_cache_contained.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand All @@ -22,50 +22,43 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */

///----------------------------------------------------------------------------
///
/// @file p9_exit_cache_contained.C
/// @brief Placeholder to apply inits needed prior to HB expansion from L3
/// cache to main memory (FAPI2)
///
/// @author Joe McGill <jmcgill@us.ibm.com>
///
/// @brief Contains inits to be performed before Hostboot expanded from
/// running inside the confines of the L3 cache out to main memory.
///----------------------------------------------------------------------------

//
// *HWP HWP Owner: Joe McGill <jmcgill@us.ibm.com>
// *HWP FW Owner: Thi Tran <thi@us.ibm.com>
// *HWP Team: Nest
// *HWP Level: 2
// *HWP Level: 3
// *HWP Consumed by: HB

//

//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------
#include <p9_exit_cache_contained.H>

extern "C"
{
///
/// p9_exit_cache_contained HWP entry point (Defined in .H file)
///
fapi2::ReturnCode p9_exit_cache_contained(const
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
& i_target)
{
fapi2::ReturnCode rc;

// Mark Entry
FAPI_INF("Entering ...");

// This procedure is a placeholder to add inits that might need to be
// performed before Hostboot expanded from running inside the confines
// of the L3 cache out to main memory.
// There is nothing specific to be added for P9 at this point.
//------------------------------------------------------------------------------
// Function definitions
//------------------------------------------------------------------------------

fapi2::ReturnCode
p9_exit_cache_contained(
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target)
{
// This procedure is a placeholder to add inits that might need to be
// performed before Hostboot expanded from running inside the confines
// of the L3 cache out to main memory.
// There is nothing specific to be added for P9 at this point.

// Mark Exit
FAPI_INF("Exiting ...");
FAPI_INF("Start");
FAPI_INF("End");

return rc;
}
} // extern "C"
/* End: */
return fapi2::FAPI2_RC_SUCCESS;
}
33 changes: 18 additions & 15 deletions src/import/chips/p9/procedures/hwp/nest/p9_exit_cache_contained.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand All @@ -23,50 +23,53 @@
/* */
/* IBM_PROLOG_END_TAG */
///

///----------------------------------------------------------------------------
/// @file p9_exit_cache_contained.H
/// @brief Placeholder to apply inits needed prior to HB expansion from L3
/// cache to main memory (FAPI2)
///
/// @author Joe McGill <jmcgill@us.ibm.com>
///
/// @brief Contains inits to be performed before Hostboot expanded from
/// running inside the confines of the L3 cache out to main memory.
///----------------------------------------------------------------------------

//
// *HWP HWP Owner: Joe McGill <jmcgill@us.ibm.com>
// *HWP FW Owner: Thi Tran <thi@us.ibm.com>
// *HWP Team: Nest
// *HWP Level: 2
// *HWP Level: 3
// *HWP Consumed by: HB
//
///

#ifndef _PROC_EXIT_CACHE_CONTAINED_H_
#define _PROC_EXIT_CACHE_CONTAINED_H_

//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------

#include <fapi2.H>

//------------------------------------------------------------------------------
// Structure definitions
//------------------------------------------------------------------------------

// Function pointer typedef definition for HWP call support
typedef fapi2::ReturnCode (*p9_exit_cache_contained_FP_t)(fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&);
typedef fapi2::ReturnCode (*p9_exit_cache_contained_FP_t)(
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&);

//------------------------------------------------------------------------------
// Function prototypes
//------------------------------------------------------------------------------
extern "C"
{

//------------------------------------------------------------------------------
// Hardware Procedure
//------------------------------------------------------------------------------
///
/// @brief Placeholder for overrides needed to step the core from
/// cache-contained execution to expand to memory
///
/// @param[in] i_target Reference to processor chip target
///
/// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
///
fapi2::ReturnCode p9_exit_cache_contained(const
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target);
fapi2::ReturnCode p9_exit_cache_contained(
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target);

} // extern "C"

Expand Down
25 changes: 13 additions & 12 deletions src/import/chips/p9/procedures/hwp/nest/p9_pcie_hotplug_control.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand All @@ -26,25 +26,26 @@
/// @file p9_pcie_hotplug_control.C
/// @brief Manage slot power on hot-plug controlled slots (FAPI2)
///
// *HWP HWP Owner: Christina Graves clgraves@us.ibm.com
// *HWP HWP Owner: Joe McGill jmcgill@us.ibm.com
// *HWP FW Owner: Thi Tran thi@us.ibm.com
// *HWP Team: Nest
// *HWP Level: 1
// *HWP Level: 3
// *HWP Consumed by: HB

//-----------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Includes
//-----------------------------------------------------------------------------------
//------------------------------------------------------------------------------
#include <p9_pcie_hotplug_control.H>


//-----------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Function definitions
//-----------------------------------------------------------------------------------
fapi2::ReturnCode p9_pcie_hotplug_control(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
const bool i_enable_slot_power)
//------------------------------------------------------------------------------

fapi2::ReturnCode p9_pcie_hotplug_control(
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
const bool i_enable_slot_power)
{
FAPI_INF("Start");
FAPI_INF("End");
FAPI_DBG("Start");
FAPI_DBG("End");
return fapi2::current_err;
}
33 changes: 17 additions & 16 deletions src/import/chips/p9/procedures/hwp/nest/p9_pcie_hotplug_control.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand All @@ -26,10 +26,11 @@
/// @file p9_pcie_hotplug_control.H
/// @brief Manage slot power on hot-plug controlled slots (FAPI2)
///
// *HWP HWP Owner: Christina Graves clgraves@us.ibm.com

// *HWP HWP Owner: Joe McGill jmcgill@us.ibm.com
// *HWP FW Owner: Thi Tran thi@us.ibm.com
// *HWP Team: Nest
// *HWP Level: 1
// *HWP Level: 3
// *HWP Consumed by: HB

#ifndef _P9_PCIE_HOTPLUG_CONTROL_H_
Expand All @@ -44,27 +45,27 @@
// Structure definitions
//-----------------------------------------------------------------------------------

//function pointer typedef definition for HWP call support
typedef fapi2::ReturnCode (*p9_pcie_hotplug_control_FP_t) (const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&,
const bool);
// function pointer typedef definition for HWP call support
typedef fapi2::ReturnCode (*p9_pcie_hotplug_control_FP_t) (
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&,
const bool);

//-----------------------------------------------------------------------------------
// Constant definitions
// Function prototype
//-----------------------------------------------------------------------------------

extern "C" {

//-----------------------------------------------------------------------------------
// Function prototype
//-----------------------------------------------------------------------------------

/// @brief Enable/disable PCIE slot power
/// @param[in] i_target => P9 chip target
/// @param[in] i_enable_slot_power => boolean to control power state (true=enable, false=disable)
/// @return FAPI_RC_SUCCESS if the setup completes successfully,
/// @param[in] i_target P9 chip target
/// @param[in] i_enable_slot_power boolean to control power state (true=enable,
/// false=disable)
/// @return FAPI_RC_SUCCESS if the setup completes successfully, else error
//
fapi2::ReturnCode p9_pcie_hotplug_control(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
const bool i_enable_slot_power);
fapi2::ReturnCode p9_pcie_hotplug_control(
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
const bool i_enable_slot_power);

} //extern"C"

#endif //_P9_PCIE_HOTPLUG_CONTROL_H_

0 comments on commit 78f670a

Please sign in to comment.