CSR_MCOUNTEREN should not exist if U-mode is not supported
Change-Id: I1a2420fb88bd3ee37f6a539992e8dc119fdd6e0e
This commit is contained in:
parent
9c3a4b458c
commit
5845f3b71c
|
@ -5193,6 +5193,9 @@ int riscv_init_registers(struct target *target)
|
||||||
case CSR_VLENB:
|
case CSR_VLENB:
|
||||||
r->exist = (info->vlenb > 0);
|
r->exist = (info->vlenb > 0);
|
||||||
break;
|
break;
|
||||||
|
case CSR_MCOUNTEREN:
|
||||||
|
r->exist = riscv_supports_extension(target, 'U');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!r->exist && !list_empty(&info->expose_csr)) {
|
if (!r->exist && !list_empty(&info->expose_csr)) {
|
||||||
|
|
Loading…
Reference in New Issue