mirror of https://github.com/xemu-project/xemu.git
target/riscv: adding high part of some csrs
Adding the high part of a very minimal set of csr. Signed-off-by: Frédéric Pétrot <frederic.petrot@univ-grenoble-alpes.fr> Co-authored-by: Fabien Portas <fabien.portas@grenoble-inp.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20220106210108.138226-16-frederic.petrot@univ-grenoble-alpes.fr Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
b3a5d1fbeb
commit
2c64ab66c1
|
@ -195,6 +195,10 @@ struct CPURISCVState {
|
||||||
target_ulong hgatp;
|
target_ulong hgatp;
|
||||||
uint64_t htimedelta;
|
uint64_t htimedelta;
|
||||||
|
|
||||||
|
/* Upper 64-bits of 128-bit CSRs */
|
||||||
|
uint64_t mscratchh;
|
||||||
|
uint64_t sscratchh;
|
||||||
|
|
||||||
/* Virtual CSRs */
|
/* Virtual CSRs */
|
||||||
/*
|
/*
|
||||||
* For RV32 this is 32-bit vsstatus and 32-bit vsstatush.
|
* For RV32 this is 32-bit vsstatus and 32-bit vsstatush.
|
||||||
|
|
|
@ -179,6 +179,8 @@ static const VMStateDescription vmstate_rv128 = {
|
||||||
.needed = rv128_needed,
|
.needed = rv128_needed,
|
||||||
.fields = (VMStateField[]) {
|
.fields = (VMStateField[]) {
|
||||||
VMSTATE_UINTTL_ARRAY(env.gprh, RISCVCPU, 32),
|
VMSTATE_UINTTL_ARRAY(env.gprh, RISCVCPU, 32),
|
||||||
|
VMSTATE_UINT64(env.mscratchh, RISCVCPU),
|
||||||
|
VMSTATE_UINT64(env.sscratchh, RISCVCPU),
|
||||||
VMSTATE_END_OF_LIST()
|
VMSTATE_END_OF_LIST()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue