2016-10-22 12:46:35 +03:00
|
|
|
/*
|
|
|
|
* QEMU PowerPC PowerNV various definitions
|
|
|
|
*
|
|
|
|
* Copyright (c) 2014-2016 BenH, IBM Corporation.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2020-10-16 17:53:46 +03:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2016-10-22 12:46:35 +03:00
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2019-03-15 17:51:21 +03:00
|
|
|
|
|
|
|
#ifndef PPC_PNV_H
|
|
|
|
#define PPC_PNV_H
|
2016-10-22 12:46:35 +03:00
|
|
|
|
include/hw/ppc: Split pnv_chip.h off pnv.h
PnvChipClass, PnvChip, Pnv8Chip, Pnv9Chip, and Pnv10Chip are defined
in pnv.h. Many users of the header don't actually need them. One
instance is this inclusion loop: hw/ppc/pnv_homer.h includes
hw/ppc/pnv.h for typedef PnvChip, and vice versa for struct PnvHomer.
Similar structs live in their own headers: PnvHomerClass and PnvHomer
in pnv_homer.h, PnvLpcClass and PnvLpcController in pci_lpc.h,
PnvPsiClass, PnvPsi, Pnv8Psi, Pnv9Psi, Pnv10Psi in pnv_psi.h, ...
Move PnvChipClass, PnvChip, Pnv8Chip, Pnv9Chip, and Pnv10Chip to new
pnv_chip.h, and adjust include directives. This breaks the inclusion
loop mentioned above.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20221222104628.659681-2-armbru@redhat.com>
2022-12-22 13:46:25 +03:00
|
|
|
#include "cpu.h"
|
2016-10-22 12:46:35 +03:00
|
|
|
#include "hw/boards.h"
|
2016-10-22 12:46:36 +03:00
|
|
|
#include "hw/sysbus.h"
|
2017-05-10 09:46:01 +03:00
|
|
|
#include "hw/ipmi/ipmi.h"
|
2019-10-21 16:12:11 +03:00
|
|
|
#include "hw/ppc/pnv_pnor.h"
|
2016-10-22 12:46:36 +03:00
|
|
|
|
2017-12-15 16:56:01 +03:00
|
|
|
#define TYPE_PNV_CHIP "pnv-chip"
|
2016-10-22 12:46:36 +03:00
|
|
|
|
include/hw/ppc: Split pnv_chip.h off pnv.h
PnvChipClass, PnvChip, Pnv8Chip, Pnv9Chip, and Pnv10Chip are defined
in pnv.h. Many users of the header don't actually need them. One
instance is this inclusion loop: hw/ppc/pnv_homer.h includes
hw/ppc/pnv.h for typedef PnvChip, and vice versa for struct PnvHomer.
Similar structs live in their own headers: PnvHomerClass and PnvHomer
in pnv_homer.h, PnvLpcClass and PnvLpcController in pci_lpc.h,
PnvPsiClass, PnvPsi, Pnv8Psi, Pnv9Psi, Pnv10Psi in pnv_psi.h, ...
Move PnvChipClass, PnvChip, Pnv8Chip, Pnv9Chip, and Pnv10Chip to new
pnv_chip.h, and adjust include directives. This breaks the inclusion
loop mentioned above.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20221222104628.659681-2-armbru@redhat.com>
2022-12-22 13:46:25 +03:00
|
|
|
typedef struct PnvChip PnvChip;
|
2020-09-03 23:43:22 +03:00
|
|
|
typedef struct Pnv8Chip Pnv8Chip;
|
|
|
|
typedef struct Pnv9Chip Pnv9Chip;
|
|
|
|
typedef struct Pnv10Chip Pnv10Chip;
|
2016-10-22 12:46:36 +03:00
|
|
|
|
2017-10-09 22:51:07 +03:00
|
|
|
#define PNV_CHIP_TYPE_SUFFIX "-" TYPE_PNV_CHIP
|
|
|
|
#define PNV_CHIP_TYPE_NAME(cpu_model) cpu_model PNV_CHIP_TYPE_SUFFIX
|
|
|
|
|
|
|
|
#define TYPE_PNV_CHIP_POWER8E PNV_CHIP_TYPE_NAME("power8e_v2.1")
|
2020-09-01 00:07:33 +03:00
|
|
|
DECLARE_INSTANCE_CHECKER(PnvChip, PNV_CHIP_POWER8E,
|
|
|
|
TYPE_PNV_CHIP_POWER8E)
|
2016-10-22 12:46:36 +03:00
|
|
|
|
2017-10-09 22:51:07 +03:00
|
|
|
#define TYPE_PNV_CHIP_POWER8 PNV_CHIP_TYPE_NAME("power8_v2.0")
|
2020-09-01 00:07:33 +03:00
|
|
|
DECLARE_INSTANCE_CHECKER(PnvChip, PNV_CHIP_POWER8,
|
|
|
|
TYPE_PNV_CHIP_POWER8)
|
2016-10-22 12:46:36 +03:00
|
|
|
|
2017-10-09 22:51:07 +03:00
|
|
|
#define TYPE_PNV_CHIP_POWER8NVL PNV_CHIP_TYPE_NAME("power8nvl_v1.0")
|
2020-09-01 00:07:33 +03:00
|
|
|
DECLARE_INSTANCE_CHECKER(PnvChip, PNV_CHIP_POWER8NVL,
|
|
|
|
TYPE_PNV_CHIP_POWER8NVL)
|
2016-10-22 12:46:36 +03:00
|
|
|
|
2017-10-09 22:51:07 +03:00
|
|
|
#define TYPE_PNV_CHIP_POWER9 PNV_CHIP_TYPE_NAME("power9_v2.0")
|
2020-09-01 00:07:33 +03:00
|
|
|
DECLARE_INSTANCE_CHECKER(PnvChip, PNV_CHIP_POWER9,
|
|
|
|
TYPE_PNV_CHIP_POWER9)
|
2016-10-22 12:46:36 +03:00
|
|
|
|
2021-08-09 16:45:23 +03:00
|
|
|
#define TYPE_PNV_CHIP_POWER10 PNV_CHIP_TYPE_NAME("power10_v2.0")
|
2020-09-01 00:07:33 +03:00
|
|
|
DECLARE_INSTANCE_CHECKER(PnvChip, PNV_CHIP_POWER10,
|
|
|
|
TYPE_PNV_CHIP_POWER10)
|
2019-12-05 21:44:51 +03:00
|
|
|
|
2019-11-25 09:58:07 +03:00
|
|
|
PowerPCCPU *pnv_chip_find_cpu(PnvChip *chip, uint32_t pir);
|
|
|
|
|
2022-12-22 13:46:27 +03:00
|
|
|
typedef struct PnvPHB PnvPHB;
|
|
|
|
|
2017-12-15 16:56:01 +03:00
|
|
|
#define TYPE_PNV_MACHINE MACHINE_TYPE_NAME("powernv")
|
2020-09-03 23:43:22 +03:00
|
|
|
typedef struct PnvMachineClass PnvMachineClass;
|
|
|
|
typedef struct PnvMachineState PnvMachineState;
|
2020-09-01 00:07:33 +03:00
|
|
|
DECLARE_OBJ_CHECKERS(PnvMachineState, PnvMachineClass,
|
|
|
|
PNV_MACHINE, TYPE_PNV_MACHINE)
|
2019-12-13 14:59:50 +03:00
|
|
|
|
2019-12-13 14:59:56 +03:00
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
struct PnvMachineClass {
|
2019-12-13 14:59:50 +03:00
|
|
|
/*< private >*/
|
|
|
|
MachineClass parent_class;
|
|
|
|
|
|
|
|
/*< public >*/
|
|
|
|
const char *compat;
|
|
|
|
int compat_size;
|
2019-12-13 14:59:56 +03:00
|
|
|
|
|
|
|
void (*dt_power_mgt)(PnvMachineState *pnv, void *fdt);
|
2020-09-03 23:43:22 +03:00
|
|
|
};
|
2016-10-22 12:46:35 +03:00
|
|
|
|
2019-12-13 14:59:56 +03:00
|
|
|
struct PnvMachineState {
|
2016-10-22 12:46:35 +03:00
|
|
|
/*< private >*/
|
|
|
|
MachineState parent_obj;
|
|
|
|
|
|
|
|
uint32_t initrd_base;
|
|
|
|
long initrd_size;
|
2016-10-22 12:46:36 +03:00
|
|
|
|
|
|
|
uint32_t num_chips;
|
|
|
|
PnvChip **chips;
|
2016-10-22 12:46:43 +03:00
|
|
|
|
|
|
|
ISABus *isa_bus;
|
2017-04-05 15:41:26 +03:00
|
|
|
uint32_t cpld_irqstate;
|
2017-04-11 18:30:05 +03:00
|
|
|
|
|
|
|
IPMIBmc *bmc;
|
2017-04-11 18:30:06 +03:00
|
|
|
Notifier powerdown_notifier;
|
2019-10-21 16:12:11 +03:00
|
|
|
|
|
|
|
PnvPnor *pnor;
|
2020-01-27 17:41:54 +03:00
|
|
|
|
|
|
|
hwaddr fw_load_addr;
|
2019-12-13 14:59:56 +03:00
|
|
|
};
|
2016-10-22 12:46:35 +03:00
|
|
|
|
2022-01-12 13:28:27 +03:00
|
|
|
PnvChip *pnv_get_chip(PnvMachineState *pnv, uint32_t chip_id);
|
2023-03-02 19:37:15 +03:00
|
|
|
PnvChip *pnv_chip_add_phb(PnvChip *chip, PnvPHB *phb);
|
2022-01-12 13:28:27 +03:00
|
|
|
|
2016-10-22 12:46:35 +03:00
|
|
|
#define PNV_FDT_ADDR 0x01000000
|
2016-10-22 12:46:39 +03:00
|
|
|
#define PNV_TIMEBASE_FREQ 512000000ULL
|
2016-10-22 12:46:35 +03:00
|
|
|
|
2017-04-11 18:30:05 +03:00
|
|
|
/*
|
|
|
|
* BMC helpers
|
|
|
|
*/
|
2017-12-15 16:56:01 +03:00
|
|
|
void pnv_dt_bmc_sensors(IPMIBmc *bmc, void *fdt);
|
2017-04-11 18:30:06 +03:00
|
|
|
void pnv_bmc_powerdown(IPMIBmc *bmc);
|
2020-01-06 17:56:40 +03:00
|
|
|
IPMIBmc *pnv_bmc_create(PnvPnor *pnor);
|
2020-04-04 18:36:55 +03:00
|
|
|
IPMIBmc *pnv_bmc_find(Error **errp);
|
|
|
|
void pnv_bmc_set_pnor(IPMIBmc *bmc, PnvPnor *pnor);
|
2017-04-11 18:30:05 +03:00
|
|
|
|
ppc/pnv: add XSCOM infrastructure
On a real POWER8 system, the Pervasive Interconnect Bus (PIB) serves
as a backbone to connect different units of the system. The host
firmware connects to the PIB through a bridge unit, the
Alter-Display-Unit (ADU), which gives him access to all the chiplets
on the PCB network (Pervasive Connect Bus), the PIB acting as the root
of this network.
XSCOM (serial communication) is the interface to the sideband bus
provided by the POWER8 pervasive unit to read and write to chiplets
resources. This is needed by the host firmware, OPAL and to a lesser
extent, Linux. This is among others how the PCI Host bridges get
configured at boot or how the LPC bus is accessed.
To represent the ADU of a real system, we introduce a specific
AddressSpace to dispatch XSCOM accesses to the targeted chiplets. The
translation of an XSCOM address into a PCB register address is
slightly different between the P9 and the P8. This is handled before
the dispatch using a 8byte alignment for all.
To customize the device tree, a QOM InterfaceClass, PnvXScomInterface,
is provided with a populate() handler. The chip populates the device
tree by simply looping on its children. Therefore, each model needing
custom nodes should not forget to declare itself as a child at
instantiation time.
Based on previous work done by :
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
[dwg: Added cpu parameter to xscom_complete()]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-22 12:46:40 +03:00
|
|
|
/*
|
|
|
|
* POWER8 MMIO base addresses
|
|
|
|
*/
|
|
|
|
#define PNV_XSCOM_SIZE 0x800000000ull
|
|
|
|
#define PNV_XSCOM_BASE(chip) \
|
2019-06-12 20:43:45 +03:00
|
|
|
(0x0003fc0000000000ull + ((uint64_t)(chip)->chip_id) * PNV_XSCOM_SIZE)
|
ppc/pnv: add XSCOM infrastructure
On a real POWER8 system, the Pervasive Interconnect Bus (PIB) serves
as a backbone to connect different units of the system. The host
firmware connects to the PIB through a bridge unit, the
Alter-Display-Unit (ADU), which gives him access to all the chiplets
on the PCB network (Pervasive Connect Bus), the PIB acting as the root
of this network.
XSCOM (serial communication) is the interface to the sideband bus
provided by the POWER8 pervasive unit to read and write to chiplets
resources. This is needed by the host firmware, OPAL and to a lesser
extent, Linux. This is among others how the PCI Host bridges get
configured at boot or how the LPC bus is accessed.
To represent the ADU of a real system, we introduce a specific
AddressSpace to dispatch XSCOM accesses to the targeted chiplets. The
translation of an XSCOM address into a PCB register address is
slightly different between the P9 and the P8. This is handled before
the dispatch using a 8byte alignment for all.
To customize the device tree, a QOM InterfaceClass, PnvXScomInterface,
is provided with a populate() handler. The chip populates the device
tree by simply looping on its children. Therefore, each model needing
custom nodes should not forget to declare itself as a child at
instantiation time.
Based on previous work done by :
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
[dwg: Added cpu parameter to xscom_complete()]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-22 12:46:40 +03:00
|
|
|
|
2019-12-11 11:29:11 +03:00
|
|
|
#define PNV_OCC_COMMON_AREA_SIZE 0x0000000000800000ull
|
|
|
|
#define PNV_OCC_COMMON_AREA_BASE 0x7fff800000ull
|
2019-12-11 11:29:12 +03:00
|
|
|
#define PNV_OCC_SENSOR_BASE(chip) (PNV_OCC_COMMON_AREA_BASE + \
|
2021-08-09 16:45:25 +03:00
|
|
|
PNV_OCC_SENSOR_DATA_BLOCK_BASE((chip)->chip_id))
|
2019-09-12 12:30:52 +03:00
|
|
|
|
2019-12-11 11:29:11 +03:00
|
|
|
#define PNV_HOMER_SIZE 0x0000000000400000ull
|
2019-09-12 12:30:52 +03:00
|
|
|
#define PNV_HOMER_BASE(chip) \
|
2021-08-09 16:45:25 +03:00
|
|
|
(0x7ffd800000ull + ((uint64_t)(chip)->chip_id) * PNV_HOMER_SIZE)
|
2019-09-12 12:30:52 +03:00
|
|
|
|
|
|
|
|
2017-04-03 10:46:05 +03:00
|
|
|
/*
|
|
|
|
* XSCOM 0x20109CA defines the ICP BAR:
|
|
|
|
*
|
|
|
|
* 0:29 : bits 14 to 43 of address to define 1 MB region.
|
|
|
|
* 30 : 1 to enable ICP to receive loads/stores against its BAR region
|
|
|
|
* 31:63 : Constant 0
|
|
|
|
*
|
|
|
|
* Usually defined as :
|
|
|
|
*
|
|
|
|
* 0xffffe00200000000 -> 0x0003ffff80000000
|
|
|
|
* 0xffffe00600000000 -> 0x0003ffff80100000
|
|
|
|
* 0xffffe02200000000 -> 0x0003ffff80800000
|
|
|
|
* 0xffffe02600000000 -> 0x0003ffff80900000
|
|
|
|
*/
|
|
|
|
#define PNV_ICP_SIZE 0x0000000000100000ull
|
|
|
|
#define PNV_ICP_BASE(chip) \
|
2021-08-09 16:45:25 +03:00
|
|
|
(0x0003ffff80000000ull + (uint64_t) (chip)->chip_id * PNV_ICP_SIZE)
|
2017-04-03 10:46:05 +03:00
|
|
|
|
2017-04-05 15:41:26 +03:00
|
|
|
|
|
|
|
#define PNV_PSIHB_SIZE 0x0000000000100000ull
|
|
|
|
#define PNV_PSIHB_BASE(chip) \
|
2021-08-09 16:45:25 +03:00
|
|
|
(0x0003fffe80000000ull + (uint64_t)(chip)->chip_id * PNV_PSIHB_SIZE)
|
2017-04-05 15:41:26 +03:00
|
|
|
|
|
|
|
#define PNV_PSIHB_FSP_SIZE 0x0000000100000000ull
|
|
|
|
#define PNV_PSIHB_FSP_BASE(chip) \
|
2021-08-09 16:45:25 +03:00
|
|
|
(0x0003ffe000000000ull + (uint64_t)(chip)->chip_id * \
|
2017-04-05 15:41:26 +03:00
|
|
|
PNV_PSIHB_FSP_SIZE)
|
|
|
|
|
2019-03-06 11:50:11 +03:00
|
|
|
/*
|
|
|
|
* POWER9 MMIO base addresses
|
|
|
|
*/
|
|
|
|
#define PNV9_CHIP_BASE(chip, base) \
|
|
|
|
((base) + ((uint64_t) (chip)->chip_id << 42))
|
|
|
|
|
|
|
|
#define PNV9_XIVE_VC_SIZE 0x0000008000000000ull
|
|
|
|
#define PNV9_XIVE_VC_BASE(chip) PNV9_CHIP_BASE(chip, 0x0006010000000000ull)
|
|
|
|
|
|
|
|
#define PNV9_XIVE_PC_SIZE 0x0000001000000000ull
|
|
|
|
#define PNV9_XIVE_PC_BASE(chip) PNV9_CHIP_BASE(chip, 0x0006018000000000ull)
|
|
|
|
|
2019-03-08 01:35:39 +03:00
|
|
|
#define PNV9_LPCM_SIZE 0x0000000100000000ull
|
|
|
|
#define PNV9_LPCM_BASE(chip) PNV9_CHIP_BASE(chip, 0x0006030000000000ull)
|
|
|
|
|
2019-03-08 01:35:35 +03:00
|
|
|
#define PNV9_PSIHB_SIZE 0x0000000000100000ull
|
|
|
|
#define PNV9_PSIHB_BASE(chip) PNV9_CHIP_BASE(chip, 0x0006030203000000ull)
|
|
|
|
|
2019-03-06 11:50:11 +03:00
|
|
|
#define PNV9_XIVE_IC_SIZE 0x0000000000080000ull
|
|
|
|
#define PNV9_XIVE_IC_BASE(chip) PNV9_CHIP_BASE(chip, 0x0006030203100000ull)
|
|
|
|
|
|
|
|
#define PNV9_XIVE_TM_SIZE 0x0000000000040000ull
|
|
|
|
#define PNV9_XIVE_TM_BASE(chip) PNV9_CHIP_BASE(chip, 0x0006030203180000ull)
|
|
|
|
|
2019-03-08 01:35:35 +03:00
|
|
|
#define PNV9_PSIHB_ESB_SIZE 0x0000000000010000ull
|
|
|
|
#define PNV9_PSIHB_ESB_BASE(chip) PNV9_CHIP_BASE(chip, 0x00060302031c0000ull)
|
2019-03-06 11:50:11 +03:00
|
|
|
|
2019-06-12 20:43:44 +03:00
|
|
|
#define PNV9_XSCOM_SIZE 0x0000000400000000ull
|
|
|
|
#define PNV9_XSCOM_BASE(chip) PNV9_CHIP_BASE(chip, 0x00603fc00000000ull)
|
|
|
|
|
2019-12-11 11:29:11 +03:00
|
|
|
#define PNV9_OCC_COMMON_AREA_SIZE 0x0000000000800000ull
|
|
|
|
#define PNV9_OCC_COMMON_AREA_BASE 0x203fff800000ull
|
2019-12-11 11:29:12 +03:00
|
|
|
#define PNV9_OCC_SENSOR_BASE(chip) (PNV9_OCC_COMMON_AREA_BASE + \
|
2021-08-09 16:45:25 +03:00
|
|
|
PNV_OCC_SENSOR_DATA_BLOCK_BASE((chip)->chip_id))
|
2019-09-12 12:30:52 +03:00
|
|
|
|
2019-12-11 11:29:11 +03:00
|
|
|
#define PNV9_HOMER_SIZE 0x0000000000400000ull
|
2019-09-12 12:30:52 +03:00
|
|
|
#define PNV9_HOMER_BASE(chip) \
|
2021-08-09 16:45:25 +03:00
|
|
|
(0x203ffd800000ull + ((uint64_t)(chip)->chip_id) * PNV9_HOMER_SIZE)
|
2019-12-05 21:44:51 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* POWER10 MMIO base addresses - 16TB stride per chip
|
|
|
|
*/
|
|
|
|
#define PNV10_CHIP_BASE(chip, base) \
|
|
|
|
((base) + ((uint64_t) (chip)->chip_id << 44))
|
|
|
|
|
|
|
|
#define PNV10_XSCOM_SIZE 0x0000000400000000ull
|
|
|
|
#define PNV10_XSCOM_BASE(chip) PNV10_CHIP_BASE(chip, 0x00603fc00000000ull)
|
|
|
|
|
2019-12-05 21:44:54 +03:00
|
|
|
#define PNV10_LPCM_SIZE 0x0000000100000000ull
|
|
|
|
#define PNV10_LPCM_BASE(chip) PNV10_CHIP_BASE(chip, 0x0006030000000000ull)
|
|
|
|
|
ppc/pnv: Add a XIVE2 controller to the POWER10 chip
The XIVE2 interrupt controller of the POWER10 processor follows the
same logic than on POWER9 but the HW interface has been largely
reviewed. It has a new register interface, different BARs, extra
VSDs, new layout for the XIVE2 structures, and a set of new features
which are described below.
This is a model of the POWER10 XIVE2 interrupt controller for the
PowerNV machine. It focuses primarily on the needs of the skiboot
firmware but some initial hypervisor support is implemented for KVM
use (escalation).
Support for new features will be implemented in time and will require
new support from the OS.
* XIVE2 BARS
The interrupt controller BARs have a different layout outlined below.
Each sub-engine has now own its range and the indirect TIMA access was
replaced with a set of pages, one per CPU, under the IC BAR:
- IC BAR (Interrupt Controller)
. 4 pages, one per sub-engine
. 128 indirect TIMA pages
- TM BAR (Thread Interrupt Management Area)
. 4 pages
- ESB BAR (ESB pages for IPIs)
. up to 1TB
- END BAR (ESB pages for ENDs)
. up to 2TB
- NVC BAR (Notification Virtual Crowd)
. up to 128
- NVPG BAR (Notification Virtual Process and Group)
. up to 1TB
- Direct mapped Thread Context Area (reads & writes)
OPAL does not use the grouping and crowd capability.
* Virtual Structure Tables
XIVE2 adds new tables types and also changes the field layout of the END
and NVP Virtualization Structure Descriptors.
- EAS
- END new layout
- NVT was splitted in :
. NVP (Processor), 32B
. NVG (Group), 32B
. NVC (Crowd == P9 block group) 32B
- IC for remote configuration
- SYNC for cache injection
- ERQ for event input queue
The setup is slighly different on XIVE2 because the indexing has changed
for some of the tables, block ID or the chip topology ID can be used.
* XIVE2 features
SCOM and MMIO registers have a new layout and XIVE2 adds a new global
capability and configuration registers.
The lowlevel hardware offers a set of new features among which :
- a configurable number of priorities : 1 - 8
- StoreEOI with load-after-store ordering is activated by default
- Gen2 TIMA layout
- A P9-compat mode, or Gen1, TIMA toggle bit for SW compatibility
- increase to 24bit for VP number
Other features will have some impact on the Hypervisor and guest OS
when activated, but this is not required for initial support of the
controller.
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2022-03-02 08:51:38 +03:00
|
|
|
#define PNV10_XIVE2_IC_SIZE 0x0000000002000000ull
|
|
|
|
#define PNV10_XIVE2_IC_BASE(chip) PNV10_CHIP_BASE(chip, 0x0006030200000000ull)
|
|
|
|
|
2019-12-05 21:44:53 +03:00
|
|
|
#define PNV10_PSIHB_ESB_SIZE 0x0000000000100000ull
|
|
|
|
#define PNV10_PSIHB_ESB_BASE(chip) PNV10_CHIP_BASE(chip, 0x0006030202000000ull)
|
|
|
|
|
|
|
|
#define PNV10_PSIHB_SIZE 0x0000000000100000ull
|
|
|
|
#define PNV10_PSIHB_BASE(chip) PNV10_CHIP_BASE(chip, 0x0006030203000000ull)
|
|
|
|
|
ppc/pnv: Add a XIVE2 controller to the POWER10 chip
The XIVE2 interrupt controller of the POWER10 processor follows the
same logic than on POWER9 but the HW interface has been largely
reviewed. It has a new register interface, different BARs, extra
VSDs, new layout for the XIVE2 structures, and a set of new features
which are described below.
This is a model of the POWER10 XIVE2 interrupt controller for the
PowerNV machine. It focuses primarily on the needs of the skiboot
firmware but some initial hypervisor support is implemented for KVM
use (escalation).
Support for new features will be implemented in time and will require
new support from the OS.
* XIVE2 BARS
The interrupt controller BARs have a different layout outlined below.
Each sub-engine has now own its range and the indirect TIMA access was
replaced with a set of pages, one per CPU, under the IC BAR:
- IC BAR (Interrupt Controller)
. 4 pages, one per sub-engine
. 128 indirect TIMA pages
- TM BAR (Thread Interrupt Management Area)
. 4 pages
- ESB BAR (ESB pages for IPIs)
. up to 1TB
- END BAR (ESB pages for ENDs)
. up to 2TB
- NVC BAR (Notification Virtual Crowd)
. up to 128
- NVPG BAR (Notification Virtual Process and Group)
. up to 1TB
- Direct mapped Thread Context Area (reads & writes)
OPAL does not use the grouping and crowd capability.
* Virtual Structure Tables
XIVE2 adds new tables types and also changes the field layout of the END
and NVP Virtualization Structure Descriptors.
- EAS
- END new layout
- NVT was splitted in :
. NVP (Processor), 32B
. NVG (Group), 32B
. NVC (Crowd == P9 block group) 32B
- IC for remote configuration
- SYNC for cache injection
- ERQ for event input queue
The setup is slighly different on XIVE2 because the indexing has changed
for some of the tables, block ID or the chip topology ID can be used.
* XIVE2 features
SCOM and MMIO registers have a new layout and XIVE2 adds a new global
capability and configuration registers.
The lowlevel hardware offers a set of new features among which :
- a configurable number of priorities : 1 - 8
- StoreEOI with load-after-store ordering is activated by default
- Gen2 TIMA layout
- A P9-compat mode, or Gen1, TIMA toggle bit for SW compatibility
- increase to 24bit for VP number
Other features will have some impact on the Hypervisor and guest OS
when activated, but this is not required for initial support of the
controller.
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2022-03-02 08:51:38 +03:00
|
|
|
#define PNV10_XIVE2_TM_SIZE 0x0000000000040000ull
|
|
|
|
#define PNV10_XIVE2_TM_BASE(chip) PNV10_CHIP_BASE(chip, 0x0006030203180000ull)
|
|
|
|
|
|
|
|
#define PNV10_XIVE2_NVC_SIZE 0x0000000008000000ull
|
|
|
|
#define PNV10_XIVE2_NVC_BASE(chip) PNV10_CHIP_BASE(chip, 0x0006030208000000ull)
|
|
|
|
|
|
|
|
#define PNV10_XIVE2_NVPG_SIZE 0x0000010000000000ull
|
|
|
|
#define PNV10_XIVE2_NVPG_BASE(chip) PNV10_CHIP_BASE(chip, 0x0006040000000000ull)
|
|
|
|
|
|
|
|
#define PNV10_XIVE2_ESB_SIZE 0x0000010000000000ull
|
|
|
|
#define PNV10_XIVE2_ESB_BASE(chip) PNV10_CHIP_BASE(chip, 0x0006050000000000ull)
|
|
|
|
|
|
|
|
#define PNV10_XIVE2_END_SIZE 0x0000020000000000ull
|
|
|
|
#define PNV10_XIVE2_END_BASE(chip) PNV10_CHIP_BASE(chip, 0x0006060000000000ull)
|
|
|
|
|
2022-03-02 08:51:39 +03:00
|
|
|
#define PNV10_OCC_COMMON_AREA_SIZE 0x0000000000800000ull
|
|
|
|
#define PNV10_OCC_COMMON_AREA_BASE 0x300fff800000ull
|
|
|
|
#define PNV10_OCC_SENSOR_BASE(chip) (PNV10_OCC_COMMON_AREA_BASE + \
|
|
|
|
PNV_OCC_SENSOR_DATA_BLOCK_BASE((chip)->chip_id))
|
|
|
|
|
|
|
|
#define PNV10_HOMER_SIZE 0x0000000000400000ull
|
|
|
|
#define PNV10_HOMER_BASE(chip) \
|
|
|
|
(0x300ffd800000ll + ((uint64_t)(chip)->chip_id) * PNV10_HOMER_SIZE)
|
|
|
|
|
2019-03-15 17:51:21 +03:00
|
|
|
#endif /* PPC_PNV_H */
|