summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/slave_sbe
diff options
context:
space:
mode:
authorElizabeth Liner <eliner@us.ibm.com>2015-05-26 16:35:35 -0500
committerPatrick Williams <iawillia@us.ibm.com>2015-12-11 13:56:27 -0600
commit12bdd1a279cf7913b5da2010c8cbbc7ccfacf0a6 (patch)
tree376d9128fcb12ad04438794abbaf06d5005a7d99 /src/usr/hwpf/hwp/slave_sbe
parentc42a8d760ac7ea3b8529b6ff04d93dc9ac4e0add (diff)
downloadtalos-hostboot-12bdd1a279cf7913b5da2010c8cbbc7ccfacf0a6.tar.gz
talos-hostboot-12bdd1a279cf7913b5da2010c8cbbc7ccfacf0a6.zip
P9 - added new HWP's and removed old functions
Change-Id: Id64878834504858e7febf110bf50413ffaca0b73 RTC: 127334 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17966 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/slave_sbe')
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/makefile5
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable.C240
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable.H88
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable_errors.xml49
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.C254
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.H88
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete_errors.xml67
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_revert_sbe_mcs_setup/proc_revert_sbe_mcs_setup.C304
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_revert_sbe_mcs_setup/proc_revert_sbe_mcs_setup.H112
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/slave_sbe.C126
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/slave_sbe.H25
11 files changed, 75 insertions, 1283 deletions
diff --git a/src/usr/hwpf/hwp/slave_sbe/makefile b/src/usr/hwpf/hwp/slave_sbe/makefile
index 93a08aef3..876ebaaac 100644
--- a/src/usr/hwpf/hwp/slave_sbe/makefile
+++ b/src/usr/hwpf/hwp/slave_sbe/makefile
@@ -38,7 +38,6 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include
## Include sub dirs
## NOTE: add a new EXTRAINCDIR when you add a new HWP
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe
-EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe/proc_revert_sbe_mcs_setup
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe/proc_getecid
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable
@@ -53,12 +52,9 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_time
## NOTE: add new object files when you add a new HWP
OBJS += slave_sbe.o
-OBJS += proc_revert_sbe_mcs_setup.o
-OBJS += proc_check_slave_sbe_seeprom_complete.o
OBJS += proc_extract_sbe_rc.o
OBJS += proc_read_seeprom.o
OBJS += proc_getecid.o
-OBJS += proc_cen_ref_clk_enable.o
OBJS += proc_spless_sbe_startWA.o
OBJS += proc_reset_i2cm_bus_fence.o
OBJS += proc_check_master_sbe_seeprom.o
@@ -69,7 +65,6 @@ OBJS += proc_extract_pore_halt_ffdc.o
## NOTE: add a new directory onto the vpaths when you add a new HWP
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable
-VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe/proc_revert_sbe_mcs_setup
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe/proc_getecid
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe/proc_spless_sbe_startWA
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable.C b/src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable.C
deleted file mode 100644
index 0f585da26..000000000
--- a/src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable.C
+++ /dev/null
@@ -1,240 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2014 */
-/* [+] 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 */
-// $Id: proc_cen_ref_clk_enable.C,v 1.4 2014/04/14 18:57:01 jmcgill Exp $
-// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_cen_ref_clk_enable.C,v $
-//------------------------------------------------------------------------------
-// *|
-// *! (C) Copyright International Business Machines Corp. 2012
-// *! All Rights Reserved -- Property of IBM
-// *! *** ***
-// *|
-// *! TITLE : proc_cen_ref_clk_enable.C
-// *! DESCRIPTION : Enable Centaur reference clocks (FAPI)
-// *!
-// *! OWNER NAME : Benedikt Geukes Email: benedikt.geukes@de.ibm.com
-// *! BACKUP NAME : Ralph Koester Email: rkoester@de.ibm.com
-// *!
-//------------------------------------------------------------------------------
-
-//------------------------------------------------------------------------------
-// Includes
-//------------------------------------------------------------------------------
-#include "proc_check_master_sbe_seeprom.H"
-#include "proc_cen_ref_clk_enable.H"
-
-//------------------------------------------------------------------------------
-// Function definitions
-//------------------------------------------------------------------------------
-
-extern "C"
-{
-
-
-//------------------------------------------------------------------------------
-// Hardware Procedure
-//------------------------------------------------------------------------------
-// parameters: i_target => chip target
-// i_attached_centaurs => bitmask representing attached Centaur
-// positions
-// returns: FAPI_RC_SUCCESS if operation was successful, else error
-//------------------------------------------------------------------------------
-fapi::ReturnCode proc_cen_ref_clk_enable(const fapi::Target & i_target,
- const uint8_t i_attached_centaurs)
-{
-
- ecmdDataBufferBase reg_data(32);
- uint32_t rc_ecmd = 0;
- fapi::ReturnCode rc;
- bool is_master = false;
- uint8_t configured_centaurs = 0x00;
- std::vector<fapi::Target> mcs_targets;
-
-
- do
- {
- // determine chip status (master/slave) to differentiate access path to FSI GP8 register
- // master: SCOM
- // slave: CFAM
- rc = proc_check_master_sbe_seeprom(i_target, is_master);
- if (!rc.ok())
- {
- FAPI_ERR("proc_cen_ref_clk_enable: Error from proc_check_master_sbe_seeprom");
- break;
- }
-
- FAPI_INF("proc_cen_ref_clk_enable: Target %s is %s, attached Centaurs: 0x%02X",
- i_target.toEcmdString(), (is_master)?("master"):("slave"), i_attached_centaurs);
-
- // obtain set of functional MCS chiplets
- rc = fapiGetChildChiplets(i_target,
- fapi::TARGET_TYPE_MCS_CHIPLET,
- mcs_targets,
- fapi::TARGET_STATE_FUNCTIONAL);
- if (!rc.ok())
- {
- FAPI_ERR("proc_cen_ref_clk_enable: Error from fapiGetChildChiplets");
- break;
- }
-
- // loop through MCS chiplets, match with attached Centaurs
- for (std::vector<fapi::Target>::iterator i = mcs_targets.begin();
- (i != mcs_targets.end()) && !rc && !rc_ecmd;
- i++)
- {
- uint8_t mcs_unit_id = 0x00;
- uint8_t refclock_bit = 0x00;
-
- rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS,
- &(*i),
- mcs_unit_id);
- if (rc)
- {
- FAPI_ERR("proc_cen_ref_clk_enable: Error querying ATTR_CHIP_UNIT_POS");
- break;
- }
-
- // continue to next iteration if this MCS is not connected to a Centaur
- if (!(i_attached_centaurs & (1 << ((NUM_CENTAUR_POS-1)-mcs_unit_id))))
- {
- FAPI_DBG("proc_cen_ref_clk_enable: MCS %d is not connected to a Centaur, skipping...\n", mcs_unit_id);
- }
- else
- {
- // mark that we have configured this MCS/Centaur pair
- configured_centaurs |= (1 << ((NUM_CENTAUR_POS-1)-mcs_unit_id));
- FAPI_DBG("proc_cen_ref_clk_enable: MCS %d is connected to a Centaur, configured_centaurs: %02X\n", mcs_unit_id,configured_centaurs);
-
- // query attribute which defines reflock bit associated with this Centaur
- rc = FAPI_ATTR_GET(ATTR_DMI_REFCLOCK_SWIZZLE,
- &(*i),
- refclock_bit);
- if (rc)
- {
- FAPI_ERR("proc_cen_ref_clk_enable: Error querying ATTR_DMI_REFCLOCK_SWIZZLE");
- break;
- }
- FAPI_DBG("proc_cen_ref_clk_enable: refclock_bit: %02X\n", refclock_bit);
-
- if ((FSI_GP8_CENTAUR_REFCLOCK_START_BIT + refclock_bit) > FSI_GP8_CENTAUR_REFCLOCK_END_BIT)
- {
- // bit offset exceeds field range
- FAPI_ERR("proc_cen_ref_clk_enable: Translated Centaur refclock enable bit position is out of range!");
- const fapi::Target& PROC_TARGET = i_target;
- const uint8_t& CENTAUR_POSITION = mcs_unit_id;
- const uint8_t& REFCLOCK_BIT = refclock_bit;
- FAPI_SET_HWP_ERROR(rc,
- RC_PROC_CEN_REF_CLK_ENABLE_SWIZZLE_ERR);
- break;
- }
-
- rc_ecmd |= reg_data.setBit(FSI_GP8_CENTAUR_REFCLOCK_START_BIT+
- refclock_bit);
- }
- }
- if (rc)
- {
- break;
- }
- if (rc_ecmd)
- {
- FAPI_ERR("proc_cen_ref_clk_enable: Error (0x%x) setting up refclock enable OR data buffer",
- rc_ecmd);
- rc.setEcmdError(rc_ecmd);
- break;
- }
-
- if (configured_centaurs != i_attached_centaurs)
- {
- FAPI_ERR("proc_cen_ref_clk_enable: Not all Centaurs marked as attached were configured");
- const fapi::Target& PROC_TARGET = i_target;
- const uint8_t& CONFIGURED_CENTAUR_POSITIONS = configured_centaurs;
- const uint8_t& ATTACHED_CENTAUR_POSITIONS = i_attached_centaurs;
- FAPI_SET_HWP_ERROR(rc,
- RC_PROC_CEN_REF_CLK_ENABLE_CONFIG_ERR);
- break;
- }
-
- FAPI_INF("proc_cen_ref_clk_enable: Enable refclk for functional Centaur chips...");
- if (is_master)
- {
- ecmdDataBufferBase scom_data(64);
- rc = fapiGetScom(i_target, MBOX_FSIGP8_0x00050017, scom_data);
- if (rc)
- {
- FAPI_ERR("proc_cen_ref_clk_enable: fapiGetScom error (MBOX_FSIGP8_0x00050017)");
- break;
- }
-
- rc_ecmd |= scom_data.setOr(reg_data.getWord(0), 0, 32);
- if (rc_ecmd)
- {
- FAPI_ERR("proc_cen_ref_clk_enable: Error (0x%x) setting up FSI GP8 write data buffer (SCOM)",
- rc_ecmd);
- rc.setEcmdError(rc_ecmd);
- break;
- }
-
- rc = fapiPutScom(i_target, MBOX_FSIGP8_0x00050017, scom_data);
- if (rc)
- {
- FAPI_ERR("proc_cen_ref_clk_enable: fapiPutScom error (MBOX_FSIGP8_0x00050017)");
- break;
- }
- }
- else
- {
- ecmdDataBufferBase cfam_data(32);
- rc = fapiGetCfamRegister(i_target, CFAM_FSI_GP8_0x00002817, cfam_data);
- if (rc)
- {
- FAPI_ERR("proc_cen_ref_clk_enable: fapiGetCfamRegister error (CFAM_FSI_GP8_0x00001017)");
- break;
- }
-
- rc_ecmd |= cfam_data.setOr(reg_data.getWord(0), 0, 32);
- if (rc_ecmd)
- {
- FAPI_ERR("proc_cen_ref_clk_enable: Error (0x%x) setting up FSI GP8 write data buffer (CFAM)",
- rc_ecmd);
- rc.setEcmdError(rc_ecmd);
- break;
- }
-
- rc = fapiPutCfamRegister(i_target, CFAM_FSI_GP8_0x00002817, cfam_data);
- if (rc)
- {
- FAPI_ERR("proc_cen_ref_clk_enable: fapiPutCfamRegister error (CFAM_FSI_GP8_0x00001017)");
- break;
- }
- }
- } while(0); // end do
-
- // mark function exit
- FAPI_INF("proc_cen_ref_clk_enable: Exit");
- return rc;
-} // end FAPI procedure proc_cen_ref_clk_enable
-
-
-} // extern "C"
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable.H b/src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable.H
deleted file mode 100644
index ee23ec1d7..000000000
--- a/src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable.H
+++ /dev/null
@@ -1,88 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2014 */
-/* [+] 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 */
-// $Id: proc_cen_ref_clk_enable.H,v 1.1 2013/08/12 18:19:30 jmcgill Exp $
-// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_cen_ref_clk_enable.H,v $
-//------------------------------------------------------------------------------
-// *|
-// *! (C) Copyright International Business Machines Corp. 2012
-// *! All Rights Reserved -- Property of IBM
-// *! *** ***
-// *|
-// *! TITLE : proc_cen_ref_clk_enable.H
-// *! DESCRIPTION : Enable Centaur reference clocks (FAPI)
-// *!
-// *! OWNER NAME : Benedikt Geukes Email: benedikt.geukes@de.ibm.com
-// *!
-//------------------------------------------------------------------------------
-
-#ifndef _PROC_CEN_REF_CLK_ENABLE_H_
-#define _PROC_CEN_REF_CLK_ENABLE_H_
-
-//------------------------------------------------------------------------------
-// Includes
-//------------------------------------------------------------------------------
-
-#include <fapi.H>
-#include "p8_scom_addresses.H"
-
-//------------------------------------------------------------------------------
-// Structure definitions
-//------------------------------------------------------------------------------
-
-// function pointer typedef definition for HWP call support
-typedef fapi::ReturnCode (*proc_cen_ref_clk_enable_FP_t)(const fapi::Target &,
- const uint8_t);
-
-
-//------------------------------------------------------------------------------
-// Constant definitions
-//------------------------------------------------------------------------------
-
-const uint8_t NUM_CENTAUR_POS = 8;
-const uint8_t FSI_GP8_CENTAUR_REFCLOCK_START_BIT = 16;
-const uint8_t FSI_GP8_CENTAUR_REFCLOCK_END_BIT = (FSI_GP8_CENTAUR_REFCLOCK_START_BIT + NUM_CENTAUR_POS - 1);
-
-//------------------------------------------------------------------------------
-// Function prototypes
-//------------------------------------------------------------------------------
-
-
-extern "C"
-{
-
-/**
- * @brief Enble Centaur reference clocks
- *
- * @param[in] i_target chip target
- * @param[in] i_attached_centaurs Bitmask representing attached Centaur positions
- *
- * @return ReturnCode
- */
- fapi::ReturnCode proc_cen_ref_clk_enable(const fapi::Target & i_target,
- const uint8_t i_attached_centaurs);
-
-} // extern "C"
-
-#endif // _PROC_CEN_REF_CLK_ENABLE_H
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable_errors.xml b/src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable_errors.xml
deleted file mode 100644
index 46a7fabfd..000000000
--- a/src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable_errors.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<!-- IBM_PROLOG_BEGIN_TAG -->
-<!-- This is an automatically generated prolog. -->
-<!-- -->
-<!-- $Source: src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable/proc_cen_ref_clk_enable_errors.xml $ -->
-<!-- -->
-<!-- OpenPOWER HostBoot Project -->
-<!-- -->
-<!-- COPYRIGHT International Business Machines Corp. 2013,2014 -->
-<!-- -->
-<!-- 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 -->
-<!-- $Id: proc_cen_ref_clk_enable_errors.xml,v 1.2 2014/02/28 17:53:41 jmcgill Exp $ -->
-<!-- Error definitions for proc_cen_ref_clk_enable -->
-<hwpErrors>
- <!-- *********************************************************************** -->
- <hwpError>
- <rc>RC_PROC_CEN_REF_CLK_ENABLE_SWIZZLE_ERR</rc>
- <description>Translated Centaur refclock enable bit position is out of range.</description>
- <ffdc>PROC_TARGET</ffdc>
- <ffdc>CENTAUR_POSITION</ffdc>
- <ffdc>REFCLOCK_BIT</ffdc>
- <callout>
- <procedure>CODE</procedure>
- <priority>HIGH</priority>
- </callout>
- </hwpError>
- <hwpError>
- <rc>RC_PROC_CEN_REF_CLK_ENABLE_CONFIG_ERR</rc>
- <description>Not all Centaurs marked as attached were configured.</description>
- <ffdc>PROC_TARGET</ffdc>
- <ffdc>CONFIGURED_CENTAUR_POSITIONS</ffdc>
- <ffdc>ATTACHED_CENTAUR_POSITIONS</ffdc>
- <callout>
- <procedure>CODE</procedure>
- <priority>HIGH</priority>
- </callout>
- </hwpError>
-</hwpErrors>
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.C b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.C
deleted file mode 100644
index 7f13acc5c..000000000
--- a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.C
+++ /dev/null
@@ -1,254 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2015 */
-/* [+] 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 */
-// -*- mode: C++; c-file-style: "linux"; -*-
-// $Id: proc_check_slave_sbe_seeprom_complete.C,v 1.18 2015/07/27 00:36:23 jmcgill Exp $
-// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_check_slave_sbe_seeprom_complete.C,v $
-//------------------------------------------------------------------------------
-// *|
-// *! (C) Copyright International Business Machines Corp. 2012
-// *! All Rights Reserved -- Property of IBM
-// *! *** ***
-// *|
-// *! TITLE : proc_check_slave_sbe_seeprom_complete.C
-// *! DESCRIPTION : Check if a slave has completed the seeprom code
-// *!
-// *! OWNER NAME : Joe McGill Email: jmcgill@us.ibm.com
-// *!
-//------------------------------------------------------------------------------
-
-
-//------------------------------------------------------------------------------
-// Includes
-//------------------------------------------------------------------------------
-#include <proc_check_slave_sbe_seeprom_complete.H>
-#include <p8_scom_addresses.H>
-#include <p8_istep_num.H>
-#include <proc_sbe_check_master.H>
-#include <proc_sbe_enable_pnor.H>
-#include <proc_sbe_scan_service.H>
-#include <proc_extract_sbe_rc.H>
-#include <proc_reset_i2cm_bus_fence.H>
-#include <proc_sbe_utils.H>
-
-
-//------------------------------------------------------------------------------
-// Constant definitions
-//------------------------------------------------------------------------------
-const uint64_t NS_TO_FINISH = 10000000; //(10 ms)
-const uint64_t MS_TO_FINISH = NS_TO_FINISH/1000000;
-const uint64_t SIM_CYCLES_TO_FINISH = 10000000;
-
-const uint8_t SBE_EXIT_SUCCESS_0xF = 0xF;
-
-//------------------------------------------------------------------------------
-// Function definitions
-//------------------------------------------------------------------------------
-
-extern "C"
-{
-
-fapi::ReturnCode proc_check_slave_sbe_seeprom_complete(
- const fapi::Target & i_target,
- const void * i_pSEEPROM,
- const size_t i_wait_in_ms)
-{
- // return codes
- fapi::ReturnCode rc;
-
- // track if procedure has cleared I2C master bus fence
- bool i2cm_bus_fence_cleared = false;
-
- // mark function entry
- FAPI_INF("Start");
-
- do
- {
- //
- // ensure SBE was started
- //
-
- ecmdDataBufferBase sbe_vital_data(32);
- FAPI_DBG("Checking SBE Vital register");
- rc = fapiGetCfamRegister(i_target, CFAM_FSI_SBE_VITAL_0x0000281C, sbe_vital_data);
- if (!rc.ok())
- {
- FAPI_ERR("Error reading SBE Vital register");
- break;
- }
- if (sbe_vital_data.isBitClear(12,20))
- {
- // status has not been updated, something is wrong
- FAPI_ERR("SBE does not appear to have started");
- // Call proc_extract_sbe_rc here to see what went wrong
- FAPI_EXEC_HWP(rc, proc_extract_sbe_rc, i_target, NULL, i_pSEEPROM, SBE);
- break;
- }
-
- //
- // check SBE progress
- // Loop until:
- // SBE stopped OR
- // scan service ready loop is reached OR
- // loop time is exceeded
- //
-
- bool sbe_running = true;
- size_t loop_time = 0;
- uint8_t halt_code = 0;
- uint16_t istep_num = 0;
- uint8_t substep_num = 0;
- bool scan_service_loop_reached = false;
- while (sbe_running &&
- !scan_service_loop_reached &&
- (loop_time < i_wait_in_ms))
- {
- // sleep 10ms, then check again
- loop_time += MS_TO_FINISH;
- rc = fapiDelay(NS_TO_FINISH, SIM_CYCLES_TO_FINISH);
- if (rc)
- {
- FAPI_ERR("Error from fapiDelay");
- break;
- }
-
- // retrieve status
- rc = proc_sbe_utils_check_status(
- i_target,
- sbe_running,
- halt_code,
- istep_num,
- substep_num);
- if (!rc.ok())
- {
- FAPI_ERR("Error from proc_check_sbe_state_check_status");
- break;
- }
-
- scan_service_loop_reached =
- sbe_running &&
- !halt_code &&
- (istep_num == PROC_SBE_SCAN_SERVICE_ISTEP_NUM) &&
- (substep_num == SUBSTEP_SBE_READY);
- }
-
- // break if we took an error in the while loop
- if (rc)
- {
- break;
- }
-
- FAPI_INF("SBE is running [%d], loop time [%zd], scan service loop reached [%d]",
- sbe_running, loop_time, scan_service_loop_reached);
-
-
- // two valid possibilities
- // 1) SBE halted with success
- // 2) scan service routine is running
- if (!sbe_running)
- {
- //SBE is stopped. Let's see where
- // before analysis proceeds, make sure that I2C master bus fence is cleared
- FAPI_EXEC_HWP(rc, proc_reset_i2cm_bus_fence, i_target);
- if (!rc.ok())
- {
- FAPI_ERR("Error from proc_reset_i2cm_bus_fence");
- break;
- }
- // mark that fence has been cleared
- i2cm_bus_fence_cleared = true;
-
- // did it stop with success?
- if (halt_code != SBE_EXIT_SUCCESS_0xF)
- {
- FAPI_ERR("SBE halted with error %i (istep 0x%X, substep %i)",
- halt_code,
- istep_num,
- substep_num);
- FAPI_EXEC_HWP(rc, proc_extract_sbe_rc, i_target, NULL, i_pSEEPROM, SBE);
- break;
- }
-
- // did it stop in the correct istep?
- if (!(((istep_num == PROC_SBE_CHECK_MASTER_MAGIC_ISTEP_NUM ) &&
- (substep_num == SUBSTEP_CHECK_MASTER_SLAVE_CHIP)) ||
- ((istep_num == PROC_SBE_ENABLE_PNOR_MAGIC_ISTEP_NUM ) &&
- (substep_num == SUBSTEP_ENABLE_PNOR_SLAVE_CHIP)) ||
- (istep_num == PROC_SBE_EX_HOST_RUNTIME_SCOM_MAGIC_ISTEP_NUM)))
- {
- FAPI_ERR(
- "SBE halted in wrong istep (istep 0x%X, substep %i)",
- istep_num,
- substep_num);
- const fapi::Target & CHIP_IN_ERROR = i_target;
- uint16_t & ISTEP_NUM = istep_num;
- uint8_t & SUBSTEP_NUM = substep_num;
- FAPI_SET_HWP_ERROR(rc, RC_PROC_CHECK_SLAVE_SBE_SEEPROM_COMPLETE_BAD_ISTEP_NUM);
- break;
- }
-
- // reset the SBE so it can be used for MPIPL if needed
- rc = proc_sbe_utils_reset_sbe(i_target);
- if (!rc.ok())
- {
- FAPI_ERR("Error from proc_sbe_utils_reset_sbe");
- break;
- }
- }
- else if (scan_service_loop_reached)
- {
- FAPI_INF("SBE finished, scan service is running!");
- break;
- }
- // error
- else
- {
- FAPI_ERR("SBE did not reach acceptable final state!");
- const fapi::Target & CHIP_IN_ERROR = i_target;
- const bool & SBE_RUNNING = sbe_running;
- const uint8_t & HALT_CODE = halt_code;
- const uint16_t & ISTEP_NUM = istep_num;
- const uint8_t & SUBSTEP_NUM = substep_num;
- FAPI_SET_HWP_ERROR(rc, RC_PROC_CHECK_SLAVE_SBE_SEEPROM_COMPLETE_UNEXPECTED_FINAL_STATE);
- break;
- }
-
- } while (0);
-
- // if an error occurred prior to the I2C master bus fence
- // being cleared, attempt to clear it prior to exit
- if (!rc.ok() && !i2cm_bus_fence_cleared)
- {
- // discard rc, return that of original fail
- fapi::ReturnCode rc_unused;
- FAPI_EXEC_HWP(rc_unused, proc_reset_i2cm_bus_fence, i_target);
- }
-
- // mark function exit
- FAPI_INF("Exit");
- return rc;
-}
-
-
-} // extern "C"
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.H b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.H
deleted file mode 100644
index fba9ca5bb..000000000
--- a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.H
+++ /dev/null
@@ -1,88 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] 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 */
-// $Id: proc_check_slave_sbe_seeprom_complete.H,v 1.5 2014/06/10 12:41:42 dsanner Exp $
-// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_check_slave_sbe_seeprom_complete.H,v $
-//------------------------------------------------------------------------------
-// *|
-// *! (C) Copyright International Business Machines Corp. 2012
-// *! All Rights Reserved -- Property of IBM
-// *! *** ***
-// *|
-// *! TITLE : proc_check_slave_sbe_seeprom_complete.H
-// *! DESCRIPTION : Check if a slave has completed the seeprom code
-// *!
-// *! OWNER NAME : Joe McGill Email: jmcgill@us.ibm.com
-// *!
-//------------------------------------------------------------------------------
-
-#ifndef _PROC_CHECK_SLAVE_SBE_SEEPROM_COMPLETE_H_
-#define _PROC_CHECK_SLAVE_SBE_SEEPROM_COMPLETE_H_
-
-//------------------------------------------------------------------------------
-// Includes
-//------------------------------------------------------------------------------
-
-#include <fapi.H>
-
-//------------------------------------------------------------------------------
-// Structure definitions
-//------------------------------------------------------------------------------
-
-// function pointer typedef definition for HWP call support
-typedef fapi::ReturnCode (*proc_check_slave_sbe_seeprom_complete_FP_t)(const fapi::Target &,
- const void *,
- const size_t);
-
-//------------------------------------------------------------------------------
-// Constant definitions
-//------------------------------------------------------------------------------
-
-//------------------------------------------------------------------------------
-// Function prototypes
-//------------------------------------------------------------------------------
-
-
-extern "C"
-{
-
-/**
- * @brief Check if the slave chip stopped successfully at the end of
- * proc_sbe_check_master / proc_sbe_enable_pnor
- *
- * @param[in] i_target Reference to processor slave chip target
- * @param[in] i_pSEEPROM Pointer to the seeprom image (for errors)
- * @param[in] i_wait_in_ms Amount of time to wait in ms for SBE to complete
- *
- * @return ReturnCode Success if slave chip stopped at correct place,
- * else error
- */
- fapi::ReturnCode proc_check_slave_sbe_seeprom_complete(
- const fapi::Target & i_target,
- const void * i_pSEEPROM,
- const size_t i_wait_in_ms = 1000);
-
-} // extern "C"
-
-#endif // _PROC_CHECK_SLAVE_SBE_SEEPROM_COMPLETE_H_
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete_errors.xml b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete_errors.xml
deleted file mode 100644
index ee658c384..000000000
--- a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete_errors.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<!-- IBM_PROLOG_BEGIN_TAG -->
-<!-- This is an automatically generated prolog. -->
-<!-- -->
-<!-- $Source: src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete_errors.xml $ -->
-<!-- -->
-<!-- OpenPOWER HostBoot Project -->
-<!-- -->
-<!-- Contributors Listed Below - COPYRIGHT 2012,2015 -->
-<!-- [+] 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 -->
-<!-- $Id: proc_check_slave_sbe_seeprom_complete_errors.xml,v 1.8 2015/07/27 00:37:13 jmcgill Exp $ -->
-<!-- Error definitions for proc_check_slave_sbe_seeprom_complete procedure -->
-<hwpErrors>
- <!-- *********************************************************************** -->
- <hwpError>
- <rc>RC_PROC_CHECK_SLAVE_SBE_SEEPROM_COMPLETE_BAD_ISTEP_NUM</rc>
- <description>
- Procedure: proc_check_slave_sbe_seeprom_complete
- The slave SBE is not at the correct istep number
- </description>
- <ffdc>ISTEP_NUM</ffdc>
- <ffdc>SUBSTEP_NUM</ffdc>
- <collectRegisterFfdc>
- <id>REG_FFDC_PROC_STATUS_AND_SBE_VITAL_REGISTERS</id>
- <id>REG_FFDC_PROC_SBE_REGISTERS</id>
- <target>CHIP_IN_ERROR</target>
- </collectRegisterFfdc>
- <deconfigure>
- <target>CHIP_IN_ERROR</target>
- </deconfigure>
- </hwpError>
- <!-- *********************************************************************** -->
- <hwpError>
- <rc>RC_PROC_CHECK_SLAVE_SBE_SEEPROM_COMPLETE_UNEXPECTED_FINAL_STATE</rc>
- <description>
- Procedure: proc_check_slave_sbe_seeprom_complete
- The slave SBE did not reach a valid final state
- </description>
- <ffdc>SBE_RUNNING</ffdc>
- <ffdc>HALT_CODE</ffdc>
- <ffdc>ISTEP_NUM</ffdc>
- <ffdc>SUBSTEP_NUM</ffdc>
- <collectRegisterFfdc>
- <id>REG_FFDC_PROC_STATUS_AND_SBE_VITAL_REGISTERS</id>
- <id>REG_FFDC_PROC_SBE_REGISTERS</id>
- <target>CHIP_IN_ERROR</target>
- </collectRegisterFfdc>
- <deconfigure>
- <target>CHIP_IN_ERROR</target>
- </deconfigure>
- </hwpError>
- <!-- *********************************************************************** -->
-</hwpErrors>
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_revert_sbe_mcs_setup/proc_revert_sbe_mcs_setup.C b/src/usr/hwpf/hwp/slave_sbe/proc_revert_sbe_mcs_setup/proc_revert_sbe_mcs_setup.C
deleted file mode 100644
index ecd211596..000000000
--- a/src/usr/hwpf/hwp/slave_sbe/proc_revert_sbe_mcs_setup/proc_revert_sbe_mcs_setup.C
+++ /dev/null
@@ -1,304 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/hwpf/hwp/slave_sbe/proc_revert_sbe_mcs_setup/proc_revert_sbe_mcs_setup.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] 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 */
-// $Id: proc_revert_sbe_mcs_setup.C,v 1.7 2013/04/27 17:23:41 jmcgill Exp $
-// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_revert_sbe_mcs_setup.C,v $
-//------------------------------------------------------------------------------
-// *|
-// *! (C) Copyright International Business Machines Corp. 2011
-// *! All Rights Reserved -- Property of IBM
-// *! *** ***
-// *|
-// *! TITLE : proc_revert_sbe_mcs_setup.C
-// *! DESCRIPTION : Revert MCS configuration applied by SBE (FAPI)
-// *!
-// *! OWNER NAME : Joe McGill Email: jmcgill@us.ibm.com
-// *!
-//------------------------------------------------------------------------------
-
-
-//------------------------------------------------------------------------------
-// Includes
-//------------------------------------------------------------------------------
-#include "p8_scom_addresses.H"
-#include "proc_revert_sbe_mcs_setup.H"
-
-extern "C"
-{
-
-//------------------------------------------------------------------------------
-// Function definitions
-//------------------------------------------------------------------------------
-
-
-//------------------------------------------------------------------------------
-// function: translate base SCOM address to chiplet specific offset
-// parameters: i_input_addr => input SCOM address
-// i_mcs_unit_num => chip unit number
-// returns: translated SCOM address
-//------------------------------------------------------------------------------
-uint64_t proc_revert_sbe_mcs_setup_xlate_address(
- const uint64_t i_input_addr,
- const uint8_t i_mcs_unit_num)
-{
- return(i_input_addr +
- (0x400 * (i_mcs_unit_num / 4)) +
- (0x80 * (i_mcs_unit_num % 4)));
-}
-
-
-//------------------------------------------------------------------------------
-// function: reset MCFGP BAR valid bit, base address and size fields to restore
-// register flush state
-// parameters: i_target => chip target
-// i_mcs_unit_num => chip unit number
-// returns: FAPI_RC_SUCCESS if register write is successful,
-// else failing return code
-//------------------------------------------------------------------------------
-fapi::ReturnCode proc_revert_sbe_mcs_setup_reset_mcfgp(
- const fapi::Target& i_target,
- const uint8_t i_mcs_unit_num)
-{
- fapi::ReturnCode rc;
- uint32_t rc_ecmd = 0x0;
- ecmdDataBufferBase mcfgp_data(64);
- ecmdDataBufferBase mcfgp_mask(64);
-
- // mark function entry
- FAPI_DBG("proc_revert_sbe_mcs_setup_reset_mcfgp: Start");
-
- do
- {
- // clear fields manipulated by SBE (to restore logic flush state)
- rc_ecmd |= mcfgp_mask.setBit(MCFGP_VALID_BIT);
- rc_ecmd |= mcfgp_mask.setBit(
- MCFGP_UNITS_PER_GROUP_START_BIT,
- (MCFGP_UNITS_PER_GROUP_END_BIT -
- MCFGP_UNITS_PER_GROUP_START_BIT + 1));
- rc_ecmd |= mcfgp_mask.setBit(
- MCFGP_GROUP_MEMBER_ID_START_BIT,
- (MCFGP_GROUP_MEMBER_ID_END_BIT -
- MCFGP_GROUP_MEMBER_ID_START_BIT + 1));
- rc_ecmd |= mcfgp_mask.setBit(
- MCFGP_GROUP_SIZE_START_BIT,
- (MCFGP_GROUP_SIZE_END_BIT -
- MCFGP_GROUP_SIZE_START_BIT + 1));
- rc_ecmd |= mcfgp_mask.setBit(MCFGP_FASTPATH_ENABLE_BIT);
- rc_ecmd |= mcfgp_mask.setBit(
- MCFGP_GROUP_BASE_ADDR_START_BIT,
- (MCFGP_GROUP_BASE_ADDR_END_BIT -
- MCFGP_GROUP_BASE_ADDR_START_BIT + 1));
-
- // check buffer manipulation return code
- if (rc_ecmd)
- {
- FAPI_ERR("proc_revert_sbe_mcs_setup_reset_mcfgp: Error 0x%X setting up MCFGP mask data buffer",
- rc_ecmd);
- rc.setEcmdError(rc_ecmd);
- break;
- }
-
- // write register
- rc = fapiPutScomUnderMask(
- i_target,
- proc_revert_sbe_mcs_setup_xlate_address(MCS_MCFGP_0x02011800,
- i_mcs_unit_num),
- mcfgp_data,
- mcfgp_mask);
- if (!rc.ok())
- {
- FAPI_ERR("proc_revert_sbe_mcs_setup_reset_mcfgp: fapiPutScomUnderMask error (MCS_MCFGP_0x%08llX)",
- proc_revert_sbe_mcs_setup_xlate_address(MCS_MCFGP_0x02011800,
- i_mcs_unit_num));
- break;
- }
- } while(0);
-
- // mark function exit
- FAPI_DBG("proc_revert_sbe_mcs_setup_reset_mcfgp: End");
- return rc;
-}
-
-
-//------------------------------------------------------------------------------
-// function: set MCI FIR Mask channel timeout bits, to restore register flush
-// state
-// parameters: i_target => chip target
-// i_mcs_unit_num => chip unit number
-// returns: FAPI_RC_SUCCESS if register write is successful,
-// else failing return code
-//------------------------------------------------------------------------------
-fapi::ReturnCode proc_revert_sbe_mcs_setup_reset_mcifirmask(
- const fapi::Target& i_target,
- const uint8_t i_mcs_unit_num)
-{
- fapi::ReturnCode rc;
- uint32_t rc_ecmd = 0x0;
- ecmdDataBufferBase mcifirmask_or_data(64);
-
- // mark function entry
- FAPI_DBG("proc_revert_sbe_mcs_setup_reset_mcifirmask: Start");
-
- do
- {
- // set fields manipulated by SBE (to restore logic flush state)
- rc_ecmd |= mcifirmask_or_data.setBit(
- MCIFIR_CL_TIMEOUT_BIT);
- rc_ecmd |= mcifirmask_or_data.setBit(
- MCIFIR_CL_TIMEOUT_DUE_TO_CHANNEL_BIT);
-
- // check buffer manipulation return code
- if (rc_ecmd)
- {
- FAPI_ERR("proc_revert_sbe_mcs_setup_reset_mcifirmask: Error 0x%X setting up MCI FIR Mask register data buffer",
- rc_ecmd);
- rc.setEcmdError(rc_ecmd);
- break;
- }
-
- // write register
- rc = fapiPutScom(
- i_target,
- proc_revert_sbe_mcs_setup_xlate_address(MCS_MCIFIRMASK_OR_0x02011845,
- i_mcs_unit_num),
- mcifirmask_or_data);
- if (!rc.ok())
- {
- FAPI_ERR("proc_revert_sbe_mcs_setup_reset_mcifirmask: fapiPutScom error (MCS_MCIFIRMASK_OR_0x%08llX)",
- proc_revert_sbe_mcs_setup_xlate_address(MCS_MCIFIRMASK_OR_0x02011845,
- i_mcs_unit_num));
- break;
- }
- } while(0);
-
- // mark function exit
- FAPI_DBG("proc_revert_sbe_mcs_setup_reset_mcifirmask: End");
- return rc;
-}
-
-
-//------------------------------------------------------------------------------
-// function: proc_revert_sbe_mcs_setup HWP entry point
-// NOTE: see comments above function prototype in header
-//------------------------------------------------------------------------------
-fapi::ReturnCode proc_revert_sbe_mcs_setup(
- const fapi::Target& i_target)
-{
- fapi::ReturnCode rc;
- ecmdDataBufferBase gp0_data(64);
- ecmdDataBufferBase mcsmode1_reset_data(64);
- bool mc_fenced[2] = { true, true };
- uint8_t mcs_unit_id = 0x0;
-
- // vector to hold MCS chiplet targets
- std::vector<fapi::Target> mcs_chiplets;
-
- // mark HWP entry
- FAPI_IMP("proc_revert_sbe_mcs_setup: Entering ...");
-
- do
- {
- // read GP0 to determine MCL/MCR partial good state
- rc = fapiGetScom(i_target, NEST_GP0_0x02000000, gp0_data);
-
- if (!rc.ok())
- {
- FAPI_ERR("proc_revert_sbe_mcs_setup: fapiGetScom error (NEST_GP0_0x02000000)");
- break;
- }
-
- mc_fenced[0] = gp0_data.isBitClear(NEST_GP0_MCL_FENCE_B_BIT);
- mc_fenced[1] = gp0_data.isBitClear(NEST_GP0_MCR_FENCE_B_BIT);
-
- // loop over all present MCS chiplets, revert SBE configuration
- // of BAR/FIR mask registers back to flush state
- rc = fapiGetChildChiplets(i_target,
- fapi::TARGET_TYPE_MCS_CHIPLET,
- mcs_chiplets,
- fapi::TARGET_STATE_PRESENT);
- if (!rc.ok())
- {
- FAPI_ERR("proc_revert_sbe_mcs_setup: Error from fapiGetChildChiplets");
- break;
- }
-
- for (std::vector<fapi::Target>::iterator i = mcs_chiplets.begin();
- i != mcs_chiplets.end();
- i++)
- {
- // read chip unit number
- rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS,
- &(*i),
- mcs_unit_id);
-
- if (!rc.ok())
- {
- FAPI_ERR("proc_revert_sbe_mcs_setup: Error from FAPI_ATTR_GET (ATTR_CHIP_UNIT_POS)");
- break;
- }
-
- // reset all chiplets which are present (based on GP0 partial good data)
- // this handles the case of reverting configuration which was written
- // by SBE code for chiplets which are not considered functional by platform
- if (!mc_fenced[mcs_unit_id / 4])
- {
- rc = proc_revert_sbe_mcs_setup_reset_mcfgp(i_target,
- mcs_unit_id);
- if (!rc.ok())
- {
- FAPI_ERR("proc_revert_sbe_mcs_setup: Error from proc_revert_sbe_mcs_setup_reset_mcfgp");
- break;
- }
-
- FAPI_DBG("proc_revert_sbe_mcs_setup: reset MCSMODE1");
- rc = fapiPutScom(
- i_target,
- proc_revert_sbe_mcs_setup_xlate_address(MCS_MCSMODE1_0x02011808,
- mcs_unit_id),
- mcsmode1_reset_data);
- if (!rc.ok())
- {
- FAPI_ERR("proc_revert_sbe_mcs_setup: fapiPutScom error (MCS_MCSMODE1_0x%08llX)",
- proc_revert_sbe_mcs_setup_xlate_address(MCS_MCSMODE1_0x02011808, mcs_unit_id));
- break;
- }
-
- rc = proc_revert_sbe_mcs_setup_reset_mcifirmask(i_target,
- mcs_unit_id);
- if (!rc.ok())
- {
- FAPI_ERR("proc_revert_sbe_mcs_setup: Error from proc_revert_sbe_mcs_setup_reset_mcfgp");
- break;
- }
- }
- }
- } while(0);
-
- // log function exit
- FAPI_IMP("proc_revert_sbe_mcs_setup: Exiting ...");
- return rc;
-}
-
-
-} // extern "C"
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_revert_sbe_mcs_setup/proc_revert_sbe_mcs_setup.H b/src/usr/hwpf/hwp/slave_sbe/proc_revert_sbe_mcs_setup/proc_revert_sbe_mcs_setup.H
deleted file mode 100644
index 92d3f6942..000000000
--- a/src/usr/hwpf/hwp/slave_sbe/proc_revert_sbe_mcs_setup/proc_revert_sbe_mcs_setup.H
+++ /dev/null
@@ -1,112 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/hwpf/hwp/slave_sbe/proc_revert_sbe_mcs_setup/proc_revert_sbe_mcs_setup.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2014 */
-/* [+] 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 */
-// $Id: proc_revert_sbe_mcs_setup.H,v 1.4 2013/04/27 17:23:43 jmcgill Exp $
-// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_revert_sbe_mcs_setup.H,v $
-//------------------------------------------------------------------------------
-// *|
-// *! (C) Copyright International Business Machines Corp. 2011
-// *! All Rights Reserved -- Property of IBM
-// *! *** ***
-// *|
-// *! TITLE : proc_revert_sbe_mcs_setup.H
-// *! DESCRIPTION : Revert MCS configuration applied by SBE (FAPI)
-// *!
-// *! OWNER NAME : Joe McGill Email: jmcgill@us.ibm.com
-// *!
-// *! ADDITIONAL COMMENTS:
-// *!
-// *! Disable MCS configuration written by SBE to enable initial phase of
-// *! HBI execution (providing lpc_ack for dcbz prior to initialization
-// *! of memory). Registers touched by SBE (MCFGP, MCIFIRMASK) will be
-// *! reset to flush state by this procedure.
-// *!
-//------------------------------------------------------------------------------
-
-#ifndef _PROC_REVERT_SBE_MCS_SETUP_H_
-#define _PROC_REVERT_SBE_MCS_SETUP_H_
-
-//------------------------------------------------------------------------------
-// Includes
-//------------------------------------------------------------------------------
-
-#include <vector>
-#include <fapi.H>
-
-//------------------------------------------------------------------------------
-// Constant definitions
-//------------------------------------------------------------------------------
-
-// Nest GP0 register constants
-const uint32_t NEST_GP0_MCL_FENCE_B_BIT = 51;
-const uint32_t NEST_GP0_MCR_FENCE_B_BIT = 52;
-
-// MCFGP register constants
-const uint32_t MCFGP_VALID_BIT = 0;
-const uint32_t MCFGP_UNITS_PER_GROUP_START_BIT = 1;
-const uint32_t MCFGP_UNITS_PER_GROUP_END_BIT = 3;
-const uint32_t MCFGP_GROUP_MEMBER_ID_START_BIT = 4;
-const uint32_t MCFGP_GROUP_MEMBER_ID_END_BIT = 8;
-const uint32_t MCFGP_GROUP_SIZE_START_BIT = 11;
-const uint32_t MCFGP_GROUP_SIZE_END_BIT = 23;
-const uint32_t MCFGP_FASTPATH_ENABLE_BIT = 25;
-const uint32_t MCFGP_GROUP_BASE_ADDR_START_BIT = 26;
-const uint32_t MCFGP_GROUP_BASE_ADDR_END_BIT = 43;
-
-// MCIFIR register constants
-const uint32_t MCIFIR_CL_TIMEOUT_BIT = 27;
-const uint32_t MCIFIR_CL_TIMEOUT_DUE_TO_CHANNEL_BIT = 40;
-
-
-//------------------------------------------------------------------------------
-// Structure definitions
-//------------------------------------------------------------------------------
-
-// function pointer typedef definition for HWP call support
-typedef fapi::ReturnCode
-(*proc_revert_sbe_mcs_setup_FP_t)(const fapi::Target&);
-
-
-extern "C"
-{
-
-//------------------------------------------------------------------------------
-// Function prototypes
-//------------------------------------------------------------------------------
-
-//------------------------------------------------------------------------------
-// function: disable MCS configuration written by SBE to enable initial phase of
-// HBI execution (providing lpc_ack for dcbz prior to initialization
-// of memory)
-// parameters: i_target => P8 master chip target
-// returns: FAPI_RC_SUCCESS if all register writes are successful,
-// else failing return code
-fapi::ReturnCode proc_revert_sbe_mcs_setup(
- const fapi::Target& i_target);
-
-
-} // extern "C"
-
-
-#endif // _PROC_REVERT_SBE_MCS_SETUP_H_
diff --git a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C
index 1634d6c06..5bdeee5e0 100644
--- a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C
+++ b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C
@@ -58,10 +58,7 @@
#include <fapi.H>
#include <fapiPlatHwpInvoker.H>
-#include "proc_cen_ref_clk_enable.H"
#include "slave_sbe.H"
-#include "proc_revert_sbe_mcs_setup.H"
-#include "proc_check_slave_sbe_seeprom_complete.H"
#include "proc_getecid.H"
#include "proc_spless_sbe_startWA.H"
#include <sbe/sbeif.H>
@@ -82,56 +79,6 @@ uint8_t getMembufsAttachedBitMask( TARGETING::Target * i_procChipHandle );
void fenceAttachedMembufs( TARGETING::Target * i_procChipHandle );
//******************************************************************************
-// call_proc_revert_sbe_mcs_setup function
-//******************************************************************************
-void* call_proc_revert_sbe_mcs_setup(void *io_pArgs)
-{
- errlHndl_t l_errl = NULL;
- IStepError l_stepError;
-
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_revert_sbe_mcs_setup entry" );
-
- // Note: Even though Cronus trace shows this HWP runs on all proc,
- // this should be done only for Master chip per Dean.
-
- TARGETING::Target* l_pProcTarget = NULL;
- TARGETING::targetService().masterProcChipTargetHandle(l_pProcTarget);
-
- fapi::Target l_fapiProcTarget(fapi::TARGET_TYPE_PROC_CHIP, l_pProcTarget);
-
- // Invoke the HWP
- FAPI_INVOKE_HWP(l_errl, proc_revert_sbe_mcs_setup, l_fapiProcTarget);
-
- if (l_errl)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : failed executing proc_revert_sbe_mcs_setup "
- "returning error");
-
- // capture the target data in the elog
- ErrlUserDetailsTarget(l_pProcTarget).addToLog( l_errl );
-
- // Create IStep error log and cross reference error that occurred
- l_stepError.addErrorDetails( l_errl );
-
- errlCommit( l_errl, HWPF_COMP_ID );
- }
- else
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : proc_revert_sbe_mcs_setup completed ok");
- }
-
- TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "call_proc_revert_sbe_mcs_setup exit");
-
- // end task, returning any errorlogs to IStepDisp
- return l_stepError.getErrorHandle();
-}
-
-
-//******************************************************************************
// call_host_slave_sbe function
//******************************************************************************
void* call_host_slave_sbe_config(void *io_pArgs)
@@ -142,7 +89,13 @@ void* call_host_slave_sbe_config(void *io_pArgs)
"call_host_slave_sbe_config entry" );
// execute proc_read_nest_freq.C
- // execute proc_setup_sbe_config.C
+ // execute p9_setup_sbe_config.C
+ // FAPI_INVOKE_HWP(l_errl,p9_setup_sbe_config);
+ if(l_errl)
+ {
+ l_stepError.addErrorDetails(l_errl);
+ errlCommit(l_errl, HWPF_COMP_ID);
+ }
#ifdef CONFIG_HTMGT
// Set system frequency attributes
@@ -205,6 +158,50 @@ void* call_host_slave_sbe_config(void *io_pArgs)
}
+//******************************************************************************
+// call_host_setup_sbe()
+//******************************************************************************
+void* call_host_setup_sbe(void *io_pArgs)
+{
+ errlHndl_t l_errl = NULL;
+ IStepError l_stepError;
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "call_host_setup_sbe entry" );
+
+ //call host_setup_sbe
+ //FAPI_INVOKE_HWP(l_errl,p9_set_fsi_gp_shadow);
+ if(l_errl)
+ {
+ l_stepError.addErrorDetails(l_errl);
+ errlCommit(l_errl, HWPF_COMP_ID);
+ }
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "call_host_setup_sbe exit" );
+ return l_stepError.getErrorHandle();
+}
+
+//******************************************************************************
+// call_host_cbs_start()
+//******************************************************************************
+void* call_host_cbs_start(void *io_pArgs)
+{
+ errlHndl_t l_errl = NULL;
+ IStepError l_stepError;
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "call_host_cbs_start entry" );
+
+ //call host_cbs_start
+ //FAPI_INVOKE_HWP(l_errl,p9_start_cbs);
+ if(l_errl)
+ {
+ l_stepError.addErrorDetails(l_errl);
+ errlCommit(l_errl, HWPF_COMP_ID);
+ }
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "call_host_cbs_start exit" );
+ return l_stepError.getErrorHandle();
+}
+
//******************************************************************************
// set_proc_boot_voltage_vid
@@ -440,17 +437,17 @@ void* call_proc_check_slave_sbe_seeprom_complete( void *io_pArgs )
IStepError l_stepError;
void* sbeImgPtr = NULL;
size_t sbeImgSize = 0;
- size_t l_wait_time = MS_TO_WAIT_OTHERS;
+ //size_t l_wait_time = MS_TO_WAIT_OTHERS;
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_proc_check_slave_sbe_seeprom_complete entry" );
//If in FSPless environment -- give time for SBE to complete on first chip
- if (!INITSERVICE::spBaseServicesEnabled())
+ /*if (!INITSERVICE::spBaseServicesEnabled())
{
l_wait_time = MS_TO_WAIT_FIRST;
- }
+ }*/
//
// get the master Proc target, we want to IGNORE this one.
@@ -501,11 +498,11 @@ void* call_proc_check_slave_sbe_seeprom_complete( void *io_pArgs )
// Invoke the HWP
fapi::ReturnCode rc_fapi = fapi::FAPI_RC_SUCCESS;
- FAPI_EXEC_HWP(rc_fapi,
- proc_check_slave_sbe_seeprom_complete,
+ /*FAPI_EXEC_HWP(rc_fapi,
+ p9_check_slave_sbe_seeprom_complete,
l_fapiProcTarget,
sbeImgPtr,
- l_wait_time);
+ l_wait_time);*/
// check for re ipl request
if(static_cast<uint32_t>(rc_fapi) ==
@@ -559,7 +556,7 @@ void* call_proc_check_slave_sbe_seeprom_complete( void *io_pArgs )
}
//after first one default to quick check time
- l_wait_time = MS_TO_WAIT_OTHERS;
+ //l_wait_time = MS_TO_WAIT_OTHERS;
} // endfor
@@ -705,9 +702,10 @@ void* call_proc_cen_ref_clk_enable(void *io_pArgs )
// Invoke the HWP passing in the proc target and
// a bit mask indicating connected centaurs
- FAPI_INVOKE_HWP(l_errl,
- proc_cen_ref_clk_enable,
- l_fapiProcTarget, l_membufsAttached );
+ // Cumulus only
+ //FAPI_INVOKE_HWP(l_errl,
+ // p9_proc_cen_ref_clk_enable,
+ // l_fapiProcTarget, l_membufsAttached );
if (l_errl)
{
diff --git a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H
index ccb5733be..0a42ce9e4 100644
--- a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H
+++ b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H
@@ -48,12 +48,6 @@
* @istepdesc Slave SBE
*
* @{
- * @substepnum 8
- * @substepname proc_revert_sbe_mcs_setup
- * @substepdesc : Clean up MCS Extent regs
- * @target_sched serial
- * @}
- * @{
* @substepnum 9
* @substepname host_slave_sbe_config
* @substepdesc :
@@ -78,24 +72,31 @@ namespace SLAVE_SBE
{
/**
- * @brief proc_revert_sbe_mcs_setup
+ * @brief host_slave_sbe_config
*
- * Clean up MCS Extent regs
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any error logs to istep
+ */
+void* call_host_slave_sbe_config(void *io_pArgs);
+
+/**
+ * @brief call_host_setup_sbe
*
* param[in,out] - pointer to any arguments, usually NULL
*
* return any error logs to istep
*/
-void* call_proc_revert_sbe_mcs_setup(void *io_pArgs);
+void* call_host_setup_sbe(void *io_pArgs);
/**
- * @brief host_slave_sbe_config
+ * @brief call_host_cbs_start
*
* param[in,out] - pointer to any arguments, usually NULL
*
- * return any error logs to istep
+ * return any error logs to istep
*/
-void* call_host_slave_sbe_config(void *io_pArgs);
+void* call_host_cbs_start(void *io_pArgs);
/**
OpenPOWER on IntegriCloud