Commit Graph

8 Commits

Author SHA1 Message Date
Anup Patel 5148499e03 Fix plic warm init in common code.
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>
2018-12-21 22:11:10 -08:00
Atish Patra 95fbe7d495 Move hardcoded uart constant to macros.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
2018-12-21 16:00:28 -08:00
Damien Le Moal 27332e63fa Introduce HAS_MFAULTS_DELEGATION feature
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>
2018-12-21 16:32:30 +05:30
Anup Patel db6c1fe78b platform: kendryte/k210: Don't include math.h
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>
2018-12-21 15:32:28 +05:30
Damien Le Moal 07ee5f2e32 Kendryte-k210: Remove unnecessary asm functions
Use functions defined in sbi/riscv_asm.h.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
2018-12-21 17:20:56 +09:00
Damien Le Moal 745ae45e65 Update Kendryte k210 support
Booting now.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
2018-12-21 15:12:22 +09:00
Damien Le Moal aa68f0252f Refine platform features control
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>
2018-12-21 15:09:13 +09:00
Anup Patel 089f70a179 top: Rename "plat" to "platform" everywhere
This patch renames "plat" to "platform" everywhere for better
readablility.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
2018-12-21 10:35:04 +05:30