uint64_t irq_count[32];
#endif
qemu_irq cpu_irqs[MAX_CPUS][MAX_PILS];
- const uint32_t *intbit_to_level;
uint32_t cputimer_lbit, cputimer_mbit;
uint32_t cputimer_bit;
uint32_t pil_out[MAX_CPUS];
#endif
}
+static const uint32_t intbit_to_level[] = {
+ 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12,
+ 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0,
+};
+
static void slavio_check_interrupts(SLAVIO_INTCTLState *s, int set_irqs)
{
uint32_t pending = s->intregm_pending, pil_pending;
(i == s->target_cpu)) {
for (j = 0; j < 32; j++) {
if (pending & (1 << j))
- pil_pending |= 1 << s->intbit_to_level[j];
+ pil_pending |= 1 << intbit_to_level[j];
}
}
pil_pending |= (s->slaves[i].intreg_pending & CPU_SOFTIRQ_MASK) >> 16;
{
SLAVIO_INTCTLState *s = opaque;
uint32_t mask = 1 << irq;
- uint32_t pil = s->intbit_to_level[irq];
+ uint32_t pil = intbit_to_level[irq];
DPRINTF("Set cpu %d irq %d -> pil %d level %d\n", s->target_cpu, irq, pil,
level);
slavio_intctlm_mem_write, s);
sysbus_init_mmio(dev, INTCTLM_SIZE, io_memory);
s->cputimer_mbit = 1 << s->cputimer_bit;
- s->cputimer_lbit = 1 << s->intbit_to_level[s->cputimer_bit];
+ s->cputimer_lbit = 1 << intbit_to_level[s->cputimer_bit];
for (i = 0; i < MAX_CPUS; i++) {
for (j = 0; j < MAX_PILS; j++) {
.qdev.size = sizeof(SLAVIO_INTCTLState),
.qdev.props = (Property[]) {
{
- .name = "intbit_to_level",
- .info = &qdev_prop_ptr,
- .offset = offsetof(SLAVIO_INTCTLState, intbit_to_level),
- },
- {
.name = "cputimer_bit",
.info = &qdev_prop_uint32,
.offset = offsetof(SLAVIO_INTCTLState, cputimer_bit),
uint8_t nvram_machine_id;
uint16_t machine_id;
uint32_t iommu_version;
- uint32_t intbit_to_level[32];
uint64_t max_mem;
const char * const default_cpu_model;
};
uint8_t nvram_machine_id;
uint16_t machine_id;
uint32_t iommu_version;
- uint32_t intbit_to_level[32];
uint64_t max_mem;
const char * const default_cpu_model;
};
static DeviceState *slavio_intctl_init(target_phys_addr_t addr,
target_phys_addr_t addrg,
- const uint32_t *intbit_to_level,
qemu_irq **parent_irq,
unsigned int cputimer)
{
unsigned int i, j;
dev = qdev_create(NULL, "slavio_intctl");
- qdev_prop_set_ptr(dev, "intbit_to_level", (void *)intbit_to_level);
qdev_prop_set_uint32(dev, "cputimer_bit", cputimer);
qdev_init(dev);
dev = slavio_intctl_init(hwdef->intctl_base,
hwdef->intctl_base + 0x10000ULL,
- &hwdef->intbit_to_level[0],
cpu_irqs,
hwdef->clock_irq);
.nvram_machine_id = 0x80,
.machine_id = ss5_id,
.iommu_version = 0x05000000,
- .intbit_to_level = {
- 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12,
- 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0,
- },
.max_mem = 0x10000000,
.default_cpu_model = "Fujitsu MB86904",
},
.nvram_machine_id = 0x72,
.machine_id = ss10_id,
.iommu_version = 0x03000000,
- .intbit_to_level = {
- 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12,
- 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0,
- },
.max_mem = 0xf00000000ULL,
.default_cpu_model = "TI SuperSparc II",
},
.nvram_machine_id = 0x71,
.machine_id = ss600mp_id,
.iommu_version = 0x01000000,
- .intbit_to_level = {
- 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12,
- 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0,
- },
.max_mem = 0xf00000000ULL,
.default_cpu_model = "TI SuperSparc II",
},
.nvram_machine_id = 0x72,
.machine_id = ss20_id,
.iommu_version = 0x13000000,
- .intbit_to_level = {
- 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12,
- 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0,
- },
.max_mem = 0xf00000000ULL,
.default_cpu_model = "TI SuperSparc II",
},
.nvram_machine_id = 0x80,
.machine_id = vger_id,
.iommu_version = 0x05000000,
- .intbit_to_level = {
- 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12,
- 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0,
- },
.max_mem = 0x10000000,
.default_cpu_model = "Fujitsu MB86904",
},
.nvram_machine_id = 0x80,
.machine_id = lx_id,
.iommu_version = 0x04000000,
- .intbit_to_level = {
- 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12,
- 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0,
- },
.max_mem = 0x10000000,
.default_cpu_model = "TI MicroSparc I",
},
.nvram_machine_id = 0x80,
.machine_id = ss4_id,
.iommu_version = 0x05000000,
- .intbit_to_level = {
- 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12,
- 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0,
- },
.max_mem = 0x10000000,
.default_cpu_model = "Fujitsu MB86904",
},
.nvram_machine_id = 0x80,
.machine_id = scls_id,
.iommu_version = 0x05000000,
- .intbit_to_level = {
- 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12,
- 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0,
- },
.max_mem = 0x10000000,
.default_cpu_model = "TI MicroSparc I",
},
.nvram_machine_id = 0x80,
.machine_id = sbook_id,
.iommu_version = 0x05000000,
- .intbit_to_level = {
- 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12,
- 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0,
- },
.max_mem = 0x10000000,
.default_cpu_model = "TI MicroSparc I",
},