diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2015-12-14 09:30:28 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-02-29 16:29:48 -0500 |
commit | bee7f1cbcd5bf18acc539c9c9b6a14960dadea3d (patch) | |
tree | 2b7f1c777e10bc41101d7515e96122b3fd8cd1dc /src/usr/xscom | |
parent | 1fe31da7eeae17f43b6908f9eccf30d6a8b355dd (diff) | |
download | talos-hostboot-bee7f1cbcd5bf18acc539c9c9b6a14960dadea3d.tar.gz talos-hostboot-bee7f1cbcd5bf18acc539c9c9b6a14960dadea3d.zip |
Update constants and comments for P9 PIR format
Implemented a set of macros and constants that can be used
everywhere to translate a PIR into its component parts
and pull out individual pieces of data from a complete
PIR.
Also added and updated the references to the old
ATTR_FABRIC_NODE_ID with ATTR_FABRIC_GROUP_ID.
Change-Id: If9735f53940e5849a648729e4bf8ca0cfbb09f6e
RTC: 88055
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/706
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/xscom')
-rw-r--r-- | src/usr/xscom/xscom.C | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/usr/xscom/xscom.C b/src/usr/xscom/xscom.C index a3d8e28dc..5eaad2237 100644 --- a/src/usr/xscom/xscom.C +++ b/src/usr/xscom/xscom.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2015 */ +/* Contributors Listed Below - COPYRIGHT 2011,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -46,6 +46,7 @@ #include <assert.h> #include <errl/errludlogregister.H> #include <xscom/piberror.H> +#include <arch/pirformat.H> // Trace definition trace_desc_t* g_trac_xscom = NULL; @@ -347,7 +348,7 @@ errlHndl_t getTargetVirtualAddress(TARGETING::Target* i_target, // Get the target Node Id xscomNodeId = - i_target->getAttr<TARGETING::ATTR_FABRIC_NODE_ID>(); + i_target->getAttr<TARGETING::ATTR_FABRIC_GROUP_ID>(); // Get the target Chip Id xscomChipId = @@ -548,12 +549,7 @@ uint64_t* getCpuIdVirtualAddress() uint64_t* o_virtAddr = 0; // Get the CPU core this thread is running on - uint32_t cpuid = task_getcpuid(); - - //NNNCCCPPPPTTT format fot the cpuid.. - // N = node, C = chip, P = proc, T = thread - uint32_t chipId = (cpuid & 0x0380)>>7; - uint32_t nodeId = (cpuid & 0x1C00)>>10; + PIR_t cpuid = task_getcpuid(); // Can change the above hardcoded values to either a macro or use // the info below to do the masking and shifting. @@ -566,8 +562,8 @@ uint64_t* getCpuIdVirtualAddress() // Target's XSCOM Base address XSComBase_t l_XSComBaseAddr = l_systemBaseAddr + - ( ( (g_xscomMaxChipsPerNode * nodeId) + - chipId ) * THIRTYTWO_GB); + ( ( (g_xscomMaxChipsPerNode * cpuid.groupId) + + cpuid.chipId ) * THIRTYTWO_GB); // Target's virtual address o_virtAddr = static_cast<uint64_t*> |