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

This commit is contained in:
raiden00pl 2023-08-22 11:06:58 +02:00 committed by Xiang Xiao
parent 3da199c71d
commit 7b82a1ac9c

View File

@ -380,6 +380,27 @@ void mpu_configure_region(uintptr_t base, size_t size,
/* Instruction access */); \
} 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_RASR_TEX_SO | /* Ordered */ \
/* Not Cacheable */ \
MPU_RASR_B | /* Bufferable */ \
MPU_RASR_S | /* Shareable */ \
MPU_RASR_AP_RWNO | /* P:RW U:None */ \
MPU_RASR_XN /* No Instruction access */); \
} while (0)
/****************************************************************************
* Name: mpu_user_extsram
*