aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2015-08-20 06:47:13 -0400
committerWill Deacon <will.deacon@arm.com>2015-08-20 11:17:58 -0400
commitd8d23fa0f27f3b2942a7bbc7378c7735324ed519 (patch)
tree2b7dd9735a738778ceb99d5c357a293daf64f4df
parentbf0c4e04732479f650ff59d1ee82de761c0071f0 (diff)
arm64: mdscr_el1: avoid exposing DCC to userspace
We don't want to expose the DCC to userspace, particularly as there is a kernel console driver for it. This patch resets mdscr_el1 to disable userspace access to the DCC registers on the cold boot path. Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arch/arm64/mm/proc.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
index 6e8765a2bddd..e4ee7bd8830a 100644
--- a/arch/arm64/mm/proc.S
+++ b/arch/arm64/mm/proc.S
@@ -151,7 +151,8 @@ ENTRY(__cpu_setup)
151 151
152 mov x0, #3 << 20 152 mov x0, #3 << 20
153 msr cpacr_el1, x0 // Enable FP/ASIMD 153 msr cpacr_el1, x0 // Enable FP/ASIMD
154 msr mdscr_el1, xzr // Reset mdscr_el1 154 mov x0, #1 << 12 // Reset mdscr_el1 and disable
155 msr mdscr_el1, x0 // access to the DCC from EL0
155 /* 156 /*
156 * Memory region attributes for LPAE: 157 * Memory region attributes for LPAE:
157 * 158 *