diff options
| author | Damien Le Moal <[email protected]> | 2018-12-21 09:13:37 +0900 |
|---|---|---|
| committer | Damien Le Moal <[email protected]> | 2018-12-21 15:09:13 +0900 |
| commit | aa68f0252f2a0749dee35bda309c397f79ae26a0 (patch) | |
| tree | 1edc7262e0c70f0a391abbc4c009e42f8a303aad /platform | |
| parent | f003787455709a1a6c69c1b6ab6a02d4d767c325 (diff) | |
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 <[email protected]>
Diffstat (limited to 'platform')
| -rw-r--r-- | platform/qemu/sifive_u/platform.c | 2 | ||||
| -rw-r--r-- | platform/qemu/virt/platform.c | 2 | ||||
| -rw-r--r-- | platform/sifive/hifive_u540/platform.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/platform/qemu/sifive_u/platform.c b/platform/qemu/sifive_u/platform.c index a4a401ec..d9168255 100644 --- a/platform/qemu/sifive_u/platform.c +++ b/platform/qemu/sifive_u/platform.c @@ -88,7 +88,7 @@ static int sifive_u_system_down(u32 type) struct sbi_platform platform = { .name = STRINGIFY(PLAT_NAME), - .features = SBI_PLATFORM_HAS_MMIO_TIMER_VALUE, + .features = SBI_PLATFORM_DEFAULT_FEATURES, .hart_count = PLAT_HART_COUNT, .hart_stack_size = PLAT_HART_STACK_SIZE, .pmp_region_count = sifive_u_pmp_region_count, diff --git a/platform/qemu/virt/platform.c b/platform/qemu/virt/platform.c index e59cdfd1..fe91fc8f 100644 --- a/platform/qemu/virt/platform.c +++ b/platform/qemu/virt/platform.c @@ -86,7 +86,7 @@ static int virt_system_down(u32 type) struct sbi_platform platform = { .name = STRINGIFY(PLAT_NAME), - .features = SBI_PLATFORM_HAS_MMIO_TIMER_VALUE, + .features = SBI_PLATFORM_DEFAULT_FEATURES, .hart_count = PLAT_HART_COUNT, .hart_stack_size = PLAT_HART_STACK_SIZE, .pmp_region_count = virt_pmp_region_count, diff --git a/platform/sifive/hifive_u540/platform.c b/platform/sifive/hifive_u540/platform.c index 5b1c989f..46613e60 100644 --- a/platform/sifive/hifive_u540/platform.c +++ b/platform/sifive/hifive_u540/platform.c @@ -105,7 +105,7 @@ static int sifive_u_system_down(u32 type) struct sbi_platform platform = { .name = STRINGIFY(PLAT_NAME), - .features = SBI_PLATFORM_HAS_MMIO_TIMER_VALUE, + .features = SBI_PLATFORM_DEFAULT_FEATURES; .hart_count = PLAT_HART_COUNT, .hart_stack_size = PLAT_HART_STACK_SIZE, .pmp_region_count = sifive_u_pmp_region_count, |
