Commit Graph

5 Commits

Author SHA1 Message Date
Damien Le Moal 5563a03354 Introduce sbi_current_hartid()
Use this helper instead of hardcoding csr_read(mhartid).

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
2018-12-21 17:06:59 +09:00
Damien Le Moal 426adf9f60 Cleanup and rename sbi_hart_boot_next()
Cleanup sbi_hart_boot_nexti() code, adding messages for clarity and
rename the function to sbi_hart_switch_mode() to reflect what the
function actually does.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
2018-12-21 16:44:53 +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
Atish Patra 84971c0bc0 Use wfi for coldboot finish call.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
2018-12-20 15:55:27 -08:00
Anup Patel 9e8ff05cb6 Initial commit.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
2018-12-11 19:24:06 +05:30