[Skiboot] [PATCH] plat/qemu: add a POWER10 platform

Cédric Le Goater clg at kaod.org
Tue Nov 5 21:42:01 AEDT 2019


Prepare ground for the QEMU simulator which will export "qemu,powernv10"
machines when available. BMC is still defined as ast2500 but it should
change to ast2600 in the future.

Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
 core/chip.c           |  3 ++-
 platforms/qemu/qemu.c | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/core/chip.c b/core/chip.c
index 45733573b6e1..7ec68d8a50f4 100644
--- a/core/chip.c
+++ b/core/chip.c
@@ -132,7 +132,8 @@ void init_chips(void)
 	/* Detect Qemu */
 	if (dt_node_is_compatible(dt_root, "qemu,powernv") ||
 	    dt_node_is_compatible(dt_root, "qemu,powernv8") ||
-	    dt_node_is_compatible(dt_root, "qemu,powernv9")) {
+	    dt_node_is_compatible(dt_root, "qemu,powernv9") ||
+	    dt_node_is_compatible(dt_root, "qemu,powernv10")) {
 		proc_chip_quirks |= QUIRK_QEMU | QUIRK_NO_CHIPTOD
 			| QUIRK_NO_DIRECT_CTL | QUIRK_NO_RNG;
 		prlog(PR_NOTICE, "CHIP: Detected QEMU simulator\n");
diff --git a/platforms/qemu/qemu.c b/platforms/qemu/qemu.c
index 757c086d4a22..4a0e6a489b97 100644
--- a/platforms/qemu/qemu.c
+++ b/platforms/qemu/qemu.c
@@ -42,6 +42,11 @@ static bool qemu_probe_powernv9(void)
 	return qemu_probe_common("qemu,powernv9");
 }
 
+static bool qemu_probe_powernv10(void)
+{
+	return qemu_probe_common("qemu,powernv10");
+}
+
 static void qemu_init(void)
 {
 	if (!bt_device_present) {
@@ -96,3 +101,20 @@ DECLARE_PLATFORM(qemu_powernv9) = {
 	.exit			= astbmc_exit,
 	.terminate	= ipmi_terminate,
 };
+
+/*
+ * For a QEMU PowerNV machine using POWER10 CPUs (Rainier)
+ */
+DECLARE_PLATFORM(qemu_powernv10) = {
+	.name		= "QEMU POWER10",
+	.probe		= qemu_probe_powernv10,
+	.bmc		= &bmc_plat_ast2500_openbmc,
+	.init		= qemu_init,
+	.external_irq   = astbmc_ext_irq_serirq_cpld,
+	.cec_power_down = astbmc_ipmi_power_down,
+	.cec_reboot     = astbmc_ipmi_reboot,
+	.start_preload_resource	= flash_start_preload_resource,
+	.resource_loaded	= flash_resource_loaded,
+	.exit			= astbmc_exit,
+	.terminate	= ipmi_terminate,
+};
-- 
2.21.0



More information about the Skiboot mailing list