lib: xlat_tables_v2: reduce time required to add a mmap region
The last entry in the mapping table is not necessarily the same as the
end of the table. This patch loops through the table to find the last
entry marker, on every new mmap addition. The memove operation then
has to only move the memory between current entry and the last entry.
For platforms that arrange their MMIO map properly, this opearation
turns out to be a NOP.
The previous implementation added significant overhead per mmap
addition as the memmove operation always moved the difference between
the current mmap entry and the end of the table.
Tested on Tegra platforms and this new approach improves the memory
mapping time by ~75%, thus significantly reducing boot time on some
platforms.
Change-Id: Ie3478fa5942379282ef58bee2085da799137e2ca
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Please register or sign in to comment