[Skiboot] [PATCH v5 3/6] plat/qemu: add support for Power11 platform
Mahesh Salgaonkar
mahesh at linux.ibm.com
Mon Mar 3 18:02:56 AEDT 2025
From: Aditya Gupta <adityag at linux.ibm.com>
Add support for QEMU simulator for Power11 when it starts supporting
"qemu,powernv11" machines.
Signed-off-by: Aditya Gupta <adityag at linux.ibm.com>
Signed-off-by: Mahesh Salgaonkar <mahesh at linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin at gmail.com>
---
Change in v5:
- Move the qemu,powernv11 check to if case that enables direct controls.
Change in v4:
- Moved psi.c and xscom.c hunks to patch 1
Change in v3:
- Add helper function to get proc_gen number
- Print unknown processor detected in case of -ve proc_gen number
---
core/chip.c | 5 +++--
platforms/qemu/qemu.c | 23 +++++++++++++++++++++++
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/core/chip.c b/core/chip.c
index 078f658a29..d8fa99f9bd 100644
--- a/core/chip.c
+++ b/core/chip.c
@@ -182,8 +182,9 @@ void init_chips(void)
model_type);
}
/* Detect Qemu */
- if (dt_node_is_compatible(dt_root, "qemu,powernv10")) {
- /* POWER10 has direct controls */
+ if (dt_node_is_compatible(dt_root, "qemu,powernv10") ||
+ dt_node_is_compatible(dt_root, "qemu,powernv11")) {
+ /* POWER10 and Power11 has direct controls */
proc_chip_quirks |= QUIRK_QEMU | QUIRK_NO_RNG;
prlog(PR_NOTICE, "CHIP: Detected QEMU simulator\n");
} else if (dt_node_is_compatible(dt_root, "qemu,powernv") ||
diff --git a/platforms/qemu/qemu.c b/platforms/qemu/qemu.c
index 0f6e089fa7..c6c6a50072 100644
--- a/platforms/qemu/qemu.c
+++ b/platforms/qemu/qemu.c
@@ -76,6 +76,11 @@ static bool qemu_probe_powernv10(void)
return qemu_probe_common("qemu,powernv10");
}
+static bool qemu_probe_powernv11(void)
+{
+ return qemu_probe_common("qemu,powernv11");
+}
+
static void qemu_init(void)
{
if (!bt_device_present) {
@@ -156,3 +161,21 @@ DECLARE_PLATFORM(qemu_powernv10) = {
.exit = astbmc_exit,
.terminate = ipmi_terminate,
};
+
+/*
+ * For a QEMU PowerNV machine using Power11 CPUs
+ */
+DECLARE_PLATFORM(qemu_powernv11) = {
+ .name = "QEMU Power11",
+ .probe = qemu_probe_powernv11,
+ .bmc = &bmc_plat_ast2600_openbmc,
+ .init = qemu_init,
+ .external_irq = astbmc_ext_irq_serirq_cpld,
+ .cec_power_down = astbmc_ipmi_power_down,
+ .cec_reboot = astbmc_ipmi_reboot,
+ .pci_get_slot_info = slot_table_get_slot_info,
+ .start_preload_resource = flash_start_preload_resource,
+ .resource_loaded = flash_resource_loaded,
+ .exit = astbmc_exit,
+ .terminate = ipmi_terminate,
+};
--
2.48.1
More information about the Skiboot
mailing list