mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 14:24:02 +08:00
hw/opentitan: Update the interrupt layout
Update the OpenTitan interrupt layout to match the latest OpenTitan bitstreams. This involves changing the Ibex PLIC memory layout and the UART interrupts. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Message-id: e92b696f1809c9fa4410da2e9f23c414db5a6960.1617202791.git.alistair.francis@wdc.com
This commit is contained in:
parent
ab2c91286c
commit
d4cad54499
@ -225,23 +225,23 @@ static void ibex_plic_irq_request(void *opaque, int irq, int level)
|
||||
|
||||
static Property ibex_plic_properties[] = {
|
||||
DEFINE_PROP_UINT32("num-cpus", IbexPlicState, num_cpus, 1),
|
||||
DEFINE_PROP_UINT32("num-sources", IbexPlicState, num_sources, 80),
|
||||
DEFINE_PROP_UINT32("num-sources", IbexPlicState, num_sources, 176),
|
||||
|
||||
DEFINE_PROP_UINT32("pending-base", IbexPlicState, pending_base, 0),
|
||||
DEFINE_PROP_UINT32("pending-num", IbexPlicState, pending_num, 3),
|
||||
DEFINE_PROP_UINT32("pending-num", IbexPlicState, pending_num, 6),
|
||||
|
||||
DEFINE_PROP_UINT32("source-base", IbexPlicState, source_base, 0x0c),
|
||||
DEFINE_PROP_UINT32("source-num", IbexPlicState, source_num, 3),
|
||||
DEFINE_PROP_UINT32("source-base", IbexPlicState, source_base, 0x18),
|
||||
DEFINE_PROP_UINT32("source-num", IbexPlicState, source_num, 6),
|
||||
|
||||
DEFINE_PROP_UINT32("priority-base", IbexPlicState, priority_base, 0x18),
|
||||
DEFINE_PROP_UINT32("priority-num", IbexPlicState, priority_num, 80),
|
||||
DEFINE_PROP_UINT32("priority-base", IbexPlicState, priority_base, 0x30),
|
||||
DEFINE_PROP_UINT32("priority-num", IbexPlicState, priority_num, 177),
|
||||
|
||||
DEFINE_PROP_UINT32("enable-base", IbexPlicState, enable_base, 0x200),
|
||||
DEFINE_PROP_UINT32("enable-num", IbexPlicState, enable_num, 3),
|
||||
DEFINE_PROP_UINT32("enable-base", IbexPlicState, enable_base, 0x300),
|
||||
DEFINE_PROP_UINT32("enable-num", IbexPlicState, enable_num, 6),
|
||||
|
||||
DEFINE_PROP_UINT32("threshold-base", IbexPlicState, threshold_base, 0x20c),
|
||||
DEFINE_PROP_UINT32("threshold-base", IbexPlicState, threshold_base, 0x318),
|
||||
|
||||
DEFINE_PROP_UINT32("claim-base", IbexPlicState, claim_base, 0x210),
|
||||
DEFINE_PROP_UINT32("claim-base", IbexPlicState, claim_base, 0x31c),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
|
@ -148,16 +148,16 @@ static void lowrisc_ibex_soc_realize(DeviceState *dev_soc, Error **errp)
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(&s->uart), 0, memmap[IBEX_DEV_UART].base);
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(&s->uart),
|
||||
0, qdev_get_gpio_in(DEVICE(&s->plic),
|
||||
IBEX_UART_TX_WATERMARK_IRQ));
|
||||
IBEX_UART0_TX_WATERMARK_IRQ));
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(&s->uart),
|
||||
1, qdev_get_gpio_in(DEVICE(&s->plic),
|
||||
IBEX_UART_RX_WATERMARK_IRQ));
|
||||
IBEX_UART0_RX_WATERMARK_IRQ));
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(&s->uart),
|
||||
2, qdev_get_gpio_in(DEVICE(&s->plic),
|
||||
IBEX_UART_TX_EMPTY_IRQ));
|
||||
IBEX_UART0_TX_EMPTY_IRQ));
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(&s->uart),
|
||||
3, qdev_get_gpio_in(DEVICE(&s->plic),
|
||||
IBEX_UART_RX_OVERFLOW_IRQ));
|
||||
IBEX_UART0_RX_OVERFLOW_IRQ));
|
||||
|
||||
create_unimplemented_device("riscv.lowrisc.ibex.gpio",
|
||||
memmap[IBEX_DEV_GPIO].base, memmap[IBEX_DEV_GPIO].size);
|
||||
|
@ -82,14 +82,14 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
IBEX_UART_RX_PARITY_ERR_IRQ = 0x28,
|
||||
IBEX_UART_RX_TIMEOUT_IRQ = 0x27,
|
||||
IBEX_UART_RX_BREAK_ERR_IRQ = 0x26,
|
||||
IBEX_UART_RX_FRAME_ERR_IRQ = 0x25,
|
||||
IBEX_UART_RX_OVERFLOW_IRQ = 0x24,
|
||||
IBEX_UART_TX_EMPTY_IRQ = 0x23,
|
||||
IBEX_UART_RX_WATERMARK_IRQ = 0x22,
|
||||
IBEX_UART_TX_WATERMARK_IRQ = 0x21,
|
||||
IBEX_UART0_RX_PARITY_ERR_IRQ = 8,
|
||||
IBEX_UART0_RX_TIMEOUT_IRQ = 7,
|
||||
IBEX_UART0_RX_BREAK_ERR_IRQ = 6,
|
||||
IBEX_UART0_RX_FRAME_ERR_IRQ = 5,
|
||||
IBEX_UART0_RX_OVERFLOW_IRQ = 4,
|
||||
IBEX_UART0_TX_EMPTY_IRQ = 3,
|
||||
IBEX_UART0_RX_WATERMARK_IRQ = 2,
|
||||
IBEX_UART0_TX_WATERMARK_IRQ = 1,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user