SPM: Treat SP xlat tables the same as others
authorSandrine Bailleux <sandrine.bailleux@arm.com>
Wed, 6 Jun 2018 14:35:40 +0000 (16:35 +0200)
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Wed, 13 Jun 2018 08:19:41 +0000 (09:19 +0100)
commitd801a1d035e8868fc2b131653c5fd96ceed10a21
tree778f6d292a0136c298ebfdbd5803065d76999cd4
parenta0b9bb79a035a7421318502d04dde723e7381b6a
SPM: Treat SP xlat tables the same as others

The translation tables allocated for the Secure Partition do not need
to be treated as a special case. They can be put amongst the other
tables mapping BL31's general purpose memory. They will be mapped with
the same attributes as them, which is fine.

The explicit alignment constraint in BL31's linker script to pad the
last page of memory allocated to the Secure Partition's translation
tables is useless too, as page tables are per se pages, thus their
end address is naturally aligned on a page-boundary.

In fact, this patch does not change the existing behaviour. Since
patch 22282bb68a31 ("SPM: Move all SP-related info to SP context
struct"), the secure_partition.c file has been renamed into sp_xlat.c
but the linker script has not been properly updated. As a result, the
SP translation tables are not specifically put at the start of the
xlat_table linker section, the __SP_IMAGE_XLAT_TABLES_START__/_END__
symbols have the same value, the size of the resulting mmap_region
covering these xlat tables is 0 and so it is ignored.

Change-Id: I4cf0a4cc090298811cca53fc9cee74df0f2b1512
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
bl31/bl31.ld.S
include/plat/arm/common/arm_def.h
include/services/secure_partition.h
plat/arm/common/arm_common.c