Skip to content

Commit

Permalink
core: plat: imx: implement pl310_nsbase()
Browse files Browse the repository at this point in the history
Map PL310 registers as non-secure.
Implement pl310_nsbase() that returns non-secure PL310 base address.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
  • Loading branch information
clementfaure committed Dec 11, 2023
1 parent abba658 commit c8d9f5a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/arch/arm/plat-imx/imx_pl310.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit c8d9f5a

Please sign in to comment.