summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorspashabk-in <shakeebbk@in.ibm.com>2017-07-17 02:08:19 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2017-07-25 07:21:49 -0400
commitc039e9338b69f1274bd637bcf651131d51e78363 (patch)
tree93d35a218e28804044c8355a37ad248e3d29861c /src
parent093110f4706e5b617b803d7687926e5331f87582 (diff)
downloadtalos-sbe-c039e9338b69f1274bd637bcf651131d51e78363.tar.gz
talos-sbe-c039e9338b69f1274bd637bcf651131d51e78363.zip
Fix for pibmem attribute dump
Alignement fix for attr dump Collect attrdump in simics Fix in sbe-debug.py to determine file not found Change-Id: Ia55ccdb21e19a2f43d1f6255dc5f5533689eb8e1 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43204 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: RAJA DAS <rajadas2@in.ibm.com> Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/hwpf/plat_target_utils.H20
-rwxr-xr-xsrc/tools/debug/sbe-debug.py3
-rwxr-xr-xsrc/tools/debug/simics-debug-framework.py18
3 files changed, 29 insertions, 12 deletions
diff --git a/src/hwpf/plat_target_utils.H b/src/hwpf/plat_target_utils.H
index 0c54e2cc..0a2d525d 100644
--- a/src/hwpf/plat_target_utils.H
+++ b/src/hwpf/plat_target_utils.H
@@ -6,6 +6,7 @@
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -31,17 +32,14 @@
#include <proc_sbe_fixed.H>
-#pragma pack(8) //Start of packing to 8byte boundary
- typedef struct {
- fapi2attr::SystemAttributes_t G_system_attrs;
- fapi2attr::ProcChipAttributes_t G_proc_chip_attrs;
- fapi2attr::PervAttributes_t G_perv_attrs;
- fapi2attr::CoreAttributes_t G_core_attrs;
- fapi2attr::EXAttributes_t G_ex_attrs;
- fapi2attr::EQAttributes_t G_eq_attrs;
- } G_sbe_attrs_t;
-#pragma pack()//End of packing to 8byte boundary
-
+typedef struct {
+ fapi2attr::SystemAttributes_t G_system_attrs __attribute__ ((aligned (8)));
+ fapi2attr::ProcChipAttributes_t G_proc_chip_attrs __attribute__ ((aligned (8)));
+ fapi2attr::PervAttributes_t G_perv_attrs __attribute__ ((aligned (8)));
+ fapi2attr::CoreAttributes_t G_core_attrs __attribute__ ((aligned (8)));
+ fapi2attr::EXAttributes_t G_ex_attrs __attribute__ ((aligned (8)));
+ fapi2attr::EQAttributes_t G_eq_attrs __attribute__ ((aligned (8)));
+} G_sbe_attrs_t;
//
// Platform Utility functions..
//
diff --git a/src/tools/debug/sbe-debug.py b/src/tools/debug/sbe-debug.py
index f414a1c6..eceb5015 100755
--- a/src/tools/debug/sbe-debug.py
+++ b/src/tools/debug/sbe-debug.py
@@ -47,7 +47,8 @@ def getFilePath(filename):
retPath = os.path.join(dir, filename)
if(os.path.exists(retPath)):
return os.path.abspath(retPath)
- return None
+ print "ERROR: file " + filename +" not found"
+ return 1
def getTraceFilePath():
fspTrace = getFilePath("fsp-trace")
diff --git a/src/tools/debug/simics-debug-framework.py b/src/tools/debug/simics-debug-framework.py
index 35485dd0..077ed850 100755
--- a/src/tools/debug/simics-debug-framework.py
+++ b/src/tools/debug/simics-debug-framework.py
@@ -30,7 +30,9 @@ import random
import sys
import imp
import struct
+
testIstepAuto = imp.load_source("testIstepAuto", os.environ['SBE_TOOLS_PATH'] + "/testIstepAuto.py")
+sbeDebug = imp.load_source("sbeDebug", os.environ['SBE_TOOLS_PATH'] + "/sbe-debug.py")
err = False
syms = {};
@@ -83,10 +85,17 @@ def register_sbe_debug_framework_tools():
type = ["sbe-commands"],
short = "Runs the debug framework for dd level ",
doc = "")
+ new_command("sbe-attrdump", collectAttr,
+ args = [arg(int_t, "procNr")],
+ alias = "sattrdump",
+ type = ["sbe-commands"],
+ short = "Runs the debug framework for runtime attribute dump ",
+ doc = "")
print "SBE Debug Framework: Registered tool:", "sbe-istep"
print "SBE Debug Framework: Registered tool:", "sbe-trace"
print "SBE Debug Framework: Registered tool:", "sbe-stack"
print "SBE Debug Framework: Registered tool:", "sbe-ddlevel"
+ print "SBE Debug Framework: Registered tool:", "sbe-attrdump"
def fillSymTable():
@@ -129,6 +138,15 @@ def collectStackUsage ( procNr ):
break
print str("["+thread+"]").ljust(40) + str(leastAvailable).ljust(30) + str("%.2f" % (100 * (1 - (leastAvailable/float(int("0x"+syms[thread][1], 16))))))
+def collectAttr( procNr ):
+ cmd1= "pipe \"p9Proc" + `procNr` + ".sbe.mibo_space.x " + '0xFFFE8000' + " "+hex(96*1024)+"\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> pibmemdump.bin\""
+ ( rc, out ) = quiet_run_command( cmd1, output_modes.regular )
+ if ( rc ):
+ print "simics ERROR running %s: %d "%( cmd1, rc )
+ ddlevel = get_dd_level(procNr)
+ sbeDebug.fillSymTable('FILE', ddlevel)
+ sbeDebug.collectAttr('FILE', 0, procNr, ddlevel, 'pibmemdump.bin')
+
def collectTrace ( procNr ):
fileName = "sbe_" + `procNr` + "_tracMERG"
cmd1 = "pipe \"p9Proc" + `procNr` + ".sbe.mibo_space.x 0x" + syms['g_pk_trace_buf'][0] + " 0x2028\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> ppetrace.bin\""
OpenPOWER on IntegriCloud