armv8-m/mpu.h: add macro to configure shared memory region

This commit is contained in:
raiden00pl 2023-08-22 11:00:20 +02:00 committed by Xiang Xiao
parent a37d094f31
commit 3da199c71d
1 changed files with 19 additions and 0 deletions

View File

@ -351,6 +351,25 @@ void mpu_configure_region(uintptr_t base, size_t size,
MPU_RLAR_PXN); \ MPU_RLAR_PXN); \
} while (0) } while (0)
/****************************************************************************
* Name: mpu_priv_shmem
*
* Description:
* Configure a region as privileged shared memory
*
****************************************************************************/
#define mpu_priv_shmem(base, size) \
do \
{ \
/* The configure the region */ \
mpu_configure_region(base, size, \
MPU_RBAR_AP_RWNO, \
MPU_RLAR_NONCACHEABLE | \
MPU_RBAR_SH_INNER | \
MPU_RLAR_PXN); \
} while (0)
/**************************************************************************** /****************************************************************************
* Name: mpu_user_extsram * Name: mpu_user_extsram
* *