Skip to content

Commit

Permalink
Dummy commit to enable mirroring new files from gerrit review 41599 i…
Browse files Browse the repository at this point in the history
…nto HB

HWP that can be called, either as a callback from an error XML file via the
collectFfdc tag or, called directly, to check and clear an atomic lock on the
cache chiplet to allow collection of CME FFDC register content (SCOM/RAM)

Change-Id: I85dad65cf75f4b18e843d5e3ce06ff56230c33e1
RTC: 172582
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41681
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41832
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
am10dolkar authored and dcrowell77 committed Jun 15, 2017
1 parent 44c109e commit 727f9b3
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 0 deletions.
85 changes: 85 additions & 0 deletions src/import/chips/p9/procedures/hwp/ffdc/p9_eq_clear_atomic_lock.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/import/chips/p9/procedures/hwp/ffdc/p9_eq_clear_atomic_lock.C $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
/* */
/* http://www.apache.org/licenses/LICENSE-2.0 */
/* */
/* Unless required by applicable law or agreed to in writing, software */
/* distributed under the License is distributed on an "AS IS" BASIS, */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
/* implied. See the License for the specific language governing */
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
///
/// @file p9_eq_clear_atomic_lock.C
///
/// *HWP HW Owner : Greg Still <stillgs@us.ibm.com>
/// *HWP HW Backup Owner : Brian Vanderpool <vanderp@us.ibm.com>
/// *HWP FW Owner : Amit Tendolkar <amit.tendolkar@in.ibm.com>
/// *HWP Team : PM
/// *HWP Level : 2
/// *HWP Consumed by : SBE, HB

#include <hwp_error_info.H>
#include <p9_quad_scom_addresses.H>
#include <p9_quad_scom_addresses_fld.H>
#include <p9_eq_clear_atomic_lock.H>

extern "C"
{
fapi2::ReturnCode
p9_eq_clear_atomic_lock ( const fapi2::ffdc_t& i_eq_target,
fapi2::ReturnCode& io_rc )
{
FAPI_INF (">> p9_eq_clear_atomic_lock");
#if 0
fapi2::ReturnCode l_rc;
fapi2::buffer<uint64_t> l_value;

// Note: Not using FAPI_TRY in FFDC callback context, as it can
// potentially reset the fapi2::current_err
// Note: No FFDC to be added to io_rc in this particular callback

fapi2::Target<fapi2::TARGET_TYPE_EQ> l_eq =
*(reinterpret_cast<const fapi2::Target<fapi2::TARGET_TYPE_EQ> *>
(i_eq_target.ptr()));

l_rc = fapi2::getScom (l_eq, EQ_ATOMIC_LOCK_REG, l_value);

if ( (l_rc == fapi2::FAPI2_RC_SUCCESS) &&
(l_value.getBit<EQ_ATOMIC_LOCK_REG_ENABLE>() == 1))
{
// Pick the atomic lock if it was already taken
l_rc = fapi2::putScom (l_eq, EQ_ATOMIC_LOCK_REG, l_value);

if (l_rc == fapi2::FAPI2_RC_SUCCESS)
{
l_value.flush<0>();
// Clear the atomic lock
l_rc = fapi2::putScom (l_eq, EQ_ATOMIC_LOCK_REG, l_value);
}
}

if (l_rc != fapi2::FAPI2_RC_SUCCESS)
{
FAPI_ERR ("Could not clear eq atomic lock for FFDC");
}

#endif
FAPI_INF ("<< p9_eq_clear_atomic_lock");
return fapi2::FAPI2_RC_SUCCESS; // always return success
}
}

70 changes: 70 additions & 0 deletions src/import/chips/p9/procedures/hwp/ffdc/p9_eq_clear_atomic_lock.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/import/chips/p9/procedures/hwp/ffdc/p9_eq_clear_atomic_lock.H $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
/* */
/* http://www.apache.org/licenses/LICENSE-2.0 */
/* */
/* Unless required by applicable law or agreed to in writing, software */
/* distributed under the License is distributed on an "AS IS" BASIS, */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
/* implied. See the License for the specific language governing */
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
///
/// @file p9_eq_clear_atomic_lock.H
/// @brief FFDC procedure to pick up the atomic lock on cache chiplet
//
///
/// *HWP HW Owner : Greg Still <stillgs@us.ibm.com>
/// *HWP HW Backup Owner : Brian Vanderpool <vanderp@us.ibm.com>
/// *HWP FW Owner : Amit Tendolkar <amit.tendolkar@in.ibm.com>
/// *HWP Team : PM
/// *HWP Level : 2
/// *HWP Consumed by : SBE, HB

#ifndef __P9_EQ_CLEAR_ATOMIC_LOCK_H__
#define __P9_EQ_CLEAR_ATOMIC_LOCK_H__

//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------
#include <fapi2.H>
#include <error_info_defs.H>

/// @typedef p9_eq_clear_atomic_lock_FP_t
/// function pointer typedef definition for HWP call support
typedef fapi2::ReturnCode (*p9_eq_clear_atomic_lock_FP_t) (
const fapi2::ffdc_t&,
fapi2::ReturnCode&
);

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

/// @brief HWP to pick up the atomic lock on a cache chiplet to allow the
/// collection of CME FFDC register content (SCOM or RAM)
/// @param [in] i_eq_target TARGET_TYPE_EQ
/// @param [inout] io_rc Return code - unused
/// @return FAPI2_RC_SUCCESS Always succeeds
fapi2::ReturnCode
p9_eq_clear_atomic_lock ( const fapi2::ffdc_t& i_eq_target,
fapi2::ReturnCode& io_rc );

} // extern C

#endif // __P9_EQ_CLEAR_ATOMIC_LOCK_H__
26 changes: 26 additions & 0 deletions src/import/chips/p9/procedures/hwp/ffdc/p9_eq_clear_atomic_lock.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/ffdc/p9_eq_clear_atomic_lock.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2017
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_eq_clear_atomic_lock
$(call BUILD_PROCEDURE)

0 comments on commit 727f9b3

Please sign in to comment.