/* MMU default configuration. 
This function provides the default configuration mechanism for the Memory Management Unit (MMU).  */
void z_arm64_mm_init(bool is_primary_core)
/* MMU default configuration. 
This function provides the default configuration mechanism for the Memory Management Unit (MMU).  */
void z_arm64_mm_init(bool is_primary_core)
{
	unsigned int flags = 0U;
	__ASSERT(CONFIG_MMU_PAGE_SIZE == KB(4),
		 "Only 4K page size is supported\n");
	__ASSERT(GET_EL(read_currentel()) == MODE_EL1,
		 "Exception level not EL1, MMU not enabled!\n");
	__ASSERT((read_sctlr_el1() & SCTLR_M_BIT) == 0, "MMU is already enabled\n");
	if (is_primary_core) {
		kernel_ptables.base_xlat_table = new_table();
		setup_page_tables(&kernel_ptables);
	}
	enable_mmu_el1(&kernel_ptables, flags);
}