ARM-software / tf-issues

Issue tracking for the ARM Trusted Firmware project
37 stars 16 forks source link

Implement virtual to physical address translation service #248

Open danh-arm opened 10 years ago

danh-arm commented 10 years ago

On ARMv8-A it is not possible for Secure-EL1 to translate a normal world VA to PA - this is because the normal-world translation context is not banked in the CPU and so the CPU is incapable of doing this translation.

In general the recommendation is that EL3 Firmware (including the SPD) and the SP should be passed PAs from normal world software when sharing memory buffers to avoid the need for evaluating address translations from outside of the translation context (i.e. translating an EL1 VA -> IPA -> PA from EL3).

In the case that a SP/SPD does require NS address translation, then this must be done at EL3, and needs to be added as a library service that is aware of the CPU register context and state of the saved CPU contexts. This is because the normal world EL1 memory translation registers may be live in the CPU registers, or may be currently saved in the non-secure CPU context - and the address translation service needs to be aware of this in order to correctly perform the translation and restore any CPU state if required.

This task is to implement a generic library that performs such a service and update the TSP and TSPD to demonstrate its use.

vwadekar commented 9 years ago

Hi, any update?

danh-arm commented 9 years ago

This is not currently scheduled for any particular release.

vwadekar commented 9 years ago

Biting the bullet. As discussed, in https://github.com/ARM-software/arm-trusted-firmware/pull/272, I plan to push the address translation code as a lib. TLKD currently has its own address translation routines, which would be removed once this common lib is available.

danh-arm commented 8 years ago

Internal ref: http://jira.arm.com/browse/GENFW-518