summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/pgtable-3level-hwdef.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2024-03-25 10:27:00 +0300
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-04-18 14:10:43 +0300
commita8f15b31a6479d077b851c86a2cc47391bccafb5 (patch)
treec548da769035eac1785030270702921683427794 /arch/arm/include/asm/pgtable-3level-hwdef.h
parent4cece764965020c22cff7665b18a012006359095 (diff)
downloadlinux-a8f15b31a6479d077b851c86a2cc47391bccafb5.tar.xz
ARM: 9355/2: Add TTBCR_* definitions to pgtable-3level-hwdef.h
These macros will be used in a subsequent patch. At one point these were part of the ARM32 KVM but that is no longer the case. Since these macros are only relevant to LPAE kernel builds, they are added to pgtable-3level-hwdef.h Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Kees Cook <keescook@chromium.org> Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/pgtable-3level-hwdef.h')
-rw-r--r--arch/arm/include/asm/pgtable-3level-hwdef.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/include/asm/pgtable-3level-hwdef.h b/arch/arm/include/asm/pgtable-3level-hwdef.h
index 2f35b4eddaa8..19da7753a0b8 100644
--- a/arch/arm/include/asm/pgtable-3level-hwdef.h
+++ b/arch/arm/include/asm/pgtable-3level-hwdef.h
@@ -94,4 +94,21 @@
#define TTBR1_SIZE (((PAGE_OFFSET >> 30) - 1) << 16)
+/*
+ * TTBCR register bits.
+ */
+#define TTBCR_EAE (1 << 31)
+#define TTBCR_IMP (1 << 30)
+#define TTBCR_SH1_MASK (3 << 28)
+#define TTBCR_ORGN1_MASK (3 << 26)
+#define TTBCR_IRGN1_MASK (3 << 24)
+#define TTBCR_EPD1 (1 << 23)
+#define TTBCR_A1 (1 << 22)
+#define TTBCR_T1SZ_MASK (7 << 16)
+#define TTBCR_SH0_MASK (3 << 12)
+#define TTBCR_ORGN0_MASK (3 << 10)
+#define TTBCR_IRGN0_MASK (3 << 8)
+#define TTBCR_EPD0 (1 << 7)
+#define TTBCR_T0SZ_MASK (7 << 0)
+
#endif