summaryrefslogtreecommitdiff
path: root/plat/qemu/qemu_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'plat/qemu/qemu_common.c')
-rw-r--r--plat/qemu/qemu_common.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/plat/qemu/qemu_common.c b/plat/qemu/qemu_common.c
index e34b16fe..6f9fcc60 100644
--- a/plat/qemu/qemu_common.c
+++ b/plat/qemu/qemu_common.c
@@ -85,6 +85,16 @@ static const mmap_region_t plat_qemu_mmap[] = {
{0}
};
#endif
+#ifdef IMAGE_BL32
+static const mmap_region_t plat_qemu_mmap[] = {
+ MAP_SHARED_RAM,
+ MAP_DEVICE0,
+#ifdef MAP_DEVICE1
+ MAP_DEVICE1,
+#endif
+ {0}
+};
+#endif
/*******************************************************************************
* Macro generating the code for the function setting up the pagetables as per
@@ -92,7 +102,7 @@ static const mmap_region_t plat_qemu_mmap[] = {
******************************************************************************/
#define DEFINE_CONFIGURE_MMU_EL(_el) \
- void qemu_configure_mmu_el##_el(unsigned long total_base, \
+ void qemu_configure_mmu_##_el(unsigned long total_base, \
unsigned long total_size, \
unsigned long ro_start, \
unsigned long ro_limit, \
@@ -111,11 +121,15 @@ static const mmap_region_t plat_qemu_mmap[] = {
mmap_add(plat_qemu_mmap); \
init_xlat_tables(); \
\
- enable_mmu_el##_el(0); \
+ enable_mmu_##_el(0); \
}
/* Define EL1 and EL3 variants of the function initialising the MMU */
-DEFINE_CONFIGURE_MMU_EL(1)
-DEFINE_CONFIGURE_MMU_EL(3)
+#ifdef AARCH32
+DEFINE_CONFIGURE_MMU_EL(secure)
+#else
+DEFINE_CONFIGURE_MMU_EL(el1)
+DEFINE_CONFIGURE_MMU_EL(el3)
+#endif