mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
RISC-V: Add misa runtime write support
This patch adds support for writing misa. misa is validated based on rules in the ISA specification. 'E' is mutually exclusive with all other extensions. 'D' depends on 'F' so 'D' bit is dropped if 'F' is not present. A conservative approach to consistency is taken by flushing the translation cache on misa writes. misa_mask is added to the CPU struct to store the original set of extensions. Signed-off-by: Michael Clark <mjc@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Palmer Dabbelt <palmer@sifive.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
parent
d77c3401e6
commit
f18637cd61
4 changed files with 68 additions and 3 deletions
|
@ -88,7 +88,7 @@ typedef struct RISCVCPUInfo {
|
|||
|
||||
static void set_misa(CPURISCVState *env, target_ulong misa)
|
||||
{
|
||||
env->misa = misa;
|
||||
env->misa_mask = env->misa = misa;
|
||||
}
|
||||
|
||||
static void set_versions(CPURISCVState *env, int user_ver, int priv_ver)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue