From owner-freebsd-arch@FreeBSD.ORG Tue Jun 18 15:25:52 2013 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 353EA4A4 for ; Tue, 18 Jun 2013 15:25:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) by mx1.freebsd.org (Postfix) with ESMTP id 0823410E8 for ; Tue, 18 Jun 2013 15:25:51 +0000 (UTC) Received: by mail-ie0-f174.google.com with SMTP id 9so10221598iec.19 for ; Tue, 18 Jun 2013 08:25:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=nkcL2W9l6zOtY5Zsf2Pld7t6HtfW12P12fXuIgSAMNw=; b=kJhscJGjMD0oVKV2ZLqm9UbrD2V2vilN4iko6s3Sa+36AC8E+n+24QJlNrlFttVUBI uvupHUDLAgEF2mHwc0Gqd2OwrmcAXP16XXIsuGCBZ3nYW+KovjBAYOiFqxRlKdLCKnkI nas/y1fytL8/E8ySlO1PTv7WW/2qQ7w72VJHVSvRKdXZTgCnlCPH88u4eAY3NAKWW4sw IdzwNOeFKG58/Unolru+IFvKPB9hNrWOeAYRWCriRpCMOqXHg05gTfGlr8hsIgm2Hzc1 x9kG8RKUY5J007E0+LzjJls+BrATqQjyMWguB1Z7jxX9+HP6s8DWmpHILc/HoWs7ynS0 zflQ== X-Received: by 10.50.111.129 with SMTP id ii1mr7931623igb.47.1371569151677; Tue, 18 Jun 2013 08:25:51 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id wn10sm1492121igb.2.2013.06.18.08.25.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Jun 2013 08:25:49 -0700 (PDT) Sender: Warner Losh Subject: Re: Bus space routines Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <51C07A2F.3060504@FreeBSD.org> Date: Tue, 18 Jun 2013 09:25:47 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <51C0345E.4000309@freebsd.org> <20130618111351.GA43938@alchemy.franken.de> <51C07A2F.3060504@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQlw0QS2TngbWH3ltGRx6R8RLa1E4yzLOhM/Q4J6UVEGEEI5sSNAkOa6obp13GDkO8+3zLES Cc: arch@FreeBSD.org, Niclas Zeising , Marius Strobl X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 15:25:52 -0000 On Jun 18, 2013, at 9:18 AM, Andriy Gapon wrote: > on 18/06/2013 14:13 Marius Strobl said the following: >> What we really need is a proper interface allowing userland to access >> PCI I/O and memory registers, f. e. via /dev/pci, and for = libpciaccess >> to build upon that, i. e. essentially the same as things work on/with >> Linux and /sys/bus/pci/device. As a side-effect this then also = permits >> to properly sanity check PCI accesses from userland within the = kernel. >=20 > We have this pciconf utility (in base), which can read PCI config = registers (and > more). Apparently it uses some ioctl interface of /dev/pci. > Is this the interface that you had in mind or does it lack some = required capabilities? It reads config space registers. This thread is about memory and/or I/O = spaces that are mapped via BARs on the device. We have no generic = interface to do that (although adding a memory mapped one for memory = BARs wouldn't be hard). Warner