PMP tests do not compile when PMP grain is greater than 9
For PMP tests the PMP grain is used with:
#define g (1 << (RVMODEL_PMP_GRAIN + 2))
The macro g is used in several places as argument to addi instruction. When Grain is greater than 9 the instruction cannot be encoded.
To Reproduce
Set RVMODEL_PMP_GRAIN greater than 9
Ex. in rvtest_config.h
#define RVMODEL_PMP_GRAIN 12
run make for the test config
error: PMPSm/pmpsm_misaligned_tor.S:182: Error: illegal operands `addi x5,x4,(1<<(12+2))
This is widespread throughout PMP tests and should be reviewed for correctness both in loading the corrected grain and use for tests.
PMP tests do not compile when PMP grain is greater than 9
For PMP tests the PMP grain is used with:
#define g (1 << (RVMODEL_PMP_GRAIN + 2))
The macro g is used in several places as argument to addi instruction. When Grain is greater than 9 the instruction cannot be encoded.
To Reproduce
Set RVMODEL_PMP_GRAIN greater than 9
Ex. in rvtest_config.h
#define RVMODEL_PMP_GRAIN 12
run make for the test config
error: PMPSm/pmpsm_misaligned_tor.S:182: Error: illegal operands `addi x5,x4,(1<<(12+2))
This is widespread throughout PMP tests and should be reviewed for correctness both in loading the corrected grain and use for tests.