This is a followup to the v1 I sent out last Tuesday, to address problems with
the cache maintenance practices in ArmPkg.

Changes:
- Dropped the patch that removes the ARM9 version of ArmLib. There's no rush
doing that, and people may still want us to hold on to it. Also updated patch #2
to fix the same type in the ARM9 files.
- Dropped the patch that removes ArmInvalidateDataCache() calls from platforms
under ArmPlatformPkg, since it is not harmful and we have no visibility on cases
where removing it may cause regressions.
- Added patches to use the correct granularity for non-coherent DMA, as reported
by Mark Rutland.
- Dropped redundant ArmInvalidateInstructionCache() added in patch #6
- Added acks from Mark Rutland and Laszlo Ersek

Patch #1 is Mark Rutland's patch to fix the barriers used in the AArch64
version of ArmEnableMmu ()

Patch #2 fixes a typo 'ArmDataSyncronizationBarrier' across all the
packages where it occurred.

Patch #3 removes the 'clean to PoU by set/way' routines.

Patch #4 removes the ARM_CACHE_INFO routines that mostly infer cache geometry
from CCSIDR which is explicitly forbidden by the architecture. Since there are
no users anyway, I just removed all of it.

Patch #5 fixes another illegal use of CCSIDR: cache maintenance by virtual
address needs to use the stride reported in CTR not CCSIDR

Patch #6 moves the sync barriers out of the loop for MVA cache maintenance, and
removes them entirely from set/way maintenance since in that case, the outer
loop already contains sync barriers as well.

Patch #7 updates the ArmCacheMaintenanceLib whole-cache maintenance routines to
ASSERT() rather than silently invoke the data cache maintenance by set/way
routines which we know are not appropriate at runtime.

Patch #8 removes the use of ArmInvalidateDataCache() at startup time from the
ArmVirtPkg version of PrePi, which is only intended to run under virtualization,
where this does more harm than good.

Patch #9 adds an accessor function to the CTR_EL0.CWG field, which contains the
maximum data cache linesize.

Patch #10 wires up the CTR_EL0.CWG into the ArmDmaLib function. This fixes a
potential problem when the cache writeback granule exceeds the minimum cache
linesize.

Ard Biesheuvel (9):
  ArmPkg BeagleBoardPkg Omap35xxPkg: fix typo
    'ArmDataSyncronizationBarrier'
  ArmPkg/ArmLib: remove unused ArmCleanDataCacheToPoU()
  ArmPkg/ArmLib: remove CCSIDR based cache info routines
  ArmPkg/ArmLib: retrieve cache line length from CTR not CCSIDR
  ArmPkg/ArmLib: move cache maintenance sync barriers out of loop
  ArmCacheMaintenanceLib: disallow whole D-cache maintenance operations
  ArmVirtPkg/PrePi: do not invalidate the entire data cache at startup
  ArmPkg/ArmLib: add accessor function for Cache Writeback Granularity
  ArmPkg/ArmDmaLib: use the cache writeback granularity for alignment

Mark Rutland (1):
  ArmPkg/ArmLib: fix barriers in AArch64 ArmEnableMmu

 ArmPkg/Include/Library/ArmLib.h                                |  84 +--------
 ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.c |   9 +-
 ArmPkg/Library/ArmDmaLib/ArmDmaLib.c                           |   2 +-
 ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c                     | 196 
-------------------
 ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h                     |   6 -
 ArmPkg/Library/ArmLib/AArch64/AArch64Support.S                 |  36 +---
 ArmPkg/Library/ArmLib/Arm9/Arm9Support.S                       |   4 +-
 ArmPkg/Library/ArmLib/Arm9/Arm9Support.asm                     |   4 +-
 ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.c                         | 199 
--------------------
 ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.h                         |   6 -
 ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S                     |  66 +------
 ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.asm                   |  66 +------
 ArmPkg/Library/ArmLib/Common/ArmLib.c                          |  55 ++++--
 ArmPkg/Library/ArmLib/Null/NullArmCacheInformation.c           | 106 
-----------
 ArmPkg/Library/ArmLib/Null/NullArmLib.inf                      |   1 -
 ArmVirtPkg/PrePi/PrePi.c                                       |   2 -
 BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c            |   4 +-
 Omap35xxPkg/InterruptDxe/HardwareInterrupt.c                   |   6 +-
 Omap35xxPkg/Library/DebugAgentTimerLib/DebugAgentTimerLib.c    |   2 +-
 19 files changed, 64 insertions(+), 790 deletions(-)
 delete mode 100644 ArmPkg/Library/ArmLib/Null/NullArmCacheInformation.c

-- 
1.9.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to