Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: fix core_mmu_map_pages() #1827

Merged
merged 1 commit into from
Sep 25, 2017
Merged

core: fix core_mmu_map_pages() #1827

merged 1 commit into from
Sep 25, 2017

Conversation

jenswi-linaro
Copy link
Contributor

Adds missing dsb_ishst() at the end of core_mmu_map_pages() needed to
guarantee that changes to translation tables are visible.

Reported-by: Stuart Yoder stuart.yoder@arm.com
Signed-off-by: Jens Wiklander jens.wiklander@linaro.org

@jenswi-linaro
Copy link
Contributor Author

@stuyoder does this fix #1805 ?

@etienne-lms
Copy link
Contributor

@jenswi-linaro, I wonder why this issue does not occur with the pager, where pages can be loaded from the pagefault handler without dsb in some conditions (bsd only when valid mmu descriptors are updated) before handler return to normal execution ?

@jenswi-linaro
Copy link
Contributor Author

We're doing TLB invalidations instead. Or have you been able to find a suspicious location?

@etienne-lms
Copy link
Contributor

Sorry, my mistake. tee_pager_handle_fault() always ends with a tbli or dsb.

@etienne-lms
Copy link
Contributor

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

Maybe we could add in the comments of prototypes of core_mmu_map_pages()/core_mmu_unmap_pages() that caches are synchronized against updated mapping when these routines return.

@stuyoder
Copy link

Yes, I confirmed that translate fault I see goes away with this patch applied.

@jenswi-linaro
Copy link
Contributor Author

@stuyoder, can I add your Tested-by?

@stuyoder
Copy link

Sure, thats fine.

Adds missing dsb_ishst() at the end of core_mmu_map_pages() needed to
guarantee that changes to translation tables are visible.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Tested-by: Stuart Yoder <stuart.yoder@arm.com>
Reported-by: Stuart Yoder <stuart.yoder@arm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
@jenswi-linaro
Copy link
Contributor Author

Tags applied.

@etienne-lms, I think the interface (and implementation) need to be cleaned up a bit. It's actually one item I'd like to discuss at Connect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants