-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shift OBUS FIR programming inits for secure boot
p9_sbe_scominit: unmask all OBUS EXTFIR bits, use PB CENT FIR 14 to mark update for downstream code (qualify XBUS/OBUS EXTFIR updates to apply to PPE platform only) p9_fab_iovalid: conditionally unmask OBUS EXTFIR based on state of PB CENT FIR 14 (will handle unmasking here when insecure -- Cronus or old SBE images) p9_obus_extfir_setup: new HWP for HB to call, mask OBUS EXTFIR bits for unused busses Change-Id: If54c36bbc4d431a4c91e63ce9678a54bb8ada95f Original-Change-Id: I07e7da4a7c61c041451ff4ddfeec3c266385d404 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60600 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60960 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
- Loading branch information
Showing
3 changed files
with
216 additions
and
0 deletions.
There are no files selected for viewing
103 changes: 103 additions & 0 deletions
103
src/import/chips/p9/procedures/hwp/nest/p9_obus_extfir_setup.C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
/* IBM_PROLOG_BEGIN_TAG */ | ||
/* This is an automatically generated prolog. */ | ||
/* */ | ||
/* $Source: src/import/chips/p9/procedures/hwp/nest/p9_obus_extfir_setup.C $ */ | ||
/* */ | ||
/* OpenPOWER HostBoot Project */ | ||
/* */ | ||
/* Contributors Listed Below - COPYRIGHT 2018 */ | ||
/* [+] 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_obus_extfir_setup.C | ||
/// @brief Manage fabric link iovalid controls (FAPI2) | ||
/// | ||
/// @author Joe McGill <jmcgill@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: 3 | ||
// *HWP Consumed by: HB | ||
// | ||
|
||
//------------------------------------------------------------------------------ | ||
// Includes | ||
//------------------------------------------------------------------------------ | ||
#include <p9_obus_extfir_setup.H> | ||
#include <p9_misc_scom_addresses.H> | ||
#include <p9_misc_scom_addresses_fld.H> | ||
|
||
|
||
//------------------------------------------------------------------------------ | ||
// Function definitions | ||
//------------------------------------------------------------------------------ | ||
|
||
|
||
// NOTE: see doxygen comments in header | ||
fapi2::ReturnCode | ||
p9_obus_extfir_setup(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, | ||
const bool i_o0_smp_active, | ||
const bool i_o1_smp_active, | ||
const bool i_o2_smp_active, | ||
const bool i_o3_smp_active) | ||
{ | ||
FAPI_INF("Start"); | ||
|
||
fapi2::buffer<uint64_t> l_fbc_cent_fir; | ||
fapi2::buffer<uint64_t> l_ras_fir_mask; | ||
|
||
// read FBC center FIR to determine if SBE has unmasked all EXTFIR bits (new | ||
// behavior) | ||
FAPI_TRY(fapi2::getScom(i_target, PU_PB_CENT_SM0_PB_CENT_FIR_REG, l_fbc_cent_fir), | ||
"Error from getScom (PU_PB_CENT_SM0_PB_CENT_FIR_REG)"); | ||
|
||
// new SBE code, set mask bits for inactive links | ||
if (l_fbc_cent_fir.getBit<PU_PB_CENT_SM0_PB_CENT_FIR_MASK_REG_SPARE_14>()) | ||
{ | ||
l_ras_fir_mask.flush<0>(); | ||
|
||
if (!i_o0_smp_active) | ||
{ | ||
l_ras_fir_mask.setBit<PU_PB_CENT_SM1_EXTFIR_REG_PB_X3_FIR_ERR>(); | ||
} | ||
|
||
if (!i_o1_smp_active) | ||
{ | ||
l_ras_fir_mask.setBit<PU_PB_CENT_SM1_EXTFIR_REG_PB_X4_FIR_ERR>(); | ||
} | ||
|
||
if (!i_o2_smp_active) | ||
{ | ||
l_ras_fir_mask.setBit<PU_PB_CENT_SM1_EXTFIR_REG_PB_X5_FIR_ERR>(); | ||
} | ||
|
||
if (!i_o3_smp_active) | ||
{ | ||
l_ras_fir_mask.setBit<PU_PB_CENT_SM1_EXTFIR_REG_PB_X6_FIR_ERR>(); | ||
} | ||
|
||
FAPI_TRY(fapi2::putScom(i_target, PU_PB_CENT_SM1_EXTFIR_MASK_REG_OR, l_ras_fir_mask), | ||
"Error writing RAS FIR mask register (PU_PB_CENT_SM1_EXTFIR_MASK_REG_OR)!"); | ||
} | ||
|
||
fapi_try_exit: | ||
FAPI_INF("End"); | ||
return fapi2::current_err; | ||
} |
87 changes: 87 additions & 0 deletions
87
src/import/chips/p9/procedures/hwp/nest/p9_obus_extfir_setup.H
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* IBM_PROLOG_BEGIN_TAG */ | ||
/* This is an automatically generated prolog. */ | ||
/* */ | ||
/* $Source: src/import/chips/p9/procedures/hwp/nest/p9_obus_extfir_setup.H $ */ | ||
/* */ | ||
/* OpenPOWER HostBoot Project */ | ||
/* */ | ||
/* Contributors Listed Below - COPYRIGHT 2018 */ | ||
/* [+] 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_obus_extfir_setup.H | ||
/// @brief Manage FBC EXTFIR setup (FAPI2) | ||
/// | ||
/// @author Joe McGill <jmcgill@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: 3 | ||
// *HWP Consumed by: HB | ||
// | ||
|
||
#ifndef _P9_OBUS_EXTFIR_SETUP_H_ | ||
#define _P9_OBUS_EXTFIR_SETUP_H_ | ||
|
||
|
||
//------------------------------------------------------------------------------ | ||
// Includes | ||
//------------------------------------------------------------------------------ | ||
#include <fapi2.H> | ||
|
||
//------------------------------------------------------------------------------ | ||
// Structure definitions | ||
//------------------------------------------------------------------------------ | ||
|
||
/// function pointer typedef definition for HWP call support | ||
typedef fapi2::ReturnCode (*p9_obus_extfir_setup_FP_t) ( | ||
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&, | ||
const bool, | ||
const bool, | ||
const bool, | ||
const bool); | ||
|
||
//------------------------------------------------------------------------------ | ||
// Function prototypes | ||
//------------------------------------------------------------------------------ | ||
|
||
extern "C" | ||
{ | ||
|
||
/// | ||
/// @brief Setup FBC EXTFIR for selected obus links | ||
/// | ||
/// @param[in] i_target Reference to processor chip target | ||
/// @param[in] i_o0_smp_active OBUS0 active as fabric link? | ||
/// @param[in] i_o1_smp_active OBUS1 active as fabric link? | ||
/// @param[in] i_o2_smp_active OBUS2 active as fabric link? | ||
/// @param[in] i_o3_smp_active OBUS3 active as fabric link? | ||
/// | ||
/// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. | ||
/// | ||
fapi2::ReturnCode p9_obus_extfir_setup(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target, | ||
const bool i_o0_smp_active, | ||
const bool i_o1_smp_active, | ||
const bool i_o2_smp_active, | ||
const bool i_o3_smp_active); | ||
|
||
} // extern "C" | ||
|
||
#endif // _P9_OBUS_EXTFIR_SETUP_H_ |
26 changes: 26 additions & 0 deletions
26
src/import/chips/p9/procedures/hwp/nest/p9_obus_extfir_setup.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/nest/p9_obus_extfir_setup.mk $ | ||
# | ||
# OpenPOWER HostBoot Project | ||
# | ||
# Contributors Listed Below - COPYRIGHT 2018 | ||
# [+] 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_obus_extfir_setup | ||
$(call BUILD_PROCEDURE) |