platform: Move platform features to hart
authorAtish Patra <atish.patra@wdc.com>
Sat, 9 May 2020 23:47:28 +0000 (16:47 -0700)
committerAnup Patel <anup@brainfault.org>
Sun, 10 May 2020 04:35:41 +0000 (10:05 +0530)
commitb2df751acfd2858f2370d896f91543593647b243
tree75bb454392222a4686dbf12191ce3831738662d6
parent6a053f6e6cb4db8a291239e882e9a778c2738e0a
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>
include/sbi/sbi_hart.h
include/sbi/sbi_platform.h
lib/sbi/sbi_hart.c
lib/utils/fdt/fdt_fixup.c
platform/fpga/ariane/platform.c
platform/fpga/openpiton/platform.c
platform/thead/c910/platform.h