Commit 7cd61241 authored by Will Deacon's avatar Will Deacon Committed by Luis Henriques

arm64: mdscr_el1: avoid exposing DCC to userspace

commit d8d23fa0 upstream.

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: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent c05e790e
...@@ -186,7 +186,8 @@ ENTRY(__cpu_setup) ...@@ -186,7 +186,8 @@ ENTRY(__cpu_setup)
mov x0, #3 << 20 mov x0, #3 << 20
msr cpacr_el1, x0 // Enable FP/ASIMD msr cpacr_el1, x0 // Enable FP/ASIMD
msr mdscr_el1, xzr // Reset mdscr_el1 mov x0, #1 << 12 // Reset mdscr_el1 and disable
msr mdscr_el1, x0 // access to the DCC from EL0
/* /*
* Memory region attributes for LPAE: * Memory region attributes for LPAE:
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment