summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-03-02 10:36:14 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-03-07 09:10:01 +0100
commit22c7a5b70e220f681f10a0bb70fc0d76775f1b8e (patch)
tree472e1f787a26d6b74e0334b52dd400c51161f7cd /BaseTools/Source/Python
parentdf809efe13921326f2f8d7fc5654787b29ae8a8d (diff)
downloadedk2-22c7a5b70e220f681f10a0bb70fc0d76775f1b8e.tar.gz
edk2-22c7a5b70e220f681f10a0bb70fc0d76775f1b8e.tar.bz2
edk2-22c7a5b70e220f681f10a0bb70fc0d76775f1b8e.zip
ArmPkg/CpuDxe ARM: avoid unnecessary cache/TLB maintenance
Page and section entries in the page tables are updated using the helper ArmUpdateTranslationTableEntry(), which cleans the page table entry to the PoC, and invalidates the TLB entry covering the page described by the entry being updated. Since we may be updating section entries, we might be leaving stale TLB entries at this point (for all pages in the section except the first one), which will be invalidated wholesale at the end of SetMemoryAttributes(). At that point, all caches are cleaned *and* invalidated as well. This cache maintenance is costly and unnecessary. The TLB maintenance is only necessary if we updated any section entries, since any page by page entries that have been updated will have been invalidated individually by ArmUpdateTranslationTableEntry(). So drop the clean/invalidate of the caches, and only perform the full TLB flush if UpdateSectionEntries() was called, or if sections were split by UpdatePageEntries(). Finally, make the cache maintenance on the remapped regions themselves conditional on whether any memory type attributes were modified. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'BaseTools/Source/Python')
0 files changed, 0 insertions, 0 deletions