Skip to content

Commit

Permalink
I/O Xbus Read / Restore eRepair L1 Procedures
Browse files Browse the repository at this point in the history
Change-Id: Iad4c2a7e4bb4de2f10ad0b721166d6c6f841b490
Original-Change-Id: I10eaf6d89676106ea29d37406cec16724466eed3
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/21543
Tested-by: Jenkins Server
Reviewed-by: Sumit Kumar <sumit_kumar@in.ibm.com>
Reviewed-by: Richard J. Knight <rjknight@us.ibm.com>
Reviewed-by: Gary A. Peterson <garyp@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38891
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
steffenchris authored and dcrowell77 committed Apr 6, 2017
1 parent feb5e5e commit c04eaa1
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 0 deletions.
79 changes: 79 additions & 0 deletions src/import/chips/p9/procedures/hwp/io/p9_io_xbus_read_erepair.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/import/chips/p9/procedures/hwp/io/p9_io_xbus_read_erepair.C $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,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_io_xbus_read_erepair.C
/// @brief Read eRepair.
///----------------------------------------------------------------------------
/// *HWP HWP Owner : Chris Steffen <cwsteffen@us.ibm.com>
/// *HWP HWP Backup Owner : Gary Peterson <garyp@us.ibm.com>
/// *HWP FW Owner : Jamie Knight <rjknight@us.ibm.com>
/// *HWP Team : IO
/// *HWP Level : 1
/// *HWP Consumed by : FSP:HB
///----------------------------------------------------------------------------
///
/// @verbatim
/// High-level procedure flow:
///
/// A HWP that runs Read eRepair. This procedure reads the current bad
/// lanes and passes by reference the lane numbers in a vector.
///
/// Procedure Prereq:
/// - System clocks are running.
///
/// @endverbatim
///----------------------------------------------------------------------------

// ----------------------------------------------------------------------------
// Includes
// ----------------------------------------------------------------------------
#include "p9_io_xbus_read_erepair.H"

// ----------------------------------------------------------------------------
// Procedure Function
// ----------------------------------------------------------------------------


/**
* @brief A HWP that runs Read eRepair. This procedure reads the current bad
* lanes and passes by reference the lane numbers in a vector
* @param[in] i_target Reference to Target
* @param[out] o_bad_lanes Vector of bad lanes
* @retval ReturnCode
*/
fapi2::ReturnCode
p9_io_xbus_read_erepair(const fapi2::Target < fapi2::TARGET_TYPE_XBUS >& i_target,
std::vector< uint8_t >& o_bad_lanes)
{
FAPI_IMP("Entering...");
fapi2::ReturnCode rc = 0;
#if 0

fapi_try_exit:
#endif
FAPI_IMP("Exiting...");
return fapi2::FAPI2_RC_SUCCESS;
}

62 changes: 62 additions & 0 deletions src/import/chips/p9/procedures/hwp/io/p9_io_xbus_read_erepair.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/import/chips/p9/procedures/hwp/io/p9_io_xbus_read_erepair.H $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,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 */
///----------------------------------------------------------------------------
/// *HWP HWP Owner : Chris Steffen <cwsteffen@us.ibm.com>
/// *HWP HWP Backup Owner : Gary Peterson <garyp@us.ibm.com>
/// *HWP FW Owner : Jamie Knight <rjknight@us.ibm.com>
/// *HWP Team : IO
/// *HWP Level : 1
/// *HWP Consumed by : FSP:HB
///----------------------------------------------------------------------------

#ifndef _P9_IO_XBUS_READ_EREPAIR_H_
#define _P9_IO_XBUS_READ_EREPAIR_H_

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

// function pointer typedef definition for HWP call support
typedef fapi2::ReturnCode (*p9_io_xbus_read_erepair_FP_t)
(const fapi2::Target < fapi2::TARGET_TYPE_XBUS >&, std::vector< uint8_t >&);


extern "C"
{
/**
* @brief A HWP that runs Read eRepair. This procedure reads the current bad
* lanes and passes by reference the lane numbers in a vector
* @param[in] i_target Reference to Target
* @param[out] o_bad_lanes Vector of bad lanes
* @retval ReturnCode
*/
fapi2::ReturnCode
p9_io_xbus_read_erepair(const fapi2::Target< fapi2::TARGET_TYPE_XBUS >& i_target,
std::vector< uint8_t >& o_bad_lanes);

} // extern "C"

#endif // _P9_IO_XBUS_READ_EREPAIR_H_
26 changes: 26 additions & 0 deletions src/import/chips/p9/procedures/hwp/io/p9_io_xbus_read_erepair.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/io/p9_io_xbus_read_erepair.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2015,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_io_xbus_read_erepair
$(call BUILD_PROCEDURE)

0 comments on commit c04eaa1

Please sign in to comment.