ArmPkg/ArmLib: don't invalidate entire I-cache on range operation
Instead of cleaning the data cache to the PoU by virtual address and subsequently invalidating the entire I-cache, invalidate only the range that we just cleaned. This way, we don't invalidate other cachelines unnecessarily. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
@@ -23,6 +23,7 @@ GCC_ASM_EXPORT (ArmInvalidateInstructionCache)
|
||||
GCC_ASM_EXPORT (ArmInvalidateDataCacheEntryByMVA)
|
||||
GCC_ASM_EXPORT (ArmCleanDataCacheEntryByMVA)
|
||||
GCC_ASM_EXPORT (ArmCleanDataCacheEntryToPoUByMVA)
|
||||
GCC_ASM_EXPORT (ArmInvalidateInstructionCacheEntryToPoUByMVA)
|
||||
GCC_ASM_EXPORT (ArmCleanInvalidateDataCacheEntryByMVA)
|
||||
GCC_ASM_EXPORT (ArmInvalidateDataCacheEntryBySetWay)
|
||||
GCC_ASM_EXPORT (ArmCleanDataCacheEntryBySetWay)
|
||||
@@ -80,6 +81,10 @@ ASM_PFX(ArmCleanDataCacheEntryToPoUByMVA):
|
||||
dc cvau, x0 // Clean single data cache line to PoU
|
||||
ret
|
||||
|
||||
ASM_PFX(ArmInvalidateInstructionCacheEntryToPoUByMVA):
|
||||
ic ivau, x0 // Invalidate single instruction cache line to PoU
|
||||
ret
|
||||
|
||||
|
||||
ASM_PFX(ArmCleanInvalidateDataCacheEntryByMVA):
|
||||
dc civac, x0 // Clean and invalidate single data cache line
|
||||
|
Reference in New Issue
Block a user