diff options
author | Atish Patra <atish.patra@wdc.com> | 2020-05-10 02:47:28 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-05-10 07:35:41 +0300 |
commit | b2df751acfd2858f2370d896f91543593647b243 (patch) | |
tree | 75bb454392222a4686dbf12191ce3831738662d6 /platform | |
parent | 6a053f6e6cb4db8a291239e882e9a778c2738e0a (diff) | |
download | opensbi-b2df751acfd2858f2370d896f91543593647b243.tar.xz |
platform: Move platform features to hart
PMP & performance counters belong to a hart rather than a platform.
In addition to that, these features enable reading/writing from a
particular csr. Thus, they can be detected and set at runtime rather
than compile time.
Move PMP/MCOUNTEREN/SCOUNTEREN features to hart and detect them at runtime.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Tested-by: Jonathan Balkind <jbalkind@cs.princeton.edu>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'platform')
-rw-r--r-- | platform/fpga/ariane/platform.c | 2 | ||||
-rw-r--r-- | platform/fpga/openpiton/platform.c | 2 | ||||
-rw-r--r-- | platform/thead/c910/platform.h | 4 |
3 files changed, 1 insertions, 7 deletions
diff --git a/platform/fpga/ariane/platform.c b/platform/fpga/ariane/platform.c index 7c76ff8..ad64c74 100644 --- a/platform/fpga/ariane/platform.c +++ b/platform/fpga/ariane/platform.c @@ -28,8 +28,6 @@ #define SBI_ARIANE_FEATURES \ (SBI_PLATFORM_HAS_TIMER_VALUE | \ - SBI_PLATFORM_HAS_SCOUNTEREN | \ - SBI_PLATFORM_HAS_MCOUNTEREN | \ SBI_PLATFORM_HAS_MFAULTS_DELEGATION) /* diff --git a/platform/fpga/openpiton/platform.c b/platform/fpga/openpiton/platform.c index c549a95..89512e1 100644 --- a/platform/fpga/openpiton/platform.c +++ b/platform/fpga/openpiton/platform.c @@ -28,8 +28,6 @@ #define SBI_OPENPITON_FEATURES \ (SBI_PLATFORM_HAS_TIMER_VALUE | \ - SBI_PLATFORM_HAS_SCOUNTEREN | \ - SBI_PLATFORM_HAS_MCOUNTEREN | \ SBI_PLATFORM_HAS_MFAULTS_DELEGATION) static struct platform_uart_data uart = { diff --git a/platform/thead/c910/platform.h b/platform/thead/c910/platform.h index 0faf2af..354404e 100644 --- a/platform/thead/c910/platform.h +++ b/platform/thead/c910/platform.h @@ -8,9 +8,7 @@ #define C910_HART_COUNT 16 #define SBI_THEAD_FEATURES \ - (SBI_PLATFORM_HAS_SCOUNTEREN | \ - SBI_PLATFORM_HAS_MCOUNTEREN | \ - SBI_PLATFORM_HAS_MFAULTS_DELEGATION | \ + (SBI_PLATFORM_HAS_MFAULTS_DELEGATION | \ SBI_PLATFORM_HAS_HART_SECONDARY_BOOT) #define CSR_MCOR 0x7c2 |