From owner-freebsd-hackers@FreeBSD.ORG Tue May 30 14:55:29 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 3D38B16A6D7 for ; Tue, 30 May 2006 14:55:29 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8234B43D4C for ; Tue, 30 May 2006 14:55:28 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.14] (imini.samsco.home [192.168.254.14]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k4UEtKoE078146; Tue, 30 May 2006 08:55:26 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <447C5CDC.8060102@samsco.org> Date: Tue, 30 May 2006 08:55:24 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.7) Gecko/20050416 X-Accept-Language: en-us, en MIME-Version: 1.0 To: william wallace References: <20060524153153.GF49081@funkthat.com> <87ab37ab0605280309s15a31cb4yc8a54be1af5472dd@mail.gmail.com> <87ab37ab0605300642ja608c97s24836a317cdac24@mail.gmail.com> <20060530.075818.-820706528.imp@bsdimp.com> <447C548C.4080302@samsco.org> <87ab37ab0605300742h14493096gbf8cb05e72bacd74@mail.gmail.com> In-Reply-To: <87ab37ab0605300742h14493096gbf8cb05e72bacd74@mail.gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: freebsd-hackers@freebsd.org, John-Mark Gurney Subject: Re: misc questions about the device&driver arch 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: Tue, 30 May 2006 14:55:32 -0000 william wallace wrote: > On 5/30/06, Scott Long wrote: > >> M. Warner Losh wrote: >> > : THIRD >> > : Because the PCIE configure space is 4k long ,shall we change the >> > : #define PCI_REGMAX 255 >> > : to facilitate the PCI express config R/W? >> > >> > Maybe. Lemme investigate because PCIe changes this from a well known >> > constant for all pci busses, to a variable one... >> > >> > Warner >> >> When I added PCIe extended config support, I never took into >> consderation the userland access point of view. Changing this >> definition to 4096 might Just Work, and it might Not Work. Dunno. >> In the 18 months since I implemented it, no other person has asked >> about userland access. Other than the silly case of people trying >> to write device drivers in PERL, I'm not sure how much value it >> gives compared to the stability and security risk it imposes. >> >> Scott >> >> > I have to clarify my intentions that i am not TRYing to do a userland > PCI express driver . I just want to make a interesting branch whitch > can do pci express native Hot plug and hot remove ,with Mr Losh and > other gentlemen's help ,i am making progress ,and now a loadable > module is finishing . > I have borrowed many Ideas from Linux ,but several fatal difficulties > paused me ,with the PCI_REGMAX included. > wish to hear from u :) thank u! > The PCI_REGMAX definition is not used by the extended configuration space code. However, this code only exists on i386 right now. I haven't gotten around to implementing it on amd64 yet. Implementing it there is not just a trivial change of the defintion. Some platform specific memory map tricks need to be done. It would be possible to port the i386 code wholesale, but that code is not terribly efficient on the amd64 platform. So, what problem are you running into? Scott