diff --git a/docs/porting-guide.rst b/docs/porting-guide.rst index 66fe0f1d4a0df527ea472993e4ee07512f0f641a..4d4cdcd6e77c6f214a48f3cd6a07ab5fd0d8ae8b 100644 --- a/docs/porting-guide.rst +++ b/docs/porting-guide.rst @@ -60,11 +60,16 @@ A platform port must enable the Memory Management Unit (MMU) as well as the instruction and data caches for each BL stage. Setting up the translation tables is the responsibility of the platform port because memory maps differ across platforms. A memory translation library (see ``lib/xlat_tables/``) is -provided to help in this setup. Note that although this library supports -non-identity mappings, this is intended only for re-mapping peripheral physical -addresses and allows platforms with high I/O addresses to reduce their virtual -address space. All other addresses corresponding to code and data must currently -use an identity mapping. +provided to help in this setup. + +Note that although this library supports non-identity mappings, this is intended +only for re-mapping peripheral physical addresses and allows platforms with high +I/O addresses to reduce their virtual address space. All other addresses +corresponding to code and data must currently use an identity mapping. + +Also, the only translation granule size supported in Trusted Firmware is 4KB, as +various parts of the code assume that is the case. It is not possible to switch +to 16 KB or 64 KB granule sizes at the moment. In ARM standard platforms, each BL stage configures the MMU in the platform-specific architecture setup function, ``blX_plat_arch_setup()``, and uses diff --git a/include/lib/xlat_tables/xlat_tables_defs.h b/include/lib/xlat_tables/xlat_tables_defs.h index 779532e9eaef1f5c62279b066abc1ea9a5f44a56..008ae9bc5d498d71d3759d9cd7ac9a8fbedd7ce7 100644 --- a/include/lib/xlat_tables/xlat_tables_defs.h +++ b/include/lib/xlat_tables/xlat_tables_defs.h @@ -48,7 +48,11 @@ #define TABLE_ADDR_MASK ULL(0x0000FFFFFFFFF000) -#define PAGE_SIZE_SHIFT FOUR_KB_SHIFT /* 4, 16 or 64 KB */ +/* + * The ARMv8-A architecture allows translation granule sizes of 4KB, 16KB or + * 64KB. However, TF only supports the 4KB case at the moment. + */ +#define PAGE_SIZE_SHIFT FOUR_KB_SHIFT #define PAGE_SIZE (U(1) << PAGE_SIZE_SHIFT) #define PAGE_SIZE_MASK (PAGE_SIZE - 1) #define IS_PAGE_ALIGNED(addr) (((addr) & PAGE_SIZE_MASK) == 0)