mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge tag 'pull-target-arm-20220107' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
target-arm queue: * Add dummy Aspeed AST2600 Display Port MCU (DPMCU) * Add missing FEAT_TLBIOS instructions * arm_gicv3_its: Various bug fixes and cleanups * kudo-bmc: Add more devices # gpg: Signature made Fri 07 Jan 2022 09:20:24 AM PST # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [full] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [full] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [full] * tag 'pull-target-arm-20220107' of https://git.linaro.org/people/pmaydell/qemu-arm: hw/arm: kudo add lm75s on bus 13 hw/arm: add i2c muxes to kudo-bmc hw/arm: attach MMC to kudo-bmc hw/arm: Add kudo i2c eeproms. hw/intc/arm_gicv3_its: Rename max_l2_entries to num_l2_entries hw/intc/arm_gicv3_its: Fix various off-by-one errors hw/intc/arm_gicv3_its: Use FIELD macros for CTEs hw/intc/arm_gicv3_its: Correct comment about CTE RDBase field size hw/intc/arm_gicv3_its: Use FIELD macros for DTEs hw/intc/arm_gicv3_its: Correct handling of MAPI hw/intc/arm_gicv3_its: Don't misuse GITS_TYPE_PHYSICAL define hw/intc/arm_gicv3_its: Correct setting of TableDesc entry_sz hw/intc/arm_gicv3_its: Reduce code duplication in extract_table_params() hw/intc/arm_gicv3_its: Don't return early in extract_table_params() loop hw/intc/arm_gicv3_its: Remove maxids union from TableDesc hw/intc/arm_gicv3_its: Remove redundant ITS_CTLR_ENABLED define hw/intc/arm_gicv3_its: Correct off-by-one bounds check on rdbase target/arm: Add missing FEAT_TLBIOS instructions Add dummy Aspeed AST2600 Display Port MCU (DPMCU) Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
@@ -19,9 +19,11 @@
|
||||
#include "sysemu/sysemu.h"
|
||||
|
||||
#define ASPEED_SOC_IOMEM_SIZE 0x00200000
|
||||
#define ASPEED_SOC_DPMCU_SIZE 0x00040000
|
||||
|
||||
static const hwaddr aspeed_soc_ast2600_memmap[] = {
|
||||
[ASPEED_DEV_SRAM] = 0x10000000,
|
||||
[ASPEED_DEV_DPMCU] = 0x18000000,
|
||||
/* 0x16000000 0x17FFFFFF : AHB BUS do LPC Bus bridge */
|
||||
[ASPEED_DEV_IOMEM] = 0x1E600000,
|
||||
[ASPEED_DEV_PWM] = 0x1E610000,
|
||||
@@ -44,6 +46,7 @@ static const hwaddr aspeed_soc_ast2600_memmap[] = {
|
||||
[ASPEED_DEV_SCU] = 0x1E6E2000,
|
||||
[ASPEED_DEV_XDMA] = 0x1E6E7000,
|
||||
[ASPEED_DEV_ADC] = 0x1E6E9000,
|
||||
[ASPEED_DEV_DP] = 0x1E6EB000,
|
||||
[ASPEED_DEV_VIDEO] = 0x1E700000,
|
||||
[ASPEED_DEV_SDHCI] = 0x1E740000,
|
||||
[ASPEED_DEV_EMMC] = 0x1E750000,
|
||||
@@ -104,6 +107,7 @@ static const int aspeed_soc_ast2600_irqmap[] = {
|
||||
[ASPEED_DEV_ETH3] = 32,
|
||||
[ASPEED_DEV_ETH4] = 33,
|
||||
[ASPEED_DEV_KCS] = 138, /* 138 -> 142 */
|
||||
[ASPEED_DEV_DP] = 62,
|
||||
};
|
||||
|
||||
static qemu_irq aspeed_soc_get_irq(AspeedSoCState *s, int ctrl)
|
||||
@@ -298,6 +302,10 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
|
||||
memory_region_add_subregion(get_system_memory(),
|
||||
sc->memmap[ASPEED_DEV_SRAM], &s->sram);
|
||||
|
||||
/* DPMCU */
|
||||
create_unimplemented_device("aspeed.dpmcu", sc->memmap[ASPEED_DEV_DPMCU],
|
||||
ASPEED_SOC_DPMCU_SIZE);
|
||||
|
||||
/* SCU */
|
||||
if (!sysbus_realize(SYS_BUS_DEVICE(&s->scu), errp)) {
|
||||
return;
|
||||
|
||||
@@ -328,6 +328,31 @@ static void quanta_gbs_i2c_init(NPCM7xxState *soc)
|
||||
*/
|
||||
}
|
||||
|
||||
static void kudo_bmc_i2c_init(NPCM7xxState *soc)
|
||||
{
|
||||
I2CSlave *i2c_mux;
|
||||
|
||||
i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 1), TYPE_PCA9548, 0x75);
|
||||
i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 1), TYPE_PCA9548, 0x77);
|
||||
|
||||
i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 4), TYPE_PCA9548, 0x77);
|
||||
|
||||
at24c_eeprom_init(soc, 4, 0x50, 8192); /* mbfru */
|
||||
|
||||
i2c_mux = i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 13),
|
||||
TYPE_PCA9548, 0x77);
|
||||
|
||||
/* tmp105 is compatible with the lm75 */
|
||||
i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 2), "tmp105", 0x48);
|
||||
i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 3), "tmp105", 0x49);
|
||||
i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 4), "tmp105", 0x48);
|
||||
i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 5), "tmp105", 0x49);
|
||||
|
||||
at24c_eeprom_init(soc, 14, 0x55, 8192); /* bmcfru */
|
||||
|
||||
/* TODO: Add remaining i2c devices. */
|
||||
}
|
||||
|
||||
static void npcm750_evb_init(MachineState *machine)
|
||||
{
|
||||
NPCM7xxState *soc;
|
||||
@@ -391,6 +416,8 @@ static void kudo_bmc_init(MachineState *machine)
|
||||
npcm7xx_connect_flash(&soc->fiu[1], 0, "mx66u51235f",
|
||||
drive_get(IF_MTD, 3, 0));
|
||||
|
||||
kudo_bmc_i2c_init(soc);
|
||||
sdhci_attach_drive(&soc->mmc.sdhci, 0);
|
||||
npcm7xx_load_kernel(machine, soc);
|
||||
}
|
||||
|
||||
|
||||
+104
-130
File diff suppressed because it is too large
Load Diff
+21
-19
@@ -289,8 +289,6 @@ FIELD(GITS_TYPER, CIL, 36, 1)
|
||||
|
||||
#define GITS_IDREGS 0xFFD0
|
||||
|
||||
#define ITS_CTLR_ENABLED (1U) /* ITS Enabled */
|
||||
|
||||
#define GITS_BASER_RO_MASK (R_GITS_BASER_ENTRYSIZE_MASK | \
|
||||
R_GITS_BASER_TYPE_MASK)
|
||||
|
||||
@@ -356,28 +354,30 @@ FIELD(MAPC, RDBASE, 16, 32)
|
||||
#define L2_TABLE_VALID_MASK CMD_FIELD_VALID_MASK
|
||||
#define TABLE_ENTRY_VALID_MASK (1ULL << 0)
|
||||
|
||||
/**
|
||||
* Default features advertised by this version of ITS
|
||||
*/
|
||||
/* Physical LPIs supported */
|
||||
#define GITS_TYPE_PHYSICAL (1U << 0)
|
||||
|
||||
/*
|
||||
* 12 bytes Interrupt translation Table Entry size
|
||||
* as per Table 5.3 in GICv3 spec
|
||||
* ITE Lower 8 Bytes
|
||||
* Bits: | 49 ... 26 | 25 ... 2 | 1 | 0 |
|
||||
* Values: | 1023 | IntNum | IntType | Valid |
|
||||
* Values: | Doorbell | IntNum | IntType | Valid |
|
||||
* ITE Higher 4 Bytes
|
||||
* Bits: | 31 ... 16 | 15 ...0 |
|
||||
* Values: | vPEID | ICID |
|
||||
* (When Doorbell is unused, as it always is in GICv3, it is 1023)
|
||||
*/
|
||||
#define ITS_ITT_ENTRY_SIZE 0xC
|
||||
#define ITE_ENTRY_INTTYPE_SHIFT 1
|
||||
#define ITE_ENTRY_INTID_SHIFT 2
|
||||
#define ITE_ENTRY_INTID_MASK MAKE_64BIT_MASK(2, 24)
|
||||
#define ITE_ENTRY_INTSP_SHIFT 26
|
||||
#define ITE_ENTRY_ICID_MASK MAKE_64BIT_MASK(0, 16)
|
||||
|
||||
FIELD(ITE_L, VALID, 0, 1)
|
||||
FIELD(ITE_L, INTTYPE, 1, 1)
|
||||
FIELD(ITE_L, INTID, 2, 24)
|
||||
FIELD(ITE_L, DOORBELL, 26, 24)
|
||||
|
||||
FIELD(ITE_H, ICID, 0, 16)
|
||||
FIELD(ITE_H, VPEID, 16, 16)
|
||||
|
||||
/* Possible values for ITE_L INTTYPE */
|
||||
#define ITE_INTTYPE_VIRTUAL 0
|
||||
#define ITE_INTTYPE_PHYSICAL 1
|
||||
|
||||
/* 16 bits EventId */
|
||||
#define ITS_IDBITS GICD_TYPER_IDBITS
|
||||
@@ -393,16 +393,18 @@ FIELD(MAPC, RDBASE, 16, 32)
|
||||
* Valid = 1 bit,ITTAddr = 44 bits,Size = 5 bits
|
||||
*/
|
||||
#define GITS_DTE_SIZE (0x8ULL)
|
||||
#define GITS_DTE_ITTADDR_SHIFT 6
|
||||
#define GITS_DTE_ITTADDR_MASK MAKE_64BIT_MASK(GITS_DTE_ITTADDR_SHIFT, \
|
||||
ITTADDR_LENGTH)
|
||||
|
||||
FIELD(DTE, VALID, 0, 1)
|
||||
FIELD(DTE, SIZE, 1, 5)
|
||||
FIELD(DTE, ITTADDR, 6, 44)
|
||||
|
||||
/*
|
||||
* 8 bytes Collection Table Entry size
|
||||
* Valid = 1 bit,RDBase = 36 bits(considering max RDBASE)
|
||||
* Valid = 1 bit, RDBase = 16 bits
|
||||
*/
|
||||
#define GITS_CTE_SIZE (0x8ULL)
|
||||
#define GITS_CTE_RDBASE_PROCNUM_MASK MAKE_64BIT_MASK(1, RDBASE_PROCNUM_LENGTH)
|
||||
FIELD(CTE, VALID, 0, 1)
|
||||
FIELD(CTE, RDBASE, 1, RDBASE_PROCNUM_LENGTH)
|
||||
|
||||
/* Special interrupt IDs */
|
||||
#define INTID_SECURE 1020
|
||||
|
||||
@@ -139,6 +139,8 @@ enum {
|
||||
ASPEED_DEV_EMMC,
|
||||
ASPEED_DEV_KCS,
|
||||
ASPEED_DEV_HACE,
|
||||
ASPEED_DEV_DPMCU,
|
||||
ASPEED_DEV_DP,
|
||||
};
|
||||
|
||||
#endif /* ASPEED_SOC_H */
|
||||
|
||||
@@ -46,17 +46,14 @@ typedef struct {
|
||||
bool indirect;
|
||||
uint16_t entry_sz;
|
||||
uint32_t page_sz;
|
||||
uint32_t max_entries;
|
||||
union {
|
||||
uint32_t max_devids;
|
||||
uint32_t max_collids;
|
||||
} maxids;
|
||||
uint32_t num_entries;
|
||||
uint32_t num_ids;
|
||||
uint64_t base_addr;
|
||||
} TableDesc;
|
||||
|
||||
typedef struct {
|
||||
bool valid;
|
||||
uint32_t max_entries;
|
||||
uint32_t num_entries;
|
||||
uint64_t base_addr;
|
||||
} CmdQDesc;
|
||||
|
||||
|
||||
@@ -6964,18 +6964,42 @@ static const ARMCPRegInfo tlbios_reginfo[] = {
|
||||
.opc0 = 1, .opc1 = 0, .crn = 8, .crm = 1, .opc2 = 0,
|
||||
.access = PL1_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_vmalle1is_write },
|
||||
{ .name = "TLBI_VAE1OS", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 8, .crm = 1, .opc2 = 1,
|
||||
.access = PL1_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_vae1is_write },
|
||||
{ .name = "TLBI_ASIDE1OS", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 8, .crm = 1, .opc2 = 2,
|
||||
.access = PL1_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_vmalle1is_write },
|
||||
{ .name = "TLBI_VAAE1OS", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 8, .crm = 1, .opc2 = 3,
|
||||
.access = PL1_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_vae1is_write },
|
||||
{ .name = "TLBI_VALE1OS", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 8, .crm = 1, .opc2 = 5,
|
||||
.access = PL1_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_vae1is_write },
|
||||
{ .name = "TLBI_VAALE1OS", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 0, .crn = 8, .crm = 1, .opc2 = 7,
|
||||
.access = PL1_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_vae1is_write },
|
||||
{ .name = "TLBI_ALLE2OS", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 4, .crn = 8, .crm = 1, .opc2 = 0,
|
||||
.access = PL2_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_alle2is_write },
|
||||
{ .name = "TLBI_VAE2OS", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 4, .crn = 8, .crm = 1, .opc2 = 1,
|
||||
.access = PL2_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_vae2is_write },
|
||||
{ .name = "TLBI_ALLE1OS", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 4, .crn = 8, .crm = 1, .opc2 = 4,
|
||||
.access = PL2_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_alle1is_write },
|
||||
{ .name = "TLBI_VALE2OS", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 4, .crn = 8, .crm = 1, .opc2 = 5,
|
||||
.access = PL2_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_vae2is_write },
|
||||
{ .name = "TLBI_VMALLS12E1OS", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 4, .crn = 8, .crm = 1, .opc2 = 6,
|
||||
.access = PL2_W, .type = ARM_CP_NO_RAW,
|
||||
@@ -6996,6 +7020,14 @@ static const ARMCPRegInfo tlbios_reginfo[] = {
|
||||
.opc0 = 1, .opc1 = 6, .crn = 8, .crm = 1, .opc2 = 0,
|
||||
.access = PL3_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_alle3is_write },
|
||||
{ .name = "TLBI_VAE3OS", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 6, .crn = 8, .crm = 1, .opc2 = 1,
|
||||
.access = PL3_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_vae3is_write },
|
||||
{ .name = "TLBI_VALE3OS", .state = ARM_CP_STATE_AA64,
|
||||
.opc0 = 1, .opc1 = 6, .crn = 8, .crm = 1, .opc2 = 5,
|
||||
.access = PL3_W, .type = ARM_CP_NO_RAW,
|
||||
.writefn = tlbi_aa64_vae3is_write },
|
||||
REGINFO_SENTINEL
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user