summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/plat
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2014-07-30 09:47:32 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-08-05 11:38:40 -0500
commit20ef6f44a88a595879a29684aec6c5098a0ed562 (patch)
treeff778cdcf0714e704e8b9691d0d5275f2f27c036 /src/usr/hwpf/plat
parent7fdd17e975b3382198e381d739f30ad8b3e36804 (diff)
downloadtalos-hostboot-20ef6f44a88a595879a29684aec6c5098a0ed562.tar.gz
talos-hostboot-20ef6f44a88a595879a29684aec6c5098a0ed562.zip
SW271457 : FAPI traces don't show correct node
Change-Id: Idd6db271f98dad0dff12a7424113dd8ee98a529f CQ:SW271457 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/12524 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/plat')
-rw-r--r--src/usr/hwpf/plat/fapiPlatTarget.C25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/usr/hwpf/plat/fapiPlatTarget.C b/src/usr/hwpf/plat/fapiPlatTarget.C
index 3ffe4d074..66299e1e0 100644
--- a/src/usr/hwpf/plat/fapiPlatTarget.C
+++ b/src/usr/hwpf/plat/fapiPlatTarget.C
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2014 */
+/* Contributors Listed Below - COPYRIGHT 2011,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. */
@@ -155,10 +157,14 @@ void Target::toString(char (&o_ecmdString)[MAX_ECMD_STRING_LEN]) const
const char * l_pChipType = NULL;
const char * l_pChipTypeSpc = NULL;
uint32_t l_chipPos = 0;
+ uint32_t l_node = 0;
for (uint32_t i = 0; ((i < l_sizePath) && (l_pChipType == NULL));
i++)
{
+ if(l_path[i].type == TARGETING::TYPE_NODE){
+ l_node = l_path[i].instance;
+ }
if (l_path[i].type == TARGETING::TYPE_PROC)
{
l_pChipType = ECMD_CHIP_PROC;
@@ -238,23 +244,14 @@ void Target::toString(char (&o_ecmdString)[MAX_ECMD_STRING_LEN]) const
l_pStr += strlen(l_pChipTypeSpc);
}
- // Middle of the string
- strcpy(l_pStr, "k0:n0:s0:p");
- l_pStr += strlen("k0:n0:s0:p");
- int l_kstringlen = strlen("k0:n0:s0:p");
-
- // Chip Pos.
- int l_num = sprintf(l_pStr, "%02d", l_chipPos);
- l_pStr += l_num;
- l_kstringlen += l_num;
+ int l_kstringlen = sprintf(l_pStr, "k0:n%d:s0:p%02d",
+ l_node, l_chipPos);
+ l_pStr += l_kstringlen;
if (l_pChipletType != NULL)
{
// Chiplet Pos
- strcpy(l_pStr, ":c");
- l_pStr += strlen(":c");
- l_kstringlen += strlen(":c");
- int l_num = sprintf(l_pStr, "%d", l_chipletPos);
+ int l_num = sprintf(l_pStr, ":c%d", l_chipletPos);
l_pStr += l_num;
l_kstringlen += l_num;
}
OpenPOWER on IntegriCloud