arm64: Align cache maintenance code with libpayload and ARM32

Hardware / Coreboot - Julius Werner [chromium.org] - 30 May 2017 16:17 EDT

coreboot and libpayload currently use completely different code to perform a full cache flush on ARM64, with even different function names. The libpayload code is closely inspired by the ARM32 version, so for the sake of overall consistency let's sync coreboot to that. Also align a few other cache management details to work the same way as the corresponding ARM32 parts (such as only flushing but not invalidating the data cache after loading a new stage, which may have a small performance benefit).

Change-Id: I9e05b425eeeaa27a447b37f98c0928fed3f74340

baa3e70 arm64: Align cache maintenance code with libpayload and ARM32
payloads/libpayload/arch/arm64/cache.c | 6 +-
src/arch/arm64/armv8/Makefile.inc | 4 -
src/arch/arm64/armv8/cache.c | 13 ++-
src/arch/arm64/armv8/cache_helpers.S | 124 ----------------------------
src/arch/arm64/armv8/cpu.S | 81 ++++++++++++++++--
src/arch/arm64/armv8/mmu.c | 3 +-
src/arch/arm64/include/arch/cache_helpers.h | 47 -----------
src/arch/arm64/include/armv8/arch/cache.h | 9 +-
8 files changed, 93 insertions(+), 194 deletions(-)

Upstream: review.coreboot.org


  • Share