summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authornagurram-in <nagendra.g@in.ibm.com>2017-01-12 15:00:47 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-01-15 09:18:38 -0500
commit05082b5598e4f9dccb67ca55ec72735c080e8a2d (patch)
tree2acc7e7b3a3c45cee5c1774ba6db7c109664ae77 /src/usr
parentb4c9eaa651a2be4e4bc714e47e0a9380d4685a80 (diff)
downloadtalos-hostboot-05082b5598e4f9dccb67ca55ec72735c080e8a2d.tar.gz
talos-hostboot-05082b5598e4f9dccb67ca55ec72735c080e8a2d.zip
Fixing the deprecated FABRIC_NODE_ID and PIR value
Change-Id: I252708a04942736e4de7843ad5c98065365ff004 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34803 Tested-by: Jenkins Server <pfd-jenkins+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>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/hdat/hdatpcia.C41
-rwxr-xr-xsrc/usr/hdat/hdatpcia.H4
-rw-r--r--src/usr/hdat/hdatpcrd.C2
3 files changed, 26 insertions, 21 deletions
diff --git a/src/usr/hdat/hdatpcia.C b/src/usr/hdat/hdatpcia.C
index 129d80878..9f32cdba5 100644
--- a/src/usr/hdat/hdatpcia.C
+++ b/src/usr/hdat/hdatpcia.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -163,6 +163,8 @@ errlHndl_t HdatPcia::hdatLoadPcia(uint32_t &o_size, uint32_t &o_count)
l_coreThreadCount = l_pTopLevel->getAttr<ATTR_THREAD_COUNT>();
uint32_t l_procStatus;
+ HDAT_DBG("Core Thread Count[%d]", l_coreThreadCount);
+
if ( l_coreThreadCount == HDAT_MAX_EIGHT_THREADS_SUPPORTED )
{
l_procStatus =
@@ -195,7 +197,7 @@ errlHndl_t HdatPcia::hdatLoadPcia(uint32_t &o_size, uint32_t &o_count)
uint32_t Procstatus = 0;
uint32_t l_procFabricId =
- l_pProcTarget->getAttr<TARGETING::ATTR_FABRIC_NODE_ID>();
+ l_pProcTarget->getAttr<TARGETING::ATTR_FABRIC_GROUP_ID>();
uint64_t l_procIntrBase =
l_pProcTarget->getAttr<TARGETING::ATTR_INTP_BASE_ADDR>();
@@ -248,16 +250,21 @@ errlHndl_t HdatPcia::hdatLoadPcia(uint32_t &o_size, uint32_t &o_count)
l_threadIndex, this->iv_spPcia[index].hdatThreadData.
pciaThreadData[l_threadIndex].pciaPhysThreadId);
- /* Proc ID Reg is NNNCCCPPPPTTT
- Where NNN is node number
- CCC is Chip
- PPPP is the core number
- TTT is thread id
+
+ /* Proc ID Reg for split core is NNNNCCC0PPPPPTT
+ Where NNNN is node number
+ left shift by 11 bits
+ CCC is Chip
+ left shift by 8 bits
+ PPPPP is the core number
+ left shift by 2 bits
+ TT is thread id
*/
- uint32_t l_ThreadProcIdReg = l_procFabricId * 0x400;
- l_ThreadProcIdReg += l_procPosition*0x80;
- l_ThreadProcIdReg += (l_coreNum * l_coreThreadCount) +
- l_threadIndex;
+ // PIR generation for split core mode
+ uint32_t l_ThreadProcIdReg = l_procFabricId << 11 |
+ l_procPosition << 8 |
+ l_coreNum << 2 |
+ l_threadIndex;
hdatSetPciaHdrs(&this->iv_spPcia[index]);
this->iv_spPcia[index].hdatCoreData.pciaProcStatus
@@ -273,14 +280,12 @@ errlHndl_t HdatPcia::hdatLoadPcia(uint32_t &o_size, uint32_t &o_count)
Procstatus = isFunctional(l_pTarget) ?
HDAT_PROC_USABLE :
HDAT_PROC_NOT_USABLE;
+ l_procStatus &= ~HDAT_PROC_STAT_MASK;
+ l_procStatus |= Procstatus;
- Procstatus |= HDAT_EIGHT_THREAD;
-
- uint32_t l_stat = this->iv_spPcia[index].hdatCoreData.
- pciaProcStatus & HDAT_PROC_STAT_MASK;
this->iv_spPcia[index].hdatCoreData.pciaProcStatus =
- (static_cast<hdatProcStatus> (Procstatus)
- | l_stat ) & HDAT_EXIST_FLAGS_MASK_FOR_PCIA;
+ (static_cast<hdatProcStatus> (l_procStatus)
+ ) & HDAT_EXIST_FLAGS_MASK_FOR_PCIA;
//IBASE ADDRESS + NNNN + 000
//Where NNNN = Thread Number =
@@ -472,7 +477,7 @@ errlHndl_t HdatPcia::hdatSetCoreInfo(const uint32_t i_index,
uint32_t l_nodeOrdId = l_pNodeTarget->getAttr<ATTR_ORDINAL_ID>();
- uint32_t l_fabNodeId = i_pProcTarget->getAttr<ATTR_FABRIC_NODE_ID>();
+ uint32_t l_fabNodeId = i_pProcTarget->getAttr<ATTR_FABRIC_GROUP_ID>();
//Set the Internal Drawer Node ID
iv_spPcia[i_index].hdatCoreData.pciaDrawerNodeID = l_fabNodeId;
diff --git a/src/usr/hdat/hdatpcia.H b/src/usr/hdat/hdatpcia.H
index e1ba47522..7e5f4c765 100755
--- a/src/usr/hdat/hdatpcia.H
+++ b/src/usr/hdat/hdatpcia.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -56,7 +56,7 @@ namespace HDAT
const uint16_t HDAT_PCIA_VERSION = 0x01;
const char HDAT_PCIA_STRUCT_NAME[7] = "SPPCIA";
-const uint32_t HDAT_PROC_STAT_MASK = 0x00008000;
+const uint32_t HDAT_PROC_STAT_MASK = 0xC0000000;
// Bits in the proc/exist flags for PCIA data
#define HDAT_EXIST_FLAGS_MASK_FOR_PCIA 0xD0FF0000
diff --git a/src/usr/hdat/hdatpcrd.C b/src/usr/hdat/hdatpcrd.C
index 84c715399..11d85bf9a 100644
--- a/src/usr/hdat/hdatpcrd.C
+++ b/src/usr/hdat/hdatpcrd.C
@@ -692,7 +692,7 @@ errlHndl_t HdatPcrd::hdatSetProcessorInfo(
}
uint32_t l_procFabricId =
- i_pProcTarget->getAttr<TARGETING::ATTR_FABRIC_NODE_ID>();
+ i_pProcTarget->getAttr<TARGETING::ATTR_FABRIC_GROUP_ID>();
// Set fabric nodeid (NNN) and chip (CC) into xscom id: NN_N0CC
uint32_t l_XscomChipId =
OpenPOWER on IntegriCloud