summaryrefslogtreecommitdiffstats
path: root/src/build
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2013-07-16 11:13:11 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-07-30 16:43:06 -0500
commit12ff45d42b4fa04bdbf36ed36147b5c07e36939f (patch)
tree2d675ac72aa7f74745c2653bad7a2e26ecbc791d /src/build
parentb24fe45bee8160d77f130161267ba5a575098a77 (diff)
downloadtalos-hostboot-12ff45d42b4fa04bdbf36ed36147b5c07e36939f.tar.gz
talos-hostboot-12ff45d42b4fa04bdbf36ed36147b5c07e36939f.zip
Support SPIRA-H HDAT Format
Change-Id: If87eedf15c1ef96ea00c1a5574ad1f6b72e697b5 RTC: 71881 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5498 Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build')
-rwxr-xr-xsrc/build/simics/hb-simdebug.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/build/simics/hb-simdebug.py b/src/build/simics/hb-simdebug.py
index 28c8f9588..44dab075b 100755
--- a/src/build/simics/hb-simdebug.py
+++ b/src/build/simics/hb-simdebug.py
@@ -176,3 +176,44 @@ new_command("hb-singlethread",
alias = "hb-st",
type = ["hostboot-commands"],
short = "Disable all threads except cpu0_0_05_0.")
+
+
+
+#------------------------------------------------
+#------------------------------------------------
+def hb_get_objects_by_class(classname):
+ obj_list=[]
+ obj_dict={}
+ # Put objects into a dictionary, indexed by object name
+ for obj in SIM_get_all_objects():
+ if (obj.classname == classname):
+ obj_dict[obj.name]=obj
+
+ # Sort the dictionary by key (object name)
+ obj_names=obj_dict.keys()
+ obj_names.sort()
+ for obj_name in obj_names:
+ obj_list.append(obj_dict[obj_name])
+ #print "object name=%s" % obj_name
+ return obj_list
+
+def hb_getallregs(regname):
+ proc_list=[]
+ proc_list=hb_get_objects_by_class("ppc-power8-mambo-core")
+ for proc in proc_list:
+ output = run_command("%s.read-reg %s"%(proc.name,regname))
+ print ">> %s : " %(proc.name) + "%x" %output
+
+new_command("hb-getallregs",
+ (lambda reg: hb_getallregs(reg)),
+ [ arg(str_t, "reg", "?", None),
+ ],
+ alias = "hb-gar",
+ type = ["hostboot-commands"],
+ short = "Read a reg from all cores.",
+ doc = """
+Examples: \n
+ hb-getallregs <regname>\n
+ hb-getallregs pc\n
+ """)
+
OpenPOWER on IntegriCloud