aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorHaren Myneni <haren@linux.ibm.com>2021-08-04 12:50:53 +0530
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-08-06 12:20:48 +0530
commit2ce3f083f3999483e202ea6868d55fcb0ad61db1 (patch)
tree20730e2dfd5bd65767f23e8e86c49dae3ea40486 /hdata
parentd7ffcd939d971bdffc9e50bf7886345c9536d68c (diff)
downloadskiboot-2ce3f083f3999483e202ea6868d55fcb0ad61db1.zip
skiboot-2ce3f083f3999483e202ea6868d55fcb0ad61db1.tar.gz
skiboot-2ce3f083f3999483e202ea6868d55fcb0ad61db1.tar.bz2
hdat/spira: Define ibm, primary-topology-index property per chip
HDAT provides Topology ID table and the primary topology location on P10. This primary location points to primary topology entry in ID table which contains the primary topology index and this index is used to define the paste base address per chip. This patch reads Topology ID table and the primary topology location from hdata and retrieves the primary topology index in the ID table. Make this primaty topology index value available with ibm,primary-topology-index property per chip. VAS reads this property to setup paste base address for each chip. Signed-off-by: Haren Myneni <haren@linux.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/spira.c12
-rw-r--r--hdata/spira.h5
2 files changed, 16 insertions, 1 deletions
diff --git a/hdata/spira.c b/hdata/spira.c
index 85c2fe7..2fd3da1 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -688,6 +688,18 @@ static bool add_xscom_sppcrd(uint64_t xscom_base)
be32_to_cpu(cinfo->sw_xstop_fir_scom),
fir_bit);
}
+
+ if (proc_gen >= proc_gen_p10) {
+ uint8_t primary_loc = cinfo->primary_topology_loc;
+
+ if (primary_loc >= CHIP_MAX_TOPOLOGY_ENTRIES) {
+ prerror("XSCOM: Invalid primary topology index %d\n",
+ primary_loc);
+ continue;
+ }
+ dt_add_property_cells(np, "ibm,primary-topology-index",
+ cinfo->topology_id_table[primary_loc]);
+ }
}
return i > 0;
diff --git a/hdata/spira.h b/hdata/spira.h
index 7c5341f..7da1154 100644
--- a/hdata/spira.h
+++ b/hdata/spira.h
@@ -1092,7 +1092,10 @@ struct sppcrd_chip_info {
/* From latest version (possibly 0x21 and later) */
__be32 sw_xstop_fir_scom;
uint8_t sw_xstop_fir_bitpos;
- uint8_t reserved_1[3];
+ /* Latest version for P10 */
+#define CHIP_MAX_TOPOLOGY_ENTRIES 32
+ uint8_t topology_id_table[CHIP_MAX_TOPOLOGY_ENTRIES];
+ uint8_t primary_topology_loc; /* Index in topology_id_table */
} __packed;
/* Idata index 1 : Chip TOD */