Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 May 2015 21:49:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-arm@FreeBSD.org
Subject:   [Bug 199740] syscall  __clear_cache (ARM_SYNC_ICACHE) does not achieve icache consistency
Message-ID:  <bug-199740-7-gzXgoYyeU9@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-199740-7@https.bugs.freebsd.org/bugzilla/>
References:  <bug-199740-7@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199740

--- Comment #2 from weiss@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-199740-7-gzXgoYyeU9>