From owner-freebsd-drivers@FreeBSD.ORG Fri Dec 28 22:39:17 2007 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28B9416A419 for ; Fri, 28 Dec 2007 22:39:17 +0000 (UTC) (envelope-from kosio.dimitrov@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.184]) by mx1.freebsd.org (Postfix) with ESMTP id C8F4113C448 for ; Fri, 28 Dec 2007 22:39:16 +0000 (UTC) (envelope-from kosio.dimitrov@gmail.com) Received: by fk-out-0910.google.com with SMTP id b27so5544560fka.11 for ; Fri, 28 Dec 2007 14:39:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=XKUZGBDonIImcgmee0XG1NrO+fTdC2HgJc7Y78Y1gbE=; b=RUZgj4Ej3T9W/msE+7UQBeGGui7vKqspuWUaNY+YaqDpWIbJSYXubumK3iP61MlsmxccAI4XpoCK9AVrn+rIV7gtC3V354thI0ziL1x6YniyC4Y0iKja0nmYBe4SNpKY6kGDwyzSzxgVqgr+CXJ0S6v7t58sgUFCYriFyKdoLDA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KnG7YKNJP//58K7SQrOkiR6AkiLaFFHYGA4WyLKa3hflsMGyCxuqIaMhM44vZNQchRwzahFkLUQjwzQyFrew5MZ9Za8mwJRsbbvbK+TljpeR9RWEO6U9cTqF2OVQjJK8qhingDpaEYp6GQw7hMq7XaLCRhJ7IHxfBXwvHNnW/K4= Received: by 10.82.134.12 with SMTP id h12mr17552334bud.29.1198881555223; Fri, 28 Dec 2007 14:39:15 -0800 (PST) Received: by 10.82.166.16 with HTTP; Fri, 28 Dec 2007 14:39:15 -0800 (PST) Message-ID: <8103ad500712281439h513c288cke761a0ee45c42f18@mail.gmail.com> Date: Sat, 29 Dec 2007 00:39:15 +0200 From: "Konstantin Dimitrov" To: "John Baldwin" In-Reply-To: <200712281304.47922.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8103ad500712270516l5db13e1ao388835d01fd19fc3@mail.gmail.com> <200712281304.47922.jhb@freebsd.org> Cc: freebsd-drivers@freebsd.org Subject: Re: PEX 8111 PCI-Express to PCI Bridge and FreeBSD X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2007 22:39:17 -0000 On Dec 28, 2007 8:04 PM, John Baldwin wrote: > On Thursday 27 December 2007 08:16:59 am Konstantin Dimitrov wrote: > > hello All, > > > > as far as i understand the documentation of the PEX 8111 PCI > > Express-to-PCI Bridge, which is freely available here: > > > > http://www.plxtech.com/products/expresslane/pex8111.asp > > > > it is "Fully Transparent PCI Express to PCI Bridge", but under FreeBSD > > it doesn't seem to behave as transparent, i.e. it doesn't seem to work > > well with the standard FreeBSD PCI-PCI bridge driver, because it's not > > possible to read/write from/to the PCI IC behind PEX 8111. > > Can you provide more detail on what you mean by read/write? Can you not do > config space transactions to child devices of the bridge or can you not > access mapped BARs of child devices or what exactly? i can access the PCI configuration registers of the child device (Envy24HT) connected to the bridge (PEX 8111): # pciconf -lv ................. pcib5@pci0:4:0:0: class=0x060400 card=0x00000000 chip=0x811110b5 rev=0x21 hdr=0x01 vendor = 'PLX Technology Inc.' device = 'PEX 8111 PCI Express-to-PCI Bridge' class = bridge subclass = PCI-PCI none1@pci0:5:4:0: class=0x040100 card=0x41543138 chip=0x17241412 rev=0x01 hdr=0x00 vendor = 'VIA Technologies Inc (Was: IC Ensemble Inc)' device = 'VT1720/24 Envy24PT/HT PCI Multi-Channel Audio Controller' class = multimedia subclass = audio and i can read them: # pciconf -r pci0:5:4:0: 0:31 17241412 02100005 04010001 00002000 0000a001 0000a401 00000000 00000000 and write to them: # pciconf -w pci0:5:4:0 0x04 0x04 # pciconf -r pci0:5:4:0: 0:31 17241412 02100004 04010001 00002000 0000a001 0000a401 00000000 00000000 and all those values are the correct values for the child device, but i can't access mapped BARs of the child device, the code that i'm testing with is very simple: http://xkodi.svobodno.com/xkodi/xkodi.c http://xkodi.svobodno.com/xkodi/xkodi.h http://xkodi.svobodno.com/xkodi/Makefile and works if the child (Envy24HT) is connected directly (without the PEX 8111 bridge) to the PCI bus. > > -- > John Baldwin >