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

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Apr 27 19:47:55 UTC 2015


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

            Bug ID: 199740
           Summary: syscall  __clear_cache (ARM_SYNC_ICACHE) does not
                    achieve icache consistency
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: arm
          Assignee: freebsd-arm at FreeBSD.org
          Reporter: weiss at uni-mainz.de

function does not round to cache line boundaries as all other functions in this
file do

diff --git a/sys/arm/arm/cpufunc_asm_armv7.S b/sys/arm/arm/cpufunc_asm_armv7.S
index 25f052f..6a9b3e0 100644
--- a/sys/arm/arm/cpufunc_asm_armv7.S
+++ b/sys/arm/arm/cpufunc_asm_armv7.S
@@ -264,8 +272,14 @@ ENTRY_NP(armv7_icache_sync_all)
 END(armv7_icache_sync_all)

 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
+       bic     r0, r0, r3
 .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