From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 7 19:13:45 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A6A1416FF52 for ; Wed, 7 Jun 2006 16:52:50 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF24E43D48 for ; Wed, 7 Jun 2006 16:52:49 +0000 (GMT) (envelope-from avg@icyb.net.ua) Received: from [212.40.38.87] (oddity-e.topspin.kiev.ua [212.40.38.87]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA18512 for ; Wed, 07 Jun 2006 19:52:48 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4487045F.4000301@icyb.net.ua> Date: Wed, 07 Jun 2006 19:52:47 +0300 From: Andriy Gapon User-Agent: Thunderbird 1.5.0.2 (X11/20060512) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 07 Jun 2006 19:25:18 +0000 Subject: working with PCI config registers (extensively) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2006 19:13:46 -0000 I am writing a driver for some PCI hardware that does not have any IO ports or IO memory (and thus does not have any useful BARs), but rather it is controlled and communicated with by writes and reads of certain vendor-specific PCI configuration registers. I see that I can use pci_read_config() and pci_write_config() to do this, but I am not sure if there are any caveats that I should be aware of, any precautions that I should take and any conventions/rules that I should follow. To explain my question - I am concerned about PCI configuration space resources ownership, concurrency, etc. Basically things that should not matter in practice :-) -- Andriy Gapon