• Sandrine Bailleux's avatar
    ARM platforms: Restrict mapping of Trusted ROM in BL1 · af419dd6
    Sandrine Bailleux authored
    At the moment, on ARM platforms, BL1 maps everything from BL1_RO_BASE
    to BL1_RO_LIMIT. BL1_RO_LIMIT, as defined in the porting guide, is
    the maximum address in Trusted ROM that BL1's actual content _can_
    occupy. The actual portion of ROM occupied by BL1 can be less than
    that, which means that BL1 might map more Trusted ROM than it actually
    needs to.
    
    This patch changes BL1's memory mappings on ARM platforms to restrict
    the region of Trusted ROM it maps. It uses the symbols exported by
    the linker to figure out the actual extents of BL1's ROM footprint.
    
    This change increases the number of page tables used on FVP by 1.
    On FVP, we used to map the whole Trusted ROM. As it is 64MB large,
    we used to map it as blocks of 2MB using level-2 translation table
    entries. We now need a finer-grained mapping, which requires an
    additional level-3 translation table.
    
    On ARM CSS platforms, the number of translation tables is unchanged.
    The BL1 image resides in flash at address 0x0BEC0000. This address is
    not aligned on a 2MB-boundary so a level-3 translation table was
    already required to map this memory.
    
    Change-Id: I317a93fd99c40e70d0f13cc3d7a570f05c6c61eb
    af419dd6
arm_bl1_setup.c 5.73 KB