target/riscv/cpu.c: redesign register_cpu_props()
commitdd8f244f353391952a1e1147afad92dc78fb97ed
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>
Thu, 6 Apr 2023 18:03:51 +0000 (6 15:03 -0300)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 5 May 2023 00:49:50 +0000 (5 10:49 +1000)
tree9a581fab8363fd67983dffc541eb27fdeff68994
parent4f13abcb2bcba47692cc3a171fda61dc46fc89be
target/riscv/cpu.c: redesign register_cpu_props()

The function is now a no-op for all cpu_init() callers that are setting
a non-zero misa value in set_misa(), since it's no longer used to sync
cpu->cfg props with env->misa_ext bits. Remove it in those cases.

While we're at it, rename the function to match what it's actually
doing: create user properties to set/remove CPU extensions. Make a note
that it will overwrite env->misa_ext with the defaults set by each user
property.

Update the MISA bits comment in cpu.h as well.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230406180351.570807-21-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu.c
target/riscv/cpu.h