Unleashed doesn't have S mode for hart 0.
PLIC register base calculation is current wrong because of that.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Conditionnally delegate page fault exceptions from M mode to S mode
based on the platform features.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
The math.h is not required anymore and it also gives
compile error for certain toolchains hence thsi patch
removes math.h include from kendryte/k210/sysctl.c.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Allow a platform to report its supported features in more details.
The new features defined are:
* SBI_PLATFORM_HAS_PMP
* SBI_PLATFORM_HAS_SCOUNTEREN
* SBI_PLATFORM_HAS_MCOUNTEREN
In addition, define the macro SBI_PLATFORM_DEFAULT_FEATURES as the set
of features that are generally expected to be supported by a Linux
capable platform.
Operations touching the features controlled with these falgs are not
executed if the platform does not set the corresponding feature flags.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>