summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-openpower/common
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-01-19 15:29:35 -0600
committerPatrick Williams <patrick@stwcx.xyz>2017-01-20 01:07:54 +0000
commit9eda7bce4a29e4ab82b750908137946e06c3fe0e (patch)
tree2f3a308ad5420ff7a1d373cf1731628da3aacc9f /meta-openbmc-machines/meta-openpower/common
parentcf9ca4db785724034974828bb2fb079935f2ecac (diff)
downloadtalos-openbmc-9eda7bce4a29e4ab82b750908137946e06c3fe0e.tar.gz
talos-openbmc-9eda7bce4a29e4ab82b750908137946e06c3fe0e.zip
pdbg hack to access reg 0x2918
pdbg as-is can't access reg 0x2918, and the current fix to access that reg breaks other registers. So just use the new address transformation on reg 0x2918 (or 0x102918 when on the 2nd chip). Change-Id: If388a1acba555d6769bde162c28991c44e53d4d7 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/common')
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-bsp/pdbg/pdbg.bb1
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-bsp/pdbg/pdbg/0001-CFAM-reg-0x2918-access-hack.patch34
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pdbg/pdbg.bb b/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pdbg/pdbg.bb
index b48e2945f..3b00e043d 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pdbg/pdbg.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pdbg/pdbg.bb
@@ -4,6 +4,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRC_URI += "git://github.com/open-power/pdbg.git"
+SRC_URI += "file://0001-CFAM-reg-0x2918-access-hack.patch"
SRCREV = "6554a4a6bf73c22766650977eec07f90502b7438"
PV = "git${SRCREV}"
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pdbg/pdbg/0001-CFAM-reg-0x2918-access-hack.patch b/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pdbg/pdbg/0001-CFAM-reg-0x2918-access-hack.patch
new file mode 100644
index 000000000..dba62e3fe
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-bsp/pdbg/pdbg/0001-CFAM-reg-0x2918-access-hack.patch
@@ -0,0 +1,34 @@
+From e21d90ae8c131eae9d78e3d06f29cab55c952884 Mon Sep 17 00:00:00 2001
+From: Matt Spinler <spinler@us.ibm.com>
+Date: Thu, 19 Jan 2017 09:06:48 -0600
+Subject: [PATCH] CFAM reg 0x2918 access hack
+
+---
+ libpdbg/bmcfsi.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c
+index 64dbd69..f763f2a 100644
+--- a/libpdbg/bmcfsi.c
++++ b/libpdbg/bmcfsi.c
+@@ -247,7 +247,16 @@ static uint64_t fsi_abs_ar(uint32_t addr, int read)
+ /* Reformat the address. I'm not sure I fully understand this
+ * yet but we basically shift the bottom byte and add 0b01
+ * (for the write word?) */
+- addr = ((addr & 0x1fff00) | ((addr & 0xff) << 2)) << 1;
++
++ /* Hack: this shifting doesn't work for all addresses, but it does
++ * work for 2918 and (and 2nd chip 2918) so use it just for that */
++ if ((addr == 0x2918) || (addr == 0x102918)) {
++ addr = ((addr & 0x1ffe00) | ((addr & 0x1ff) << 2)) << 1;
++ }
++ else {
++ addr = ((addr & 0x1fff00) | ((addr & 0xff) << 2)) << 1;
++ }
++
+ addr |= 0x3;
+ addr |= slave_id << 26;
+ addr |= (0x8ULL | !!(read)) << 22;
+--
+2.11.0
+
OpenPOWER on IntegriCloud