audk/ArmVirtPkg/Library
Ard Biesheuvel 2dbed52506 ArmVirtPkg/ArmVirtMemoryInitPeiLib: avoid redundant cache invalidation
Alex reports that the cache invalidation performed by
ArmVirtMemoryInitPeiLib takes a non-negligible amount of time at boot.
This cache invalidation used to be necessary to avoid inconsistencies
between the CPU's cached and uncached views of the permanent PEI memory
region, given that the PEI phase is where the MMU gets enabled.

The only allocations done from permanent PEI memory with the MMU off are
pages used for page tables, and since commit 748fea6279
("ArmPkg/ArmMmuLib AARCH64: invalidate page tables before populating
them"), each of those is invalidated in the caches explicitly, for
reasons described in the patch's commit log. All other allocations done
in PEI are either from temporary PEI memory, which includes the stack,
or from permanent PEI memory but after the MMU has been enabled.

This means that the cache invalidation in ArmVirtMemoryInitPeiLib is no
longer necessary, and can simply be dropped.

Reported-by: Alexander Graf <graf@amazon.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
Reviewed-by: Alexander Graf <graf@amazon.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2022-02-25 15:57:11 +00:00
..
ArmVirtDxeHobLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirtGicArchLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirtMemoryInitPeiLib ArmVirtPkg/ArmVirtMemoryInitPeiLib: avoid redundant cache invalidation 2022-02-25 15:57:11 +00:00
ArmVirtPL031FdtClientLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirtPciHostBridgeUtilityLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirtPsciResetSystemLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirtPsciResetSystemPeiLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmVirtTimerFdtClientLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Fdt16550SerialPortHookLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FdtPL011SerialPortLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
KvmtoolPlatformPeiLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
KvmtoolRtcFdtClientLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
KvmtoolVirtMemInfoLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
NorFlashKvmtoolLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
NorFlashQemuLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformBootManagerLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformPeiLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
QemuVirtMemInfoLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenArmGenericTimerVirtCounterLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenVirtMemInfoLib ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00