From e813a0c09dc08aea7144425e1d4ee6c9134e9f47 Mon Sep 17 00:00:00 2001 From: Vasant Hegde Date: Wed, 4 Aug 2021 12:50:56 +0530 Subject: phys/P10: Use topology index to get phys mapping This fixes multipchip rainier boot issue. for Rainer: chip0: ibm,primary-topology-index = < 0x0>; chip1: ibm,primary-topology-index = < 0x4>; chip2: ibm,primary-topology-index = < 0x8>; chip3: ibm,primary-topology-index = < 0xc>; for Denali: node0: chip0: ibm,primary-topology-index = < 0x0>; chip1: ibm,primary-topology-index = < 0x1>; chip2: ibm,primary-topology-index = < 0x2>; chip3: ibm,primary-topology-index = < 0x3>; node1: chip0: ibm,primary-topology-index = < 0x4>; chip1: ibm,primary-topology-index = < 0x5>; chip2: ibm,primary-topology-index = < 0x6>; chip3: ibm,primary-topology-index = < 0x7>; Note that bmc_create_node() gets called very early in the boot process. Hence we have to traverse through HDAT ntuple to get right topology index. May be we can optimize pcid_to_topology_idx() function as its pretty much duplicate of pcid_to_chip_id(). But for now lets keep it as separate function. Signed-off-by: Vasant Hegde Signed-off-by: Ryan Grimm Signed-off-by: Vasant Hegde --- include/phys-map.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/phys-map.h b/include/phys-map.h index ae7a4aa..97351a7 100644 --- a/include/phys-map.h +++ b/include/phys-map.h @@ -48,6 +48,9 @@ enum phys_map_type { extern void phys_map_get(uint64_t gcid, enum phys_map_type type, int index, uint64_t *addr, uint64_t *size); +extern void __phys_map_get(uint64_t topology_idx, uint64_t gcid, + enum phys_map_type type, int index, uint64_t *addr, uint64_t *size); + extern void phys_map_init(unsigned long pvr); #endif /* __PHYS_MAP_H */ -- cgit v1.1