diff options
author | York Sun <york.sun@nxp.com> | 2017-03-06 17:02:33 (GMT) |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2017-03-14 15:44:03 (GMT) |
commit | 7f9b9f318ff152bd8d2e8b573708e2bdc088c1b1 (patch) | |
tree | 1e68c347794e41aff62d8ea9091d88d05c269d6e /arch/arm/include/asm/armv8 | |
parent | f539c8a4a7a590e1933a7e21d5771528db1d88b7 (diff) | |
download | u-boot-7f9b9f318ff152bd8d2e8b573708e2bdc088c1b1.tar.xz |
armv8: mmu: Add a function to change mapping attributes
Function mmu_change_region_attr() is added to change existing mapping
with updated PXN, UXN and memory type. This is a break-before-make
process during which the mapping becomes fault (invalid) before final
attributres are set.
Signed-off-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'arch/arm/include/asm/armv8')
-rw-r--r-- | arch/arm/include/asm/armv8/mmu.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/include/asm/armv8/mmu.h b/arch/arm/include/asm/armv8/mmu.h index e9b4cdb..a349903 100644 --- a/arch/arm/include/asm/armv8/mmu.h +++ b/arch/arm/include/asm/armv8/mmu.h @@ -53,6 +53,7 @@ #define PTE_TYPE_FAULT (0 << 0) #define PTE_TYPE_TABLE (3 << 0) #define PTE_TYPE_BLOCK (1 << 0) +#define PTE_TYPE_VALID (1 << 0) #define PTE_TABLE_PXN (1UL << 59) #define PTE_TABLE_XN (1UL << 60) @@ -77,6 +78,10 @@ */ #define PMD_ATTRINDX(t) ((t) << 2) #define PMD_ATTRINDX_MASK (7 << 2) +#define PMD_ATTRMASK (PTE_BLOCK_PXN | \ + PTE_BLOCK_UXN | \ + PMD_ATTRINDX_MASK | \ + PTE_TYPE_VALID) /* * TCR flags. |