From c8d9f5a50f4a487513857e743eef65f7750c0eed Mon Sep 17 00:00:00 2001 From: Clement Faure Date: Thu, 7 Dec 2023 18:25:26 +0100 Subject: [PATCH] core: plat: imx: implement pl310_nsbase() Map PL310 registers as non-secure. Implement pl310_nsbase() that returns non-secure PL310 base address. Signed-off-by: Clement Faure --- core/arch/arm/plat-imx/imx_pl310.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/arch/arm/plat-imx/imx_pl310.c b/core/arch/arm/plat-imx/imx_pl310.c index 202d64b3ec2..ddf355e4c9b 100644 --- a/core/arch/arm/plat-imx/imx_pl310.c +++ b/core/arch/arm/plat-imx/imx_pl310.c @@ -23,6 +23,7 @@ #define PL310_PREFETCH_DOUBLE_LINEFILL BIT(30) register_phys_mem_pgdir(MEM_AREA_IO_SEC, PL310_BASE, CORE_MMU_PGDIR_SIZE); +register_phys_mem_pgdir(MEM_AREA_IO_NSEC, PL310_BASE, CORE_MMU_PGDIR_SIZE); void arm_cl2_config(vaddr_t pl310_base) { @@ -83,6 +84,11 @@ vaddr_t pl310_base(void) return core_mmu_get_va(PL310_BASE, MEM_AREA_IO_SEC, 1); } +vaddr_t pl310_nsbase(void) +{ + return core_mmu_get_va(PL310_BASE, MEM_AREA_IO_NSEC, 1); +} + #ifdef CFG_PL310_SIP_PROTOCOL uint32_t pl310_enable(void) {