From owner-freebsd-arm@freebsd.org Wed Jul 10 20:08:06 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A8DA15E2682 for ; Wed, 10 Jul 2019 20:08:06 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3694C6FC68 for ; Wed, 10 Jul 2019 20:08:05 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1562789283; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=aDNE5Fe9XOIsqa7EnFlWzJYjhNY/5BAf2A8/DK5sy3BH3frOYl/Yz+EDD9d8Bh/dmMREMqfJ/U5e0 zyig07CovXK5ya25oneUQHZsx+USR7hPAnzmGutcsOtVIdYrqwfaH4chET0paKeMhIj43SdSWJanKP SInlapiyHrvfWy/dKRZml8JtoP+2BmTPfPivGP9NJpxKtutA4xEA1+M6dx+Fgs2J+PIVYMjtUnf8mK FaKGs4Xlru3h384xvwwFWpEAIg7RKpDsiGpFpFJ+JlFJKofMqX1dYTsgk0NGmCN9EHthowCA+5KSX0 1XwaoJKNQjpe44IZ/M2N2U/uoqIthfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=MxRyq2TsNhZDy06DPx78luQL+Pdv2+V6CkUzgHKw6tI=; b=UVzfOQP0yD6Q3Qqujtdfsb4TA8YPBXcdfEBcpQLA5ewvE0EOWFmZBg6oPfEqkeLgRxh9EtDQw/tWm LWvC6eZPCqOuuhBr7sD17pNzT/xz47RuFV0SF9v/sonacrH4XwiyhzlfYrTaPpy2ZJqTqdnVDBdXk7 qoQLm/eXCmy9yLpeZbOGWennHKr1ARkuZrF5iwDD1rA/IWq9kbYj8a4vfFScy3wy/cCLkA1eSAtuQ9 KwI6/ybMqJhMsb4gihg1uuyDOnVjNK/yMmUW5rCEnzEdNL0QIT47IFxbl3TpC/TvsbRsJUHd3Ru6X+ xf2qIxo27+gaUtkAFbN9/2K1rbOO4Eg== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=MxRyq2TsNhZDy06DPx78luQL+Pdv2+V6CkUzgHKw6tI=; b=uI5fBpC9nyuKdkCup23tjm2ogpLjfMCn15GHm71wuEUIxFNKebNgEAn7pe3le3aKEHBjfsd13E/em 7+3rjHMrYnyUps2jrGknyqzc1MiE707H+oQzO+dulqzxb/3CxgyQVThMttzCmoMqUhvXoWdYd9w8+q hAKExAgPv9o6jZ72BqUhQyAVPxF2NuXv23Lueuu9y8wubbGI4hvaWxfIXgGYi82KN2ZBX6brbvlE4Z r9Zk2wMlC8sEEeCHeCuGDwx8HNcGdKlimTPwzqTUaLymyN95zn2d58lCB8DL1Lm/ORK3BHDlTkV1uZ UTlicJz+7Ez5kNgT0PipwrrvlL3DBkw== X-MHO-RoutePath: aGlwcGll X-MHO-User: 6a7797bf-a34e-11e9-ac5d-07445dfc96fd X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 6a7797bf-a34e-11e9-ac5d-07445dfc96fd; Wed, 10 Jul 2019 20:08:01 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x6AK7xbU013755; Wed, 10 Jul 2019 14:07:59 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <66030643cf22ba15c796837185854f81d00e0a90.camel@freebsd.org> Subject: Re: Flush cpu caches From: Ian Lepore To: adr Cc: freebsd-arm@freebsd.org Date: Wed, 10 Jul 2019 14:07:59 -0600 In-Reply-To: References: <339e38254709b7286ab3b507b615de0ac927ef0b.camel@freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 3694C6FC68 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jul 2019 20:08:06 -0000 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 > > To: adr , 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 > > > > 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