forked from Mirrors/opensbi
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
/*
|
||||
|
@@ -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 = {
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user