Merge "xlat_tables_v2: add enable_mmu()" into integration
This commit is contained in:
commit
787d848a1e
|
@ -56,6 +56,8 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <arch_helpers.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the values that the MMU configuration registers must contain for the
|
* Return the values that the MMU configuration registers must contain for the
|
||||||
* specified translation context. `params` must be a pointer to array of size
|
* specified translation context. `params` must be a pointer to array of size
|
||||||
|
@ -70,6 +72,7 @@ void setup_mmu_cfg(uint64_t *params, unsigned int flags,
|
||||||
void enable_mmu_el1(unsigned int flags);
|
void enable_mmu_el1(unsigned int flags);
|
||||||
void enable_mmu_el2(unsigned int flags);
|
void enable_mmu_el2(unsigned int flags);
|
||||||
void enable_mmu_el3(unsigned int flags);
|
void enable_mmu_el3(unsigned int flags);
|
||||||
|
void enable_mmu(unsigned int flags);
|
||||||
|
|
||||||
void enable_mmu_direct_el1(unsigned int flags);
|
void enable_mmu_direct_el1(unsigned int flags);
|
||||||
void enable_mmu_direct_el2(unsigned int flags);
|
void enable_mmu_direct_el2(unsigned int flags);
|
||||||
|
|
|
@ -239,6 +239,23 @@ void enable_mmu_el3(unsigned int flags)
|
||||||
enable_mmu_direct_el3(flags);
|
enable_mmu_direct_el3(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void enable_mmu(unsigned int flags)
|
||||||
|
{
|
||||||
|
switch (get_current_el_maybe_constant()) {
|
||||||
|
case 1:
|
||||||
|
enable_mmu_el1(flags);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
enable_mmu_el2(flags);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
enable_mmu_el3(flags);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
panic();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#else /* !__aarch64__ */
|
#else /* !__aarch64__ */
|
||||||
|
|
||||||
void enable_mmu_svc_mon(unsigned int flags)
|
void enable_mmu_svc_mon(unsigned int flags)
|
||||||
|
|
Loading…
Reference in New Issue