[Skiboot] [PATCH 29/61] platform: Add Denali platform support

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Mon Jul 19 23:19:40 AEST 2021


Denali is P10 system. But FSP interaction (MBOX protocol) is same as ZZ.
Hence add denali platform detection code inside zz.c for now. We can think
of adding separate platform later.

Also enable :
  - P10 TCE mapping support
  - Detect PHBs

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hdata/iohub.c                    | 4 ++++
 hdata/spira.h                    | 1 +
 hw/fsp/fsp-psi.c                 | 1 +
 platforms/ibm-fsp/hostservices.c | 4 ++++
 platforms/ibm-fsp/zz.c           | 6 ++++++
 5 files changed, 16 insertions(+)

diff --git a/hdata/iohub.c b/hdata/iohub.c
index 92df48b8f..92655407e 100644
--- a/hdata/iohub.c
+++ b/hdata/iohub.c
@@ -843,6 +843,10 @@ static void io_parse_fru(const void *sp_iohubs)
 			prlog(PR_INFO, "CEC:     Rainier !\n");
 			io_add_p9(hub, sp_iohubs);
 			break;
+		case CECHUB_HUB_DENALI:
+			prlog(PR_INFO, "CEC:     Denali !\n");
+			io_add_p9(hub, sp_iohubs);
+			break;
 		default:
 			prlog(PR_ERR, "CEC:     Hub ID 0x%04x unsupported !\n",
 			      hub_id);
diff --git a/hdata/spira.h b/hdata/spira.h
index 7fcf5c302..afdc9228a 100644
--- a/hdata/spira.h
+++ b/hdata/spira.h
@@ -667,6 +667,7 @@ struct cechub_io_hub {
 #define CECHUB_HUB_CUMULUS_DUOMO	0x0030	/* cumulus+duomo from spec */
 #define CECHUB_HUB_AXONE_HOPPER		0x0040	/* axone+hopper */
 #define CECHUB_HUB_RAINIER		0x0050
+#define CECHUB_HUB_DENALI		0x0051
 	__be32		ec_level;
 	__be32		aff_dom2;	/* HDAT < v9.x only */
 	__be32		aff_dom3;	/* HDAT < v9.x only */
diff --git a/hw/fsp/fsp-psi.c b/hw/fsp/fsp-psi.c
index aeaf47e89..38f130dd7 100644
--- a/hw/fsp/fsp-psi.c
+++ b/hw/fsp/fsp-psi.c
@@ -37,6 +37,7 @@ void psi_init_for_fsp(struct psi *psi)
 	switch (proc_gen) {
 	case proc_gen_p8:
 	case proc_gen_p9:
+	case proc_gen_p10:
 		out_be64(psi->regs + PSIHB_TAR, PSI_TCE_TABLE_BASE |
 			 PSIHB_TAR_256K_ENTRIES);
 		break;
diff --git a/platforms/ibm-fsp/hostservices.c b/platforms/ibm-fsp/hostservices.c
index 81fd6bdd3..accc0989a 100644
--- a/platforms/ibm-fsp/hostservices.c
+++ b/platforms/ibm-fsp/hostservices.c
@@ -551,6 +551,10 @@ int hservice_wakeup(uint32_t i_core, uint32_t i_mode)
 		i_core &= SPR_PIR_P9_MASK;
 		i_core <<= 2;
 		break;
+	case proc_gen_p10:
+		i_core &= SPR_PIR_P10_MASK;
+		i_core <<= 2;
+		break;
 	default:
 		return OPAL_UNSUPPORTED;
 	}
diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c
index 7c6050ab7..493d6030a 100644
--- a/platforms/ibm-fsp/zz.c
+++ b/platforms/ibm-fsp/zz.c
@@ -160,6 +160,12 @@ static bool zz_probe(void)
 	if (dt_node_is_compatible(dt_root, "ibm,fleetwood-m9s")) {
 		return true;
         }
+
+	/* Add Denali FSP platform and map it to ZZ */
+	if (dt_node_is_compatible(dt_root, "ibm,denali")) {
+		return true;
+        }
+
 	return false;
 }
 
-- 
2.31.1



More information about the Skiboot mailing list