Skip to content

Commit bfe3edd

Browse files
Michael ScottMaureenHelm
authored andcommitted
arm: soc: nxp k6x: mpu: add Bus Master 3 User Mode access bits
Ethernet on K64F is connected via Logical Bus Master 3. Section 19.3.8 of K64F reference manual establishes bits 20-18 (M3UM) on page 427 as "Bus Master 3 User Mode Access Control". To fix RWX user mode access via Bus Master 3 when MPU is enabled, we need to add these bits to the MPU region descriptors. This fixes ETH0 on K64F when MPU is enabled. Fix recommended by Maureen Helm <[email protected]> Signed-off-by: Michael Scott <[email protected]>
1 parent 9cb09e2 commit bfe3edd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

include/arch/arm/cortex_m/mpu/nxp_mpu.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#define BM0_UM_SHIFT 0
2222
#define BM1_UM_SHIFT 6
2323
#define BM2_UM_SHIFT 12
24+
#define BM3_UM_SHIFT 18
2425

2526
/* Bus Master Supervisor Mode Access */
2627
#define SM_RWX_ALLOW 0
@@ -36,17 +37,20 @@
3637
/* Read Attribute */
3738
#define MPU_REGION_READ ((UM_READ << BM0_UM_SHIFT) | \
3839
(UM_READ << BM1_UM_SHIFT) | \
39-
(UM_READ << BM2_UM_SHIFT))
40+
(UM_READ << BM2_UM_SHIFT) | \
41+
(UM_READ << BM3_UM_SHIFT))
4042

4143
/* Write Attribute */
4244
#define MPU_REGION_WRITE ((UM_WRITE << BM0_UM_SHIFT) | \
4345
(UM_WRITE << BM1_UM_SHIFT) | \
44-
(UM_WRITE << BM2_UM_SHIFT))
46+
(UM_WRITE << BM2_UM_SHIFT) | \
47+
(UM_WRITE << BM3_UM_SHIFT))
4548

4649
/* Execute Attribute */
4750
#define MPU_REGION_EXEC ((UM_EXEC << BM0_UM_SHIFT) | \
4851
(UM_EXEC << BM1_UM_SHIFT) | \
49-
(UM_EXEC << BM2_UM_SHIFT))
52+
(UM_EXEC << BM2_UM_SHIFT) | \
53+
(UM_EXEC << BM3_UM_SHIFT))
5054

5155
/* Super User Attributes */
5256
#define MPU_REGION_SU ((SM_SAME_AS_UM << BM0_SM_SHIFT) | \

0 commit comments

Comments
 (0)