From: Sergej Proskurin Date: Wed, 16 Aug 2017 13:17:32 +0000 (+0200) Subject: arm/mem_access: Add and cleanup (TCR_|TTBCR_)* defines X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1653 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=610cab040dc1a1e48f017133937f4e18a94e9426;p=xen.git arm/mem_access: Add and cleanup (TCR_|TTBCR_)* defines This commit adds (TCR_|TTBCR_)* defines to simplify access to the respective register contents. At the same time, we adjust the macros TCR_T0SZ and TCR_TG0_* by using the newly introduced TCR_T0SZ_SHIFT and TCR_TG0_SHIFT instead of the hardcoded values. Signed-off-by: Sergej Proskurin Acked-by: Julien Grall Signed-off-by: Stefano Stabellini --- diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index ab5225fa6c..bf0e1bd014 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -94,6 +94,13 @@ #define TTBCR_N_2KB _AC(0x03,U) #define TTBCR_N_1KB _AC(0x04,U) +/* + * TTBCR_PD(0|1) can be applied only if LPAE is disabled, i.e., TTBCR.EAE==0 + * (ARM DDI 0487B.a G6-5203 and ARM DDI 0406C.b B4-1722). + */ +#define TTBCR_PD0 (_AC(1,U)<<4) +#define TTBCR_PD1 (_AC(1,U)<<5) + /* SCTLR System Control Register. */ /* HSCTLR is a subset of this. */ #define SCTLR_TE (_AC(1,U)<<30) @@ -154,7 +161,20 @@ /* TCR: Stage 1 Translation Control */ -#define TCR_T0SZ(x) ((x)<<0) +#define TCR_T0SZ_SHIFT (0) +#define TCR_T1SZ_SHIFT (16) +#define TCR_T0SZ(x) ((x)<