platform: generic: andes: Add support for RV32 to set up PMA
authorBen Zong-You Xie <ben717@andestech.com>
Fri, 31 May 2024 05:21:08 +0000 (13:21 +0800)
committerAnup Patel <anup@brainfault.org>
Tue, 18 Jun 2024 10:49:47 +0000 (16:19 +0530)
commit52dcf351cddf12081acc921c135df265f9d2f243
treebf74c6a2359b0eed52298859fd61286592ba1212
parentf09f16430ae7b3543616a38df4411fea8f026759
platform: generic: andes: Add support for RV32 to set up PMA

Like PMP, the behaviors to configure PMA will be different from
RV64 and RV32. RV64 uses two Andes custom CSRs, pmacfg0 and pmacfg2,
but RV32 uses four Andes custom CSRs, pmacfg0 ~ pmacfg3. This patch
adds support to PMA for RV32.

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
platform/generic/andes/andes_pma.c