Add comments about mismatched TCR_ELx and xlat tables
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Fri, 23 Feb 2018 15:07:54 +0000 (15:07 +0000)
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Tue, 27 Feb 2018 09:55:01 +0000 (09:55 +0000)
commit883d1b5d4a1a4da956310a951df9eb2056c84597
tree38155abc27455ae5c63a27056a5452d96a8c9c7e
parent5ff6da948710361dec294f4b5106978501531caf
Add comments about mismatched TCR_ELx and xlat tables

When the MMU is enabled and the translation tables are mapped, data
read/writes to the translation tables are made using the attributes
specified in the translation tables themselves. However, the MMU
performs table walks with the attributes specified in TCR_ELx. They are
completely independent, so special care has to be taken to make sure
that they are the same.

This has to be done manually because it is not practical to have a test
in the code. Such a test would need to know the virtual memory region
that contains the translation tables and check that for all of the
tables the attributes match the ones in TCR_ELx. As the tables may not
even be mapped at all, this isn't a test that can be made generic.

The flags used by enable_mmu_xxx() have been moved to the same header
where the functions are.

Also, some comments in the linker scripts related to the translation
tables have been fixed.

Change-Id: I1754768bffdae75f53561b1c4a5baf043b45a304
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
bl1/bl1.ld.S
bl2/bl2.ld.S
bl2/bl2_el3.ld.S
bl2u/bl2u.ld.S
bl31/aarch64/bl31_entrypoint.S
bl31/bl31.ld.S
bl32/sp_min/sp_min.ld.S
bl32/tsp/tsp.ld.S
include/lib/xlat_tables/xlat_mmu_helpers.h
include/lib/xlat_tables/xlat_tables_defs.h
plat/mediatek/mt6795/bl31.ld.S