Skip to content
Commit a4bc2011 authored by Vijayenthiran Subramaniam's avatar Vijayenthiran Subramaniam Committed by tarek-arm
Browse files

cmn700: ccg: fix the RAID to LDID programming



RAID to LDID programming in the CCG HA (CCHA hereafter) assign the LDID
corresponding to the remote chip's RAID. This is used to generate the
LDID for a request from an remote RN-F with RAID. The need to program
this register is best explained with an example:

Consider a quad chip configuration with four CMN-700 meshes connected to
each other, with four RN-F per chip and with `local_ra_cnt` as 14. In
this case, the RN-F RAID assignment (CCRA LDID to RAID LUT) for each
chip is shown below:

 +------------------+  +------------------+
 |      Chip 0      |  |      Chip 1      |
 +--------+---------+  +--------+---------+
 |RNF LDID|RNF RAID |  |RNF LDID|RNF RAID |
 +--------+---------+  +--------+---------+
 |    0   |    0    |  |    0   |    14   |
 |        |         |  |        |         |
 |    1   |    1    |  |    1   |    15   |
 |        |         |  |        |         |
 |    2   |    2    |  |    2   |    16   |
 |        |         |  |        |         |
 |    3   |    3    |  |    3   |    17   |
 +--------+---------+  +--------+---------+
 +------------------+  +------------------+
 |      Chip 2      |  |      Chip 3      |
 +--------+---------+  +--------+---------+
 |RNF LDID|RNF RAID |  |RNF LDID|RNF RAID |
 +--------+---------+  +--------+---------+
 |    0   |    28   |  |    0   |    42   |
 |        |         |  |        |         |
 |    1   |    29   |  |    1   |    43   |
 |        |         |  |        |         |
 |    2   |    30   |  |    2   |    44   |
 |        |         |  |        |         |
 |    3   |    31   |  |    3   |    45   |
 +--------+---------+  +--------+---------+

Each CMN-700 mesh would know the LDID of the local RN-F. When RN-F
generates a snoop request, this LDID is then used to identify the RN-F's
nodeid in the HN-F's `ldid_to_chi_node_id_reg`. In order to generate the
LDID of a remote RN-F, RAID to LDID values are to be programmed in the
CCHA raid to ldid LUT and the LDID values has to be contiguous with but
above the LDID range assigned to local RN-F. When an request from an
remote RN-F with a RAID arrives at the CCHA, RAID to LDID LUT is used to
look up against the incoming RAID and generate LDID which would be then
sent to HN-F's to look up `ldid_to_chi_node_id_reg` which would have the
CCHA nodeid programmed for remote RN-Fs. Considering the above example,
when RN-F with LDID 0 on the Chip 1 with RAID 14 sends a snoop request
to the Chip 0, the request would arrive at Chip 0's CCHA. CCHA's raid to
ldid LUT is used to generate the LDID for sending to HN-F. In this case,
CCHA's rnf_exp_raid_to_ldid_reg[3]'s index 1 need to be programmed with
an LDID value of 4.

Currently, instead of programming the LDID values for the corresponding
remote agentids (RAIDs of remote RN-Fs), the LDID values are programmed
in sequence to the current chip's RAID. In the above case, on Chip 0,
instead of programming the LDID value 4 for RAID 14 (expected), the LDID
value 4 is programmed to the RAID 4 (actual). So when an snoop request
from RAID 14 arrives the snoop request would get forwarded with LDID 14
instead of LDID 4 which would result in response forwarded to wrong CCHA
(to Chip 3's HA instead of Chip 1 HA) leading to coherency issues
between chips.

Expected:                 Actual:
+---------------------+   +---------------------+
|       Chip 0        |   |       Chip 0        |
+-----------+---------+   +-----------+---------+
|  RNF RAID |RNF LDID |   |  RNF RAID |RNF LDID |
+-----------+---------+   +-----------+---------+
|    14     |   4     |   |    4      |   4     |
|           |         |   |           |         |
|    15     |   5     |   |    5      |   5     |
|           |         |   |           |         |
|    16     |   6     |   |    6      |   6     |
|           |         |   |           |         |
|    17     |   7     |   |    7      |   7     |
+-----------+---------+   +-----------+---------+
|    28     |   8     |   |    8      |   8     |
|           |         |   |           |         |
|    29     |   9     |   |    9      |   9     |
|           |         |   |           |         |
|    30     |   10    |   |    10     |   10    |
|           |         |   |           |         |
|    31     |   11    |   |    11     |   11    |
+-----------+---------+   +-----------+---------+
|    42     |   12    |   |    12     |   12    |
|           |         |   |           |         |
|    43     |   13    |   |    13     |   13    |
|           |         |   |           |         |
|    44     |   14    |   |    14     |   14    |
|           |         |   |           |         |
|    45     |   15    |   |    15     |   15    |
+-----------+---------+   +-----------+---------+

Fix this by programming the LDID values on the correct RAID register
groups.

Signed-off-by: Vijayenthiran Subramaniam's avatarVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Change-Id: I58ecb49e5a83a647ffe3050cded0bb8a79c1d3e5
parent 74ef1efe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment