lib: pmp_set/pmp_get moved errors from runtime to compile time
authorXiang W <wxjstz@126.com>
Tue, 15 Mar 2022 16:22:38 +0000 (00:22 +0800)
committerAnup Patel <anup@brainfault.org>
Sun, 27 Mar 2022 03:22:19 +0000 (08:52 +0530)
commit2dfbd3c0e226c21b978e0a5a1c58893ee6679d15
treef7cca3eeac48dc6744572a37c365d1c725bd262c
parent4998a712b2ab504eff306110879ee05af6050177
lib: pmp_set/pmp_get moved errors from runtime to compile time

pmp_set/pmp_get calculates the location of the CSR register separately
through conditional compilation. In the case of non-32-bit and 64-bit,
we can report an error directly through #error without putting it at
runtime

Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/sbi/riscv_asm.c