summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a499fe1)
raw | patch | inline | side by side (parent: a499fe1)
author | Jens Wiklander <jens.wiklander@linaro.org> | |
Mon, 4 Jan 2021 07:34:53 +0000 (08:34 +0100) | ||
committer | Jérôme Forissier <jerome@forissier.org> | |
Thu, 7 Jan 2021 14:49:29 +0000 (15:49 +0100) |
During boot the external DT is mapped while processing the DT. Once
OP-TEE is done with the DT it should be unmapped to avoid stale mappings
that might cause problems later. Fix this by calling
core_mmu_rem_mapping() from release_external_dt() just before jumping to
normal world.
Fixes: https://github.com/OP-TEE/optee_os/issues/4278
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
OP-TEE is done with the DT it should be unmapped to avoid stale mappings
that might cause problems later. Fix this by calling
core_mmu_rem_mapping() from release_external_dt() just before jumping to
normal world.
Fixes: https://github.com/OP-TEE/optee_os/issues/4278
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
core/arch/arm/kernel/boot.c | patch | blob | history |
index 02eac0e7164627603f6d92764a9d0a7f51224251..891d2a5e0deca9908b23b62344fcd5b15116603c 100644 (file)
panic();
}
+ if (core_mmu_remove_mapping(MEM_AREA_EXT_DT, external_dt.blob,
+ CFG_DTB_MAX_SIZE))
+ panic("Failed to remove temporary Device Tree mapping");
+
/* External DTB no more reached, reset pointer to invalid */
external_dt.blob = NULL;