Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6079041f authored by Will Deacon's avatar Will Deacon Committed by Sami Tolvanen
Browse files

UPSTREAM: 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: default avatarWill Deacon <will.deacon@arm.com>

Bug: 31432001
Change-Id: I0d2ac193d444a017cd1dbe234a8ead8572abdf87
(cherry picked from commit d8d23fa0f27f3b2942a7bbc7378c7735324ed519)
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
parent 82d34266
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -196,7 +196,8 @@ ENTRY(__cpu_setup)

	mov	x0, #3 << 20
	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:
	 *