summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libpdbg/bmcfsi.c2
-rw-r--r--libpdbg/kernel.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c
index 8dd2f76..a1f13a2 100644
--- a/libpdbg/bmcfsi.c
+++ b/libpdbg/bmcfsi.c
@@ -247,7 +247,7 @@ 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;
+ addr = ((addr & 0x1ffc00) | ((addr & 0x3ff) << 2)) << 1;
addr |= 0x3;
addr |= slave_id << 26;
addr |= (0x8ULL | !!(read)) << 22;
diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c
index 925d6b0..559af08 100644
--- a/libpdbg/kernel.c
+++ b/libpdbg/kernel.c
@@ -79,7 +79,7 @@ static int kernel_getscom(struct target *target, uint64_t addr, uint64_t *value)
static int kernel_fsi_getcfam(struct target *target, uint64_t addr64, uint64_t *value)
{
int rc;
- uint32_t addr = (addr64 & 0xffff00) | ((addr64 & 0xff) << 2);
+ uint32_t addr = (addr64 & 0x7ffc00) | ((addr64 & 0x3ff) << 2);
rc = lseek(fsi_fd, addr, SEEK_SET);
if (rc < 0) {
@@ -103,7 +103,7 @@ static int kernel_fsi_getcfam(struct target *target, uint64_t addr64, uint64_t *
static int kernel_fsi_putcfam(struct target *target, uint64_t addr64, uint64_t data)
{
int rc;
- uint32_t addr = (addr64 & 0xffff00) | ((addr64 & 0xff) << 2);
+ uint32_t addr = (addr64 & 0x7ffc00) | ((addr64 & 0x3ff) << 2);
rc = lseek(fsi_fd, addr, SEEK_SET);
if (rc < 0) {
OpenPOWER on IntegriCloud