pnv N1 chiplet model
v8 cover pnv N1 chiplet model
Hello,
Thank you for the review and suggestions on V7.
There are no major design/logic changes done in revision 8 from revision 7. Addressed the minor comments.
The qom-tree looks like below.
(qemu) info qom-tree
/machine (powernv10-machine)
/chip[0] (power10_v2.0-pnv-chip)
/n1-chiplet (pnv-N1-chiplet)
/nest-pervasive-common (pnv-nest-chiplet-pervasive)
/pervasive-control[0] (memory-region)
/xscom-n1-chiplet-pb-scom-eq[0] (memory-region)
/xscom-n1-chiplet-pb-scom-es[0] (memory-region)Patches overview in V8.
PATCH1: Create a common nest pervasive chiplet model with control chiplet scom
registers.
PATCH2: Create a N1 chiplet model and implement powerbus scom registers.
Connect common nest pervasive model to N1 chiplet model to define chiplet control scoms for N1 chiplet.
PATCH3: Connect N1 chiplet model to p10 chip.
Test covered:
Ran make check && make check-avocado and found no obvious issues.
Thank You,
Chalapathi
Chalapathi V (3):
hw/ppc: Add pnv nest pervasive common chiplet model hw/ppc: Add N1 chiplet model
hw/ppc: N1 chiplet wiring
include/hw/ppc/pnv_chip.h | 2 + include/hw/ppc/pnv_n1_chiplet.h | 32 +++++ include/hw/ppc/pnv_nest_pervasive.h | 32 +++++ include/hw/ppc/pnv_xscom.h | 9 ++ hw/ppc/pnv.c | 15 ++ hw/ppc/pnv_n1_chiplet.c | 173 +++++++++++++++++++++++ hw/ppc/pnv_nest_pervasive.c | 208 ++++++++++++++++++++++++++++ hw/ppc/meson.build | 2 + 8 files changed, 473 insertions(+) create mode 100644 include/hw/ppc/pnv_n1_chiplet.h create mode 100644 include/hw/ppc/pnv_nest_pervasive.h create mode 100644 hw/ppc/pnv_n1_chiplet.c create mode 100644 hw/ppc/pnv_nest_pervasive.c
Signature · 1 line
2.31.1
PATCH v8 1/3 hw/ppc: Add pnv nest pervasive common chiplet model
A POWER10 chip is divided into logical units called chiplets. Chiplets are broadly divided into "core chiplets" (with the processor cores) and "nest chiplets" (with everything else). Each chiplet has an attachment to the pervasive bus (PIB) and with chiplet-specific registers. All nest chiplets have a common basic set of registers and This model will provide the registers functionality for common registers of nest chiplet (Pervasive Chiplet, PB Chiplet, PCI Chiplets, MC Chiplet, PAU Chiplets)
This commit implement the read/write functions of chiplet control registers.
--- include/hw/ppc/pnv_nest_pervasive.h | 32 +++++ include/hw/ppc/pnv_xscom.h | 3 + hw/ppc/pnv_nest_pervasive.c | 208 ++++++++++++++++++++++++++++ hw/ppc/meson.build | 1 + 4 files changed, 244 insertions(+) create mode 100644 include/hw/ppc/pnv_nest_pervasive.h create mode 100644 hw/ppc/pnv_nest_pervasive.c
include/hw/ppc/pnv_nest_pervasive.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* QEMU PowerPC nest pervasive common chiplet model +* +* Copyright (c) 2023, IBM Corporation. +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#ifndef PPC_PNV_NEST_CHIPLET_PERVASIVE_H +#define PPC_PNV_NEST_CHIPLET_PERVASIVE_H + +#define TYPE_PNV_NEST_CHIPLET_PERVASIVE "pnv-nest-chiplet-pervasive" +#define PNV_NEST_CHIPLET_PERVASIVE (obj) OBJECT_CHECK(PnvNestChipletPervasive, (obj), TYPE_PNV_NEST_CHIPLET_PERVASIVE) + +typedef struct PnvPervasiveCtrlRegs { +#define PNV_CPLT_CTRL_SIZE 6 +uint64_t cplt_ctrl[PNV_CPLT_CTRL_SIZE ]; +uint64_t cplt_cfg0; +uint64_t cplt_cfg1; +uint64_t cplt_stat0; +uint64_t cplt_mask0; +uint64_t ctrl_protect_mode; +uint64_t ctrl_atomic_lock; +}PnvPervasiveCtrlRegs ; + +typedef struct PnvNestChipletPervasive { +DeviceState parent; +MemoryRegion xscom_ctrl_regs_mr; +PnvPervasiveCtrlRegs control_regs; +}PnvNestChipletPervasive ; + +#endif /*PPC_PNV_NEST_CHIPLET_PERVASIVE_H */
include/hw/ppc/pnv_xscom.h +3 -0
@@ -170,6 +170,9 @@ struct PnvXScomInterfaceClass {#define PNV10_XSCOM_XIVE2_BASE 0x2010800#define PNV10_XSCOM_XIVE2_SIZE 0x400 +#define PNV10_XSCOM_N1_CHIPLET_CTRL_REGS_BASE 0x3000000 +#define PNV10_XSCOM_CHIPLET_CTRL_REGS_SIZE 0x400 +#define PNV10_XSCOM_PEC_NEST_BASE 0x3011800/* index goes downwards ... */ #define PNV10_XSCOM_PEC_NEST_SIZE 0x100
hw/ppc/pnv_nest_pervasive.c new file +208 -0
208 lines not on this page · raw message
hw/ppc/meson.build +1 -0
@@ -51,6 +51,7 @@ ppc_ss.add(when: 'CONFIG_POWERNV', if_true: files( 'pnv_bmc.c', 'pnv_homer.c', 'pnv_pnor.c', + 'pnv_nest_pervasive.c', )) # PowerPC 4xx boards ppc_ss.add(when: 'CONFIG_PPC405', if_true: files(
Signature · 1 line
2.31.1
Re: [PATCH v8 1/3] hw/ppc: Add pnv nest pervasive common chiplet model
Quoted 11 lines · Chalapathi V
A POWER10 chip is divided into logical units called chiplets. Chiplets are broadly divided into "core chiplets" (with the processor cores) and "nest chiplets" (with everything else). Each chiplet has an attachment to the pervasive bus (PIB) and with chiplet-specific registers. All nest chiplets have a common basic set of registers and This model will provide the registers functionality for common registers of nest chiplet (Pervasive Chiplet, PB Chiplet, PCI Chiplets, MC Chiplet, PAU Chiplets)
This commit implement the read/write functions of chiplet control registers.
Signed-off-by Chalapathi V <[email protected]>
Please keep the Reviewed-by tags in between versions, unless fundamental changes were made.
Thanks,
C.
PATCH v8 2/3 hw/ppc: Add N1 chiplet model
In reply to Chalapathi VThe N1 chiplet handle the high speed i/o traffic over PCIe and others. The N1 chiplet consists of PowerBus Fabric controller,
nest Memory Management Unit, chiplet control unit and more.
This commit creates a N1 chiplet model and initialize and realize the pervasive chiplet model where chiplet control registers are implemented.
This commit also implement the read/write method for the powerbus scom registers
--- include/hw/ppc/pnv_n1_chiplet.h | 32 ++++++ include/hw/ppc/pnv_xscom.h | 6 ++ hw/ppc/pnv_n1_chiplet.c | 173 ++++++++++++++++++++++++++++++++ hw/ppc/meson.build | 1 + 4 files changed, 212 insertions(+) create mode 100644 include/hw/ppc/pnv_n1_chiplet.h create mode 100644 hw/ppc/pnv_n1_chiplet.c
include/hw/ppc/pnv_n1_chiplet.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* QEMU PowerPC N1 chiplet model +* +* Copyright (c) 2023, IBM Corporation. +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#ifndef PPC_PNV_N1_CHIPLET_H +#define PPC_PNV_N1_CHIPLET_H + +#include "hw/ppc/pnv_nest_pervasive.h" + +#define TYPE_PNV_N1_CHIPLET "pnv-N1-chiplet" +#define PNV_N1_CHIPLET (obj) OBJECT_CHECK(PnvN1Chiplet, (obj), TYPE_PNV_N1_CHIPLET) + +typedef struct PnvPbScom { +uint64_t mode; +uint64_t hp_mode2_curr; +}PnvPbScom ; + +typedef struct PnvN1Chiplet { +DeviceState parent; +MemoryRegion xscom_pb_eq_mr; +MemoryRegion xscom_pb_es_mr; +PnvNestChipletPervasive nest_pervasive;/* common pervasive chiplet unit */ +#define PNV_PB_SCOM_EQ_SIZE 8 +PnvPbScom eq[PNV_PB_SCOM_EQ_SIZE ]; +#define PNV_PB_SCOM_ES_SIZE 4 +PnvPbScom es[PNV_PB_SCOM_ES_SIZE ]; +}PnvN1Chiplet ; +#endif /*PPC_PNV_N1_CHIPLET_H */
include/hw/ppc/pnv_xscom.h +6 -0
@@ -173,6 +173,12 @@ struct PnvXScomInterfaceClass {#define PNV10_XSCOM_N1_CHIPLET_CTRL_REGS_BASE 0x3000000#define PNV10_XSCOM_CHIPLET_CTRL_REGS_SIZE 0x400 +#define PNV10_XSCOM_N1_PB_SCOM_EQ_BASE 0x3011000 +#define PNV10_XSCOM_N1_PB_SCOM_EQ_SIZE 0x200 + +#define PNV10_XSCOM_N1_PB_SCOM_ES_BASE 0x3011300 +#define PNV10_XSCOM_N1_PB_SCOM_ES_SIZE 0x100 +#define PNV10_XSCOM_PEC_NEST_BASE 0x3011800/* index goes downwards ... */ #define PNV10_XSCOM_PEC_NEST_SIZE 0x100
hw/ppc/pnv_n1_chiplet.c new file +173 -0
173 lines not on this page · raw message
hw/ppc/meson.build +1 -0
@@ -52,6 +52,7 @@ ppc_ss.add(when: 'CONFIG_POWERNV', if_true: files( 'pnv_homer.c', 'pnv_pnor.c', 'pnv_nest_pervasive.c', + 'pnv_n1_chiplet.c', )) # PowerPC 4xx boards ppc_ss.add(when: 'CONFIG_PPC405', if_true: files(
Signature · 1 line
2.31.1
Re: [PATCH v8 2/3] hw/ppc: Add N1 chiplet model
Quoted 11 lines · Chalapathi V
The N1 chiplet handle the high speed i/o traffic over PCIe and others. The N1 chiplet consists of PowerBus Fabric controller,
nest Memory Management Unit, chiplet control unit and more.This commit creates a N1 chiplet model and initialize and realize the pervasive chiplet model where chiplet control registers are implemented.
This commit also implement the read/write method for the powerbus scom registers
Signed-off-by Chalapathi V <[email protected]>
Thanks,
C.
PATCH v8 3/3 hw/ppc: N1 chiplet wiring
In reply to Chalapathi VThis part of the patchset connects the nest1 chiplet model to p10 chip.
--- include/hw/ppc/pnv_chip.h | 2 ++ hw/ppc/pnv.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+)
include/hw/ppc/pnv_chip.h +2 -0
@@ -4,6 +4,7 @@#include "hw/pci-host/pnv_phb4.h" #include "hw/ppc/pnv_core.h" #include "hw/ppc/pnv_homer.h" +#include "hw/ppc/pnv_n1_chiplet.h" #include "hw/ppc/pnv_lpc.h" #include "hw/ppc/pnv_occ.h" #include "hw/ppc/pnv_psi.h"
@@ -113,6 +114,7 @@ struct Pnv10Chip {PnvOCC occ;PnvSBE sbe;PnvHomer homer; +PnvN1Chiplet n1_chiplet;uint32_t nr_quads;PnvQuad *quads;
hw/ppc/pnv.c +15 -0
@@ -1680,6 +1680,8 @@ static void pnv_chip_power10_instance_init(Object *obj)object_initialize_child (obj,"occ" , &chip10->occ,TYPE_PNV10_OCC );object_initialize_child (obj,"sbe" , &chip10->sbe,TYPE_PNV10_SBE );object_initialize_child (obj,"homer" , &chip10->homer,TYPE_PNV10_HOMER ); +object_initialize_child (obj,"n1-chiplet" , &chip10->n1_chiplet, +TYPE_PNV_N1_CHIPLET ); chip->num_pecs = pcc->num_pecs;
@@ -1849,6 +1851,19 @@ static void pnv_chip_power10_realize(DeviceState *dev, Error **errp)memory_region_add_subregion (get_system_memory (),PNV10_HOMER_BASE (chip), &chip10->homer.regs); +/* N1 chiplet */ +if (!qdev_realize (DEVICE (&chip10->n1_chiplet),NULL , errp)) { +return ; + } +pnv_xscom_add_subregion (chip,PNV10_XSCOM_N1_CHIPLET_CTRL_REGS_BASE , + &chip10->n1_chiplet.nest_pervasive.xscom_ctrl_regs_mr); + +pnv_xscom_add_subregion (chip,PNV10_XSCOM_N1_PB_SCOM_EQ_BASE , + &chip10->n1_chiplet.xscom_pb_eq_mr); + +pnv_xscom_add_subregion (chip,PNV10_XSCOM_N1_PB_SCOM_ES_BASE , + &chip10->n1_chiplet.xscom_pb_es_mr); +/* PHBs */ pnv_chip_power10_phb_realize (chip, &local_err);if (local_err) {
Signature · 1 line
2.31.1
Re: [PATCH v8 3/3] hw/ppc: N1 chiplet wiring
Quoted 3 lines · Chalapathi V
This part of the patchset connects the nest1 chiplet model to p10 chip.
Signed-off-by Chalapathi V <[email protected]>
Thanks,
C.