[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 06/11] ppc/pnv: Add HOMER for POWER11
From: |
Aditya Gupta |
Subject: |
[PATCH v4 06/11] ppc/pnv: Add HOMER for POWER11 |
Date: |
Tue, 28 May 2024 12:35:10 +0530 |
Power11 core is same as Power10, declare PNV11_HOMER as a child
class of PNV10_HOMER, so it goes through same class init
Cc: Cédric Le Goater <clg@kaod.org>
Cc: Frédéric Barrat <fbarrat@linux.ibm.com>
Cc: Mahesh J Salgaonkar <mahesh@linux.ibm.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
---
hw/ppc/pnv_homer.c | 8 ++++++++
include/hw/ppc/pnv_homer.h | 3 +++
2 files changed, 11 insertions(+)
diff --git a/hw/ppc/pnv_homer.c b/hw/ppc/pnv_homer.c
index f9a203d11d0d..1b0123a6f2ea 100644
--- a/hw/ppc/pnv_homer.c
+++ b/hw/ppc/pnv_homer.c
@@ -394,6 +394,13 @@ static const TypeInfo pnv_homer_power10_type_info = {
.parent = TYPE_PNV_HOMER,
.instance_size = sizeof(PnvHomer),
.class_init = pnv_homer_power10_class_init,
+ .class_base_init = pnv_homer_power10_class_init,
+};
+
+static const TypeInfo pnv_homer_power11_type_info = {
+ .name = TYPE_PNV11_HOMER,
+ .parent = TYPE_PNV10_HOMER,
+ .instance_size = sizeof(PnvHomer),
};
static void pnv_homer_realize(DeviceState *dev, Error **errp)
@@ -442,6 +449,7 @@ static void pnv_homer_register_types(void)
type_register_static(&pnv_homer_power8_type_info);
type_register_static(&pnv_homer_power9_type_info);
type_register_static(&pnv_homer_power10_type_info);
+ type_register_static(&pnv_homer_power11_type_info);
}
type_init(pnv_homer_register_types);
diff --git a/include/hw/ppc/pnv_homer.h b/include/hw/ppc/pnv_homer.h
index b1c5d498dc55..8f1cc8135937 100644
--- a/include/hw/ppc/pnv_homer.h
+++ b/include/hw/ppc/pnv_homer.h
@@ -35,6 +35,9 @@ DECLARE_INSTANCE_CHECKER(PnvHomer, PNV9_HOMER,
#define TYPE_PNV10_HOMER TYPE_PNV_HOMER "-POWER10"
DECLARE_INSTANCE_CHECKER(PnvHomer, PNV10_HOMER,
TYPE_PNV10_HOMER)
+#define TYPE_PNV11_HOMER TYPE_PNV_HOMER "-POWER11"
+DECLARE_INSTANCE_CHECKER(PnvHomer, PNV11_HOMER,
+ TYPE_PNV11_HOMER)
struct PnvHomer {
DeviceState parent;
--
2.45.1
- [PATCH v4 00/11] Power11 support for QEMU, Aditya Gupta, 2024/05/28
- [PATCH v4 06/11] ppc/pnv: Add HOMER for POWER11,
Aditya Gupta <=
- [PATCH v4 08/11] ppc/pnv: Add OCC for Power11, Aditya Gupta, 2024/05/28
- [PATCH v4 07/11] ppc/pnv: Add a LPC controller for POWER11, Aditya Gupta, 2024/05/28
- [PATCH v4 09/11] ppc/pnv: Add a PSI bridge model for Power11, Aditya Gupta, 2024/05/28
- [PATCH v4 03/11] target/ppc: Introduce 'PowerPCCPUClass::logical_pvr', Aditya Gupta, 2024/05/28
- [PATCH v4 04/11] target/ppc: Fix regression due to Power10 and Power11 having same PCR, Aditya Gupta, 2024/05/28
- [PATCH v4 02/11] ppc/pseries: Add Power11 cpu type, Aditya Gupta, 2024/05/28
- [PATCH v4 05/11] ppc/pnv: Add a Power11 Pnv11Chip, and a Power11 Machine, Aditya Gupta, 2024/05/28