Python function to get SBE boot side
Pre-requisite for commit https://gerrit.openbmc-project.xyz/#/c/8105/
Change-Id: Ibcc2e39bf124046ed9880d823550221393224e1b
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.py b/lib/utils.py
index df0043b..e7d6843 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -185,3 +185,16 @@
out_buf, stderr, rc = bsu.bmc_execute_command("df " + df_parm_string)
return vf.outbuf_to_report(out_buf)
+
+
+def get_sbe():
+
+ r"""
+ Return CFAM value which contains such things as SBE side bit.
+ """
+
+ cmd_buf = "pdbg -d p9w -p0 getcfam 0x2808 | sed -re 's/.* = //g'"
+ out_buf, stderr, rc = bsu.bmc_execute_command(cmd_buf)
+
+ return int(out_buf, 16)
+