Skip to content

Commit

Permalink
I/O Obus Scominit & Dccal Udpate
Browse files Browse the repository at this point in the history
Change-Id: I31ea76f8cd28c77e64c9437d8e0bd9a40f09f7d4
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31498
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Gary A. Peterson <garyp@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31501
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
  • Loading branch information
steffenchris authored and wghoffa committed Feb 16, 2017
1 parent 59f4feb commit 7f5d96c
Show file tree
Hide file tree
Showing 10 changed files with 861 additions and 62 deletions.
584 changes: 584 additions & 0 deletions src/import/chips/p9/procedures/hwp/io/p9_io_obus_dccal.C

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions src/import/chips/p9/procedures/hwp/io/p9_io_obus_dccal.H
@@ -0,0 +1,66 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/import/chips/p9/procedures/hwp/io/p9_io_obus_dccal.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 */
///
/// @file p9_io_obus_dccal.H
/// @brief Run Dccal on the link.
///-----------------------------------------------------------------------------
/// *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 : 3
/// *HWP Consumed by : FSP:HB
///-----------------------------------------------------------------------------

#ifndef _P9_IO_OBUS_DCCAL_H
#define _P9_IO_OBUS_DCCAL_H

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

typedef fapi2::Target<fapi2::TARGET_TYPE_OBUS> OBUS_TGT;


typedef fapi2::ReturnCode (*p9_io_obus_dccal_FP_t)( const OBUS_TGT, const uint32_t );

extern "C"
{

/**
* @brief A I/O Obus Procedure that runs Rx Dccal and Tx Z Impedance Calibration
* on every group of the Obus.
* @param[in] i_tgt FAPI2 Target
* @param[in] i_lane_vector Lane Vector; to train all 24 lanes(0x00FFFFFF)
* @retval ReturnCode
*/
fapi2::ReturnCode p9_io_obus_dccal(
const OBUS_TGT i_tgt ,
const uint32_t i_lane_vector );

} // extern "C"

#endif // _P9_IO_OBUS_DCCAL_H
27 changes: 27 additions & 0 deletions src/import/chips/p9/procedures/hwp/io/p9_io_obus_dccal.mk
@@ -0,0 +1,27 @@
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/io/p9_io_obus_dccal.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_obus_dccal
OBJS+=p9_io_common.o
$(call BUILD_PROCEDURE)
8 changes: 2 additions & 6 deletions src/import/chips/p9/procedures/hwp/io/p9_io_obus_scominit.C
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 Down Expand Up @@ -65,9 +65,7 @@
//------------------------------------------------------------------------------

// HWP entry point, comments in header
fapi2::ReturnCode p9_io_obus_scominit(
const fapi2::Target<fapi2::TARGET_TYPE_OBUS>& i_target,
const fapi2::Target<fapi2::TARGET_TYPE_OBUS>& i_connected_target)
fapi2::ReturnCode p9_io_obus_scominit( const fapi2::Target<fapi2::TARGET_TYPE_OBUS>& i_target )
{
// mark HWP entry
FAPI_INF("p9_io_obus_scominit: Entering...");
Expand All @@ -88,8 +86,6 @@ fapi2::ReturnCode p9_io_obus_scominit(

FAPI_TRY( io::rmw( OPT_IORESET_HARD_BUS0, i_target, GROUP_00, LANE_00, CLEAR_RESET ) );



FAPI_INF("Invoke FAPI procedure core: input_target");
FAPI_EXEC_HWP(rc, p9_obus_scom, i_target, l_system_target);

Expand Down
10 changes: 3 additions & 7 deletions src/import/chips/p9/procedures/hwp/io/p9_io_obus_scominit.H
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 Down Expand Up @@ -54,8 +54,7 @@

// function pointer typedef definition for HWP call support
typedef fapi2::ReturnCode (*p9_io_obus_scominit_FP_t)
(const fapi2::Target<fapi2::TARGET_TYPE_OBUS>& i_target,
const fapi2::Target<fapi2::TARGET_TYPE_OBUS>& i_connected_target);
(const fapi2::Target<fapi2::TARGET_TYPE_OBUS>& i_target);

extern "C" {

Expand All @@ -69,14 +68,11 @@ extern "C" {
* Should be called for all valid/connected OBUS endpoints
*
* @param[in] i_target Reference to OBUS chiplet target
* i_connected_target Reference to connected OBUS chiplet target
* - p9.obus.scom.initfile
*
* @return FAPI2_RC_SUCCESS on success, error otherwise
*/
fapi2::ReturnCode p9_io_obus_scominit(
const fapi2::Target<fapi2::TARGET_TYPE_OBUS>& i_target,
const fapi2::Target<fapi2::TARGET_TYPE_OBUS>& i_connected_target);
fapi2::ReturnCode p9_io_obus_scominit(const fapi2::Target<fapi2::TARGET_TYPE_OBUS>& i_target);


} // extern "C"
Expand Down
9 changes: 3 additions & 6 deletions src/import/chips/p9/procedures/hwp/io/p9_io_scom.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016 */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -52,7 +52,7 @@
#define P9_XBUS_PHY_BASE_0x06010C00 0x06010C00
#define P9_ABUS0_PHY_BASE_0x09011000 0x09011000
#define P9_ABUS3_PHY_BASE_0x0C011000 0x0C011000
#define P9_OBUS0_PHY_BASE_0x09010C00 0x09011000
#define P9_OBUS0_PHY_BASE_0x09010C00 0x09010C00
#define P9_OBUS1_PHY_BASE_0x0A010C00 0x0A010C00
#define P9_OBUS2_PHY_BASE_0x0B010C00 0x0B010C00
#define P9_OBUS3_PHY_BASE_0x0C010C00 0x0C010C00
Expand Down Expand Up @@ -132,14 +132,11 @@ inline uint32_t get_base_address( const fapi2::Target < K > i_target, uint32_t&
o_base_addr = P9_XBUS_PHY_BASE_0x06010C00;
break;

case fapi2::TargetType::TARGET_TYPE_ABUS:
o_base_addr = P9_ABUS0_PHY_BASE_0x09011000;
break;

case fapi2::TargetType::TARGET_TYPE_MCS:
o_base_addr = P9_DMI0_PHY_BASE_0x02011A00;
break;

case fapi2::TargetType::TARGET_TYPE_ABUS:
case fapi2::TargetType::TARGET_TYPE_OBUS:
o_base_addr = P9_OBUS0_PHY_BASE_0x09010C00;
break;
Expand Down
@@ -0,0 +1,87 @@
<!-- IBM_PROLOG_BEGIN_TAG -->
<!-- This is an automatically generated prolog. -->
<!-- -->
<!-- $Source: src/import/chips/p9/procedures/xml/attribute_info/p9_io_obus_attributes.xml $ -->
<!-- -->
<!-- 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 -->
<attributes>
<!-- ********************************************************************** -->
<attribute>
<id>ATTR_IO_OBUS_DCCAL_FLAGS</id>
<targetType>TARGET_TYPE_OBUS</targetType>
<description>
Flags to indicate if rx / tx dccal has been run.
</description>
<valueType>uint8</valueType>
<enum>
NONE = 0x0,
TX = 0x1,
RX = 0x2
</enum>
<writeable/>
</attribute>
<!-- ********************************************************************** -->
<attribute>
<id>ATTR_IO_O_DEBUG</id>
<targetType>TARGET_TYPE_OBUS</targetType>
<description>
Indicate if debug data should be taken pre / post linktraining.
</description>
<valueType>uint8</valueType>
<enum>
FALSE = 0x0,
TRUE = 0x1
</enum>
<platInit/>
</attribute>
<!-- ********************************************************************** -->
<attribute>
<id>ATTR_IO_OBUS_TX_MARGIN_RATIO</id>
<targetType>TARGET_TYPE_OBUS</targetType>
<description>
Value to select amount of margin to be applied.
</description>
<valueType>uint8</valueType>
<platInit/>
</attribute>
<!-- ********************************************************************** -->
<attribute>
<id>ATTR_IO_OBUS_TX_FFE_PRECURSOR</id>
<targetType>TARGET_TYPE_OBUS</targetType>
<description>
Value to select amount of tx ffe precusor to apply.
</description>
<valueType>uint8</valueType>
<platInit/>
</attribute>
<!-- ********************************************************************** -->
<attribute>
<id>ATTR_IO_OBUS_TX_FFE_POSTCURSOR</id>
<targetType>TARGET_TYPE_OBUS</targetType>
<description>
Value to select amount of tx ffe postcusor to apply.
</description>
<valueType>uint8</valueType>
<platInit/>
</attribute>
<!-- ********************************************************************** -->

</attributes>
@@ -0,0 +1,56 @@
<!-- IBM_PROLOG_BEGIN_TAG -->
<!-- This is an automatically generated prolog. -->
<!-- -->
<!-- $Source: src/import/chips/p9/procedures/xml/error_info/p9_io_obus_errors.xml $ -->
<!-- -->
<!-- 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_obus_image_build_errors.xml. -->
<!-- Error definitions for p9_io_obus_image_build.C -->
<hwpErrors>
<!-- *********************************************************************** -->
<hwpError>
<rc>RC_IO_OBUS_RX_DCCAL_TIMEOUT</rc>
<ffdc>LANE</ffdc>
<ffdc>TARGET</ffdc>
<description>I/O Obus Rx Dccal(Offset calibration) Timeout</description>
<callout>
<target>TARGET</target>
<priority>MEDIUM</priority>
</callout>
<deconfigure>
<target>TARGET</target>
</deconfigure>
<gard>
<target>TARGET</target>
</gard>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
<rc>RC_P9_IO_PPE_OBUS_IMG_PTR_ERROR</rc>
<description>Image pointer passed in is bad.</description>
<ffdc>HW_IMG_PTR</ffdc>
<callout>
<procedure>CODE</procedure>
<priority>HIGH</priority>
</callout>
</hwpError>
<!-- *********************************************************************** -->
</hwpErrors>
20 changes: 20 additions & 0 deletions src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml
Expand Up @@ -87,6 +87,26 @@
<id>ATTR_PERF_24x7_INVOCATION_TIME_MS</id>
<default>0x1</default>
</attribute>
<attribute>
<id>ATTR_IO_OBUS_DCCAL_FLAGS</id>
<default>0x0</default>
</attribute>
<attribute>
<id>ATTR_IO_O_DEBUG</id>
<default>0x0</default>
</attribute>
<attribute>
<id>ATTR_IO_OBUS_TX_MARGIN_RATIO</id>
<default>0x0</default>
</attribute>
<attribute>
<id>ATTR_IO_OBUS_TX_FFE_PRECURSOR</id>
<default>0x0</default>
</attribute>
<attribute>
<id>ATTR_IO_OBUS_TX_FFE_POSTCURSOR</id>
<default>0x0</default>
</attribute>
<!-- =====================================================================
End of temporary definitions
================================================================= -->
Expand Down

0 comments on commit 7f5d96c

Please sign in to comment.