mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
target/riscv: Implement SGEIP bit in hip and hie CSRs
A hypervisor can optionally take guest external interrupts using SGEIP bit of hip and hie CSRs. Signed-off-by: Anup Patel <anup.patel@wdc.com> Signed-off-by: Anup Patel <anup@brainfault.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Frank Chang <frank.chang@sifive.com> Message-id: 20220204174700.534953-3-anup@brainfault.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
dceecac8a2
commit
881df35d3d
3 changed files with 16 additions and 8 deletions
|
@ -434,6 +434,7 @@ static void riscv_cpu_reset(DeviceState *dev)
|
|||
}
|
||||
}
|
||||
env->mcause = 0;
|
||||
env->miclaim = MIP_SGEIP;
|
||||
env->pc = env->resetvec;
|
||||
env->two_stage_lookup = false;
|
||||
/* mmte is supposed to have pm.current hardwired to 1 */
|
||||
|
@ -695,7 +696,7 @@ static void riscv_cpu_init(Object *obj)
|
|||
cpu_set_cpustate_pointers(cpu);
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
qdev_init_gpio_in(DEVICE(cpu), riscv_cpu_set_irq, 12);
|
||||
qdev_init_gpio_in(DEVICE(cpu), riscv_cpu_set_irq, IRQ_LOCAL_MAX);
|
||||
#endif /* CONFIG_USER_ONLY */
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue