From b06df3e99d5c2a1f2ada40206c9f317cbe2f1b6f Mon Sep 17 00:00:00 2001 From: Santosh Puranik Date: Mon, 18 Jul 2016 05:27:58 -0500 Subject: Update to plat_getTargetHandleByChipletNumber Templatized to take in a fapi2 Target type Change-Id: Icd55f82e6c8dd0bed92eb245678722ec15f12617 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27127 Tested-by: Jenkins Server Reviewed-by: Sachin Gupta Reviewed-by: Gregory S. Still --- sbe/sbefw/sbecmdcntlinst.C | 29 +++++++++++++++++++++++++++-- sbe/sbefw/sbecmdmemaccess.C | 27 ++++++++++++++++++++++++++- sbe/sbefw/sbecmdregaccess.C | 30 ++++++++++++++++++++++++++++-- 3 files changed, 81 insertions(+), 5 deletions(-) (limited to 'sbe') diff --git a/sbe/sbefw/sbecmdcntlinst.C b/sbe/sbefw/sbecmdcntlinst.C index 824d3e08..a6be068c 100644 --- a/sbe/sbefw/sbecmdcntlinst.C +++ b/sbe/sbefw/sbecmdcntlinst.C @@ -1,3 +1,27 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: sbe/sbefw/sbecmdcntlinst.C $ */ +/* */ +/* OpenPOWER sbe Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016 */ +/* [+] 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: ppe/sbe/sbefw/sbecmdcntlinst.C * @@ -108,8 +132,9 @@ uint32_t sbeCntlInst(uint8_t *i_pArg) uint64_t l_state; do { - fapi2::Target l_coreTgt( - plat_getTargetHandleByChipletNumber(l_core)); + fapi2::Target + l_coreTgt(plat_getTargetHandleByChipletNumber + (l_core)); if(!l_coreTgt.isFunctional()) { continue; diff --git a/sbe/sbefw/sbecmdmemaccess.C b/sbe/sbefw/sbecmdmemaccess.C index 790e4c94..b697a3ea 100644 --- a/sbe/sbefw/sbecmdmemaccess.C +++ b/sbe/sbefw/sbecmdmemaccess.C @@ -1,3 +1,27 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: sbe/sbefw/sbecmdmemaccess.C $ */ +/* */ +/* OpenPOWER sbe Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* [+] 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: ppe/sbe/sbefw/sbecmdmemaccess.C * @@ -279,7 +303,8 @@ uint32_t processPbaRequest(const sbeMemAccessReqMsgHdr_t &i_hdr, //Derive the EX target from the input Core Chiplet Id //Core0/1 -> EX0, Core2/3 -> EX1, Core4/5 -> EX2, Core6/7 -> EX3 //..so on - l_ex = plat_getTargetHandleByChipletNumber((i_hdr.coreChipletId)/2); + l_ex = plat_getTargetHandleByChipletNumber + (i_hdr.coreChipletId); } // By default, ex_chipletId printed below won't be used unless accompanied // by LCO_mode. diff --git a/sbe/sbefw/sbecmdregaccess.C b/sbe/sbefw/sbecmdregaccess.C index 1b0fbe39..bb83cab2 100644 --- a/sbe/sbefw/sbecmdregaccess.C +++ b/sbe/sbefw/sbecmdregaccess.C @@ -1,3 +1,27 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: sbe/sbefw/sbecmdregaccess.C $ */ +/* */ +/* OpenPOWER sbe Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016 */ +/* [+] 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: ppe/sbe/sbefw/sbecmdregaccess.C * @@ -75,7 +99,8 @@ uint32_t sbeGetReg(uint8_t *i_pArg) break; } uint8_t core = regReqMsg.coreChiplet; - RamCore ramCore( plat_getTargetHandleByChipletNumber(core), + RamCore ramCore( plat_getTargetHandleByChipletNumber + (core), regReqMsg.threadNr ); fapiRc = ramCore.ram_setup(); @@ -186,7 +211,8 @@ uint32_t sbePutReg(uint8_t *i_pArg) break; } uint8_t core = regReqMsg.coreChiplet; - RamCore ramCore( plat_getTargetHandleByChipletNumber(core), + RamCore ramCore( plat_getTargetHandleByChipletNumber + (core), regReqMsg.threadNr ); fapiRc = ramCore.ram_setup(); -- cgit v1.2.1