summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/armv8
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2023-03-17 19:22:51 +0300
committerTom Rini <trini@konsulko.com>2023-04-25 22:31:27 +0300
commit6cdf6b7a340db4ddd008516181de7e08e3f8c213 (patch)
tree74bd932309359be5b6dec15dcf822bafc75a0f97 /arch/arm/include/asm/armv8
parentbad2618b8c5c7e18dcfb9ff6a7d108e389d20cf7 (diff)
downloadu-boot-6cdf6b7a340db4ddd008516181de7e08e3f8c213.tar.xz
arm64: Use FEAT_HAFDBS to track dirty pages when available
Some recent arm64 cores have a facility that allows the page table walker to track the dirty state of a page. This makes it really efficient to perform CMOs by VA as we only need to look at dirty pages. Signed-off-by: Marc Zyngier <maz@kernel.org> [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Tom Rini <trini@konsulko.com> Link: https://android.googlesource.com/platform/external/u-boot/+/3c433724e6f830a6b2edd5ec3d4a504794887263
Diffstat (limited to 'arch/arm/include/asm/armv8')
-rw-r--r--arch/arm/include/asm/armv8/mmu.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/include/asm/armv8/mmu.h b/arch/arm/include/asm/armv8/mmu.h
index 9f58cedb65..98a27db316 100644
--- a/arch/arm/include/asm/armv8/mmu.h
+++ b/arch/arm/include/asm/armv8/mmu.h
@@ -49,10 +49,13 @@
#define PTE_TYPE_BLOCK (1 << 0)
#define PTE_TYPE_VALID (1 << 0)
-#define PTE_TABLE_PXN (1UL << 59)
-#define PTE_TABLE_XN (1UL << 60)
-#define PTE_TABLE_AP (1UL << 61)
-#define PTE_TABLE_NS (1UL << 63)
+#define PTE_RDONLY BIT(7)
+#define PTE_DBM BIT(51)
+
+#define PTE_TABLE_PXN BIT(59)
+#define PTE_TABLE_XN BIT(60)
+#define PTE_TABLE_AP BIT(61)
+#define PTE_TABLE_NS BIT(63)
/*
* Block
@@ -99,6 +102,9 @@
#define TCR_TG0_16K (2 << 14)
#define TCR_EPD1_DISABLE (1 << 23)
+#define TCR_HA BIT(39)
+#define TCR_HD BIT(40)
+
#define TCR_EL1_RSVD (1U << 31)
#define TCR_EL2_RSVD (1U << 31 | 1 << 23)
#define TCR_EL3_RSVD (1U << 31 | 1 << 23)