armv8: Add ARMv8 MPU configuration logic
authorPeter Hoyes <Peter.Hoyes@arm.com>
Thu, 19 Aug 2021 15:53:11 +0000 (16:53 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 2 Sep 2021 14:17:45 +0000 (10:17 -0400)
commit2f5b7b74903f747581aa4d63f492da7cc77377bf
tree655e7218f1bde62ee649a79b26811de7f919b11c
parent37a757e227ccfc7d9eef82ab38f8500a832ea01b
armv8: Add ARMv8 MPU configuration logic

Armv8r64 is the first Armv8 platform that only has a PMSA at the
current exception level. The architecture supplement for Armv8r64
describes new fields in ID_AA64MMFR0_EL1 which can be used to detect
whether a VMSA or PMSA is present. These fields are RES0 on Armv8a.

Add logic to read these fields and, for the protection of the memory
used by U-Boot, initialize the MPU instead of the MMU during init, then
clear the MPU regions before transition to the next stage.

Provide a default (blank) MPU memory map, which can be overridden by
board configurations.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
arch/arm/cpu/armv8/cache_v8.c
arch/arm/include/asm/armv8/mpu.h [new file with mode: 0644]