mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target/riscv: Implement hgeie and hgeip CSRs
The hgeie and hgeip CSRs are required for emulating an external interrupt controller capable of injecting virtual external interrupt to Guest/VM running at VS-level. 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-4-anup@brainfault.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
881df35d3d
commit
cd032fe75c
6 changed files with 121 additions and 38 deletions
|
@ -161,6 +161,7 @@ struct CPURISCVState {
|
|||
target_ulong priv;
|
||||
/* This contains QEMU specific information about the virt state. */
|
||||
target_ulong virt;
|
||||
target_ulong geilen;
|
||||
target_ulong resetvec;
|
||||
|
||||
target_ulong mhartid;
|
||||
|
@ -198,6 +199,8 @@ struct CPURISCVState {
|
|||
target_ulong htval;
|
||||
target_ulong htinst;
|
||||
target_ulong hgatp;
|
||||
target_ulong hgeie;
|
||||
target_ulong hgeip;
|
||||
uint64_t htimedelta;
|
||||
|
||||
/* Upper 64-bits of 128-bit CSRs */
|
||||
|
@ -391,6 +394,8 @@ int riscv_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs,
|
|||
int riscv_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
|
||||
int riscv_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
|
||||
bool riscv_cpu_fp_enabled(CPURISCVState *env);
|
||||
target_ulong riscv_cpu_get_geilen(CPURISCVState *env);
|
||||
void riscv_cpu_set_geilen(CPURISCVState *env, target_ulong geilen);
|
||||
bool riscv_cpu_vector_enabled(CPURISCVState *env);
|
||||
bool riscv_cpu_virt_enabled(CPURISCVState *env);
|
||||
void riscv_cpu_set_virt_enabled(CPURISCVState *env, bool enable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue