aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry Moulton <harry.moulton@arm.com>2026-01-07 14:20:19 +0000
committerAndrew Turner <andrew@FreeBSD.org>2026-01-13 15:28:04 +0000
commitbdaa120b30006d7ef841a966414795416ce93eea (patch)
tree2ddc33a49f6e77a6d8cfb373d6eefd49eaaee006
parent27083693955d563f836fd1b6b1bc4e1a249d3b6b (diff)
arm64: Fix MAIR_ATTR_MASK
Use the correct value when calculating the mask. (commit message by andrew@) Sponsored by: Arm Ltd
-rw-r--r--sys/arm64/include/armreg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h
index 28dec3a40b26..138a1eff51ac 100644
--- a/sys/arm64/include/armreg.h
+++ b/sys/arm64/include/armreg.h
@@ -1982,7 +1982,7 @@
#define MAIR_EL1_CRn 10
#define MAIR_EL1_CRm 2
#define MAIR_EL1_op2 0
-#define MAIR_ATTR_MASK(idx) (UL(0xff) << ((n)* 8))
+#define MAIR_ATTR_MASK(idx) (UL(0xff) << ((idx) * 8))
#define MAIR_ATTR(attr, idx) ((attr) << ((idx) * 8))
#define MAIR_DEVICE_nGnRnE UL(0x00)
#define MAIR_DEVICE_nGnRE UL(0x04)