mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
ppc/pnv/phb4: Add pervasive chiplet support to PHB4/5
Each non-core chiplet on a chip has a "pervasive chiplet" unit and its xscom register set. This adds support for PHB4/5. skiboot reads the CPLT_CONF1 register in __phb4/5_get_max_link_width(), which shows up as unimplemented xscom reads. Set a value in PCI CONF1 register's link-width field to demonstrate skiboot doing something interesting with it. In the bigger picture, it might be better to model the pervasive chiplet type as parent that each non-core chiplet model derives from. For now this is enough to get the PHB registers implemented and working for skiboot, and provides a second example (after the N1 chiplet) that will help if the design is reworked as such. Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
This commit is contained in:
parent
7f98b4f25e
commit
6b56bb6dbc
4 changed files with 71 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
|||
#include "hw/pci-host/pnv_phb.h"
|
||||
#include "hw/pci/pci_bus.h"
|
||||
#include "hw/ppc/pnv.h"
|
||||
#include "hw/ppc/pnv_nest_pervasive.h"
|
||||
#include "hw/ppc/xive.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
|
@ -174,6 +175,9 @@ struct PnvPhb4PecState {
|
|||
uint32_t index;
|
||||
uint32_t chip_id;
|
||||
|
||||
/* Pervasive chiplet control */
|
||||
PnvNestChipletPervasive nest_pervasive;
|
||||
|
||||
/* Nest registers, excuding per-stack */
|
||||
#define PHB4_PEC_NEST_REGS_COUNT 0xf
|
||||
uint64_t nest_regs[PHB4_PEC_NEST_REGS_COUNT];
|
||||
|
@ -196,6 +200,7 @@ struct PnvPhb4PecState {
|
|||
struct PnvPhb4PecClass {
|
||||
DeviceClass parent_class;
|
||||
|
||||
uint32_t (*xscom_cplt_base)(PnvPhb4PecState *pec);
|
||||
uint32_t (*xscom_nest_base)(PnvPhb4PecState *pec);
|
||||
uint32_t xscom_nest_size;
|
||||
uint32_t (*xscom_pci_base)(PnvPhb4PecState *pec);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue