Skip to content

Commit

Permalink
Fix ocmb index value
Browse files Browse the repository at this point in the history
Use pdbg target index for ody targets

The ocmb index number is same as that of omi index number. There is no
mapping between inventory dimm index and the device tree index. Due to
this, it is difficult to find the failing ocmb index to collect the dumps.

To make it easier to identify the ocmb, updating the dev tree ocmb index
calculation to use the physical path number

The explorer chips use fapi position to identify the targets. The
odyssey chip uses target index with the recent change. Updating the code
to support the same.

Test results:
root@p10bmc:/tmp# ecmdquery chips
cage 0
  node 0
    slot 0
      pu
        p[0,1,2,3,4,5,6,7]
      odyssey
        p[62,2,6]

root@p10bmc:/tmp# getscom odyssey 08012400 -all
odyssey k0:n0:s0:p62       0x0008000000000000
odyssey k0:n0:s0:p02       0x0008000000000000
odyssey k0:n0:s0:p06       0x0008000000000000
/usr/bin/edbg getscom odyssey 08012400 -all
  • Loading branch information
deepakala-k committed Apr 16, 2024
1 parent dd4d428 commit 6fe93a1
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 206 deletions.
141 changes: 72 additions & 69 deletions bmc-kernel-everest.dts.m4
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ define(`PIB_ODY',
#size-cells = <0x1>;
reg = <0x0 0x$1 0x8000>; /*dummy to fix dts warning*/
compatible = "ibm,kernel-pib-ody";
index = <0x$1>;
index = <$1>;
proc = <0x$2>;
port = <$4>;
device-path = "/dev/scom$3$4";
Expand Down Expand Up @@ -149,7 +149,7 @@ define(`HMFSI_ODY',
compatible = "ibm,kernel-fsi-ody";
device-path = "/i2cr$3$4/slave@00:00/raw";
reg = <0x0 0x$1 0x8000>; /*dummy to fix dts warning*/
index = <0x$1>;
index = <$1>;
proc = <0x$2>;
port = <$4>;
system-path = "/proc$2/ocmb$1/fsi";
Expand Down Expand Up @@ -194,76 +194,79 @@ define(`HMFSI_ODY',

FSI_POST()

HMFSI_ODY(0, 0, 1, 00)
HMFSI_ODY(1, 0, 1, 01)
HMFSI_ODY(2, 0, 1, 10)
HMFSI_ODY(3, 0, 1, 11)
HMFSI_ODY(4, 0, 1, 12)
HMFSI_ODY(5, 0, 1, 13)
HMFSI_ODY(6, 0, 1, 14)
HMFSI_ODY(7, 0, 1, 15)

HMFSI_ODY(0, 1, 2, 02)
HMFSI_ODY(1, 1, 2, 03)
HMFSI_ODY(2, 1, 2, 10)
HMFSI_ODY(3, 1, 2, 11)
HMFSI_ODY(4, 1, 2, 14)
HMFSI_ODY(5, 1, 2, 15)
HMFSI_ODY(6, 1, 2, 16)
HMFSI_ODY(7, 1, 2, 17)
// The index number, the first argument is not sequencial number
// because in the everest device tree file,
// the index (physical path) which is received from MRW is such.
HMFSI_ODY(56, 0, 1, 00)
HMFSI_ODY(57, 0, 1, 01)
HMFSI_ODY(58, 0, 1, 10)
HMFSI_ODY(62, 0, 1, 11)
HMFSI_ODY(59, 0, 1, 12)
HMFSI_ODY(60, 0, 1, 13)
HMFSI_ODY(63, 0, 1, 14)
HMFSI_ODY(61, 0, 1, 15)

HMFSI_ODY(55, 1, 2, 02)
HMFSI_ODY(54, 1, 2, 03)
HMFSI_ODY(53, 1, 2, 10)
HMFSI_ODY(50, 1, 2, 11)
HMFSI_ODY(52, 1, 2, 14)
HMFSI_ODY(51, 1, 2, 15)
HMFSI_ODY(48, 1, 2, 16)
HMFSI_ODY(49, 1, 2, 17)


HMFSI_ODY(0, 2, 3, 00)
HMFSI_ODY(1, 2, 3, 01)
HMFSI_ODY(2, 2, 3, 10)
HMFSI_ODY(3, 2, 3, 11)
HMFSI_ODY(4, 2, 3, 12)
HMFSI_ODY(5, 2, 3, 13)
HMFSI_ODY(6, 2, 3, 14)
HMFSI_ODY(7, 2, 3, 15)

HMFSI_ODY(0, 3, 4, 02)
HMFSI_ODY(1, 3, 4, 03)
HMFSI_ODY(2, 3, 4, 10)
HMFSI_ODY(3, 3, 4, 11)
HMFSI_ODY(4, 3, 4, 14)
HMFSI_ODY(5, 3, 4, 15)
HMFSI_ODY(6, 3, 4, 16)
HMFSI_ODY(7, 3, 4, 17)

HMFSI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, 01)
HMFSI_ODY(18, 4, 5, 10)
HMFSI_ODY(22, 4, 5, 11)
HMFSI_ODY(19, 4, 5, 12)
HMFSI_ODY(21, 4, 5, 13)
HMFSI_ODY(23, 4, 5, 14)
HMFSI_ODY(20, 4, 5, 15)

HMFSI_ODY(31, 5, 6, 03)
HMFSI_ODY(30, 5, 6, 02)
HMFSI_ODY(29, 5, 6, 10)
HMFSI_ODY(25, 5, 6, 11)
HMFSI_ODY(28, 5, 6, 14)
HMFSI_ODY(26, 5, 6, 15)
HMFSI_ODY(24, 5, 6, 16)
HMFSI_ODY(27, 5, 6, 17)

HMFSI_ODY(41, 6, 7, 00)
HMFSI_ODY(40, 6, 7, 01)
HMFSI_ODY(42, 6, 7, 10)
HMFSI_ODY(46, 6, 7, 11)
HMFSI_ODY(43, 6, 7, 12)
HMFSI_ODY(45, 6, 7, 13)
HMFSI_ODY(47, 6, 7, 14)
HMFSI_ODY(44, 6, 7, 15)

HMFSI_ODY(38, 7, 8, 02)
HMFSI_ODY(39, 7, 8, 03)
HMFSI_ODY(37, 7, 8, 10)
HMFSI_ODY(33, 7, 8, 11)
HMFSI_ODY(36, 7, 8, 14)
HMFSI_ODY(34, 7, 8, 15)
HMFSI_ODY(32, 7, 8, 16)
HMFSI_ODY(35, 7, 8, 17)
};
56 changes: 28 additions & 28 deletions bmc-kernel-rainier.dts.m4
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ define(`PIB_ODY',
#size-cells = <0x1>;
reg = <0x0 0x$1 0x8000>; /*dummy to fix dts warning*/
compatible = "ibm,kernel-pib-ody";
index = <0x$1>;
index = <$1>;
proc = <0x$2>;
port = <$4>;
device-path = "/dev/scom$3$4";
Expand Down Expand Up @@ -149,7 +149,7 @@ define(`HMFSI_ODY',
compatible = "ibm,kernel-fsi-ody";
device-path = "/i2cr$3$4/slave@00:00/raw";
reg = <0x0 0x$1 0x8000>; /*dummy to fix dts warning*/
index = <0x$1>;
index = <$1>;
proc = <0x$2>;
port =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(25, 3, 4, 10)
HMFSI_ODY(26, 3, 4, 14)
HMFSI_ODY(27, 3, 4, 17)
HMFSI_ODY(28, 3, 4, 15)
HMFSI_ODY(29, 3, 4, 11)
HMFSI_ODY(30, 3, 4, 03)
HMFSI_ODY(31, 3, 4, 16)
};
Loading

0 comments on commit 6fe93a1

Please sign in to comment.