[Bug 199740] syscall __clear_cache (ARM_SYNC_ICACHE) does not achieve icache consistency

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun May 3 21:49:38 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199740

--- Comment #2 from weiss at uni-mainz.de ---
sorry, my bug report was a bit brief.

assume a cache line size of 32 bytes and a call with offset 16 and length 24.
It should sync 2 cache lines but does actually sync only one. The last
8 bytes would not be synced.

So one does not have to round the va to a boundary, but one has to adjust
the length.

So the following change would probably be sufficient (untested)

ENTRY_NP(armv7_icache_sync_range)
        ldr     ip, .Larmv7_icache_line_size
        ldr     ip, [ip]
+       sub     r3, ip, #1
+       and     r2, r0, r3
+       add     r1, r1, r2
 .Larmv7_sync_next:
        mcr     CP15_DCCMVAC(r0)
        mcr     CP15_ICIMVAU(r0)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-arm mailing list