Flush cpu caches
Ian Lepore
ian at freebsd.org
Tue Jul 9 17:20:33 UTC 2019
On Tue, 2019-07-09 at 16:54 +0000, adr wrote:
> First of all, hello everyone.
>
> I'm completely new to FreeBSD (not to BSD). I need to use
> something like arm_sync_icache(2) on OpenBSD and NetBSD.
>
> I'd find what I think I need in machine/cpufunc.h, but the linker
> can't find any function symbol. I suppose I have to pass a lib to
> the linker, but no idea which one.
>
> Some help?
>
> Thanks in advance,
> adr.
>
Hmmm, we have a prototype for arm_sync_icache() but no library function
for it. I'll make a note to look into that asap.
Until I figure out how to add it properly, you could implement it
locally like this:
#include <machine/sysarch.h>
void arm_sync_icache(u_int addr, int len)
{
struct arm_sync_icache_args arg;
arg.addr = (uintptr_t)addr;
arg.len = (uintptr_t)len;
sysarch(ARM_SYNC_ICACHE, &arg);
}
-- Ian
More information about the freebsd-arm
mailing list