Date: Wed, 10 Jul 2019 14:07:59 -0600 From: Ian Lepore <ian@freebsd.org> To: adr <adr@SDF.ORG> Cc: freebsd-arm@freebsd.org Subject: Re: Flush cpu caches Message-ID: <66030643cf22ba15c796837185854f81d00e0a90.camel@freebsd.org> In-Reply-To: <alpine.NEB.2.21.1907091727150.4147@sdf.lonestar.org> References: <alpine.NEB.2.21.1907091634060.3966@sdf.lonestar.org> <339e38254709b7286ab3b507b615de0ac927ef0b.camel@freebsd.org> <alpine.NEB.2.21.1907091727150.4147@sdf.lonestar.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2019-07-09 at 17:30 +0000, adr wrote: > On Tue, 9 Jul 2019, Ian Lepore wrote: > > > Date: Tue, 09 Jul 2019 11:20:23 -0600 > > From: Ian Lepore <ian@freebsd.org> > > To: adr <adr@SDF.ORG>, freebsd-arm@freebsd.org > > Subject: Re: Flush cpu caches > > > > 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 > > > > > > ARM_SYNC_ICACHE > > Thanks a lot, that is all I need. > > I'll try to not be a pain in the *. > > adr. For anyone interested, I've posted a review for adding arm_drain_writebuf() and arm_sync_icache() calls to our libc, to be compatible with the other *BSD systems... https://reviews.freebsd.org/D20906 -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?66030643cf22ba15c796837185854f81d00e0a90.camel>