diff options
author | Anshuman Khandual <anshuman.khandual@arm.com> | 2022-01-13 15:11:08 +0530 |
---|---|---|
committer | Mark Rutland <mark.rutland@arm.com> | 2022-01-18 10:31:06 +0000 |
commit | 9aa732349371056da2ca90b03468bc1c8e0016e2 (patch) | |
tree | b58a88c8293ce638d499ad761a84327c30dcaaba | |
parent | 16bca1c4147f6906f76d8961a09bf1682399d70f (diff) | |
download | boot-wrapper-aarch64-9aa732349371056da2ca90b03468bc1c8e0016e2.tar.gz |
aarch64: Enable BRBE for the non-secure world
MDCR_EL3.SBRBE resets to an UNKNOWN value. Configure it to allow the BRBE
buffer usage and direct register access in the non-secure world. But just
before that, check AA64DFR0_EL1.BRBE and make sure BRBE is implemented. We
still continue to reset MDCR_EL3 register to zero with the exception of
MDCR_EL3.NSPB, MDCR_EL3.NSTB and MDCR_EL3.SBRBE.
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
-rw-r--r-- | arch/aarch64/boot.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S index 27ba449..72c6b79 100644 --- a/arch/aarch64/boot.S +++ b/arch/aarch64/boot.S @@ -104,6 +104,14 @@ ASM_FUNC(_start) ldr x1, =(0x3 << 24) orr x0, x0, x1 +1: mrs x1, id_aa64dfr0_el1 + ubfx x1, x1, #52, #4 + cbz x1, 1f + + // Enable BRBE for the non-secure world. + ldr x1, =(0x3 << 32) + orr x0, x0, x1 + 1: msr mdcr_el3, x0 // Disable traps to EL3 mrs x0, id_aa64pfr0_el1 |