From owner-freebsd-current Mon Oct 18 0:36:27 1999 Delivered-To: freebsd-current@freebsd.org Received: from mgo.iij.ad.jp (mgo.iij.ad.jp [202.232.15.6]) by hub.freebsd.org (Postfix) with ESMTP id 3965A14EA1 for ; Mon, 18 Oct 1999 00:35:50 -0700 (PDT) (envelope-from shigeru@iij.ad.jp) Received: from ns.iij.ad.jp (root@ns.iij.ad.jp [192.168.2.8]) by mgo.iij.ad.jp (8.8.8/MGO1.0) with ESMTP id QAA04622 for ; Mon, 18 Oct 1999 16:35:43 +0900 (JST) Received: from fs.iij.ad.jp (root@fs.iij.ad.jp [192.168.2.9]) by ns.iij.ad.jp (8.8.5/3.5Wpl7) with ESMTP id QAA19592 for ; Mon, 18 Oct 1999 16:35:43 +0900 (JST) Received: from mercury.iij.ad.jp (mercury.iij.ad.jp [192.168.4.89]) by fs.iij.ad.jp (8.8.5/3.5Wpl7) with ESMTP id QAA21716 for ; Mon, 18 Oct 1999 16:35:43 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by mercury.iij.ad.jp (8.8.5/3.5W) with ESMTP id QAA12624 for ; Mon, 18 Oct 1999 16:35:42 +0900 (JST) To: current@freebsd.org Subject: how to allocate a resource at new-bus architecture? X-Mailer: Mew version 1.93b38 on XEmacs 21.2 (Aeolus) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19991018163541T.shigeru@iij.ad.jp> Date: Mon, 18 Oct 1999 16:35:41 +0900 From: YAMAMOTO Shigeru X-Dispatcher: imput version 980522 Lines: 34 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, all. I have a question about a resource allocation at a child device of PCI device. I'm thinking about to write a CardBud device driver. CardBus is attached at PCI bus. So I think CardBus is a child device of PCI device. Before revision 1.122 of @src/sys/pci/pci.c, I can allocate a resouce when I set rid 0 and call bus_alloc_resource(). CardBus driver is a child of PCI driver, so bus_alloc_resource(), called at CardBus driver, call pci_alloc_resource(). When rid == 0, pci_alloc_resource() call an resource allocation method of parent bus. But revision 1.122 or later, pci_alloc_resource() was rewritten very simply. pci_alloc_resource() only call resource_list_alloc() and resource_list_alloc() returns 0 when requested resource is not registered nor reserved. It seems me new PCI driver assume all resources are assigned by BIOS. But a BIOS of my notebood, VAIO 818/Phoenix BIOS, does not assign a resource for a CardBus socket/ExCA base address register. #of cource, I set a BIOS as 'Plug & Play O/S: No'. I can't allocate a resource using bus_alloc_resource(). How to allocate a resource for a device which resources are not assigned by BIOS? What is a right way to allocate a resource in a new-bus device driver? Thanks, ------- YAMAMOTO Shigeru Internet Initiative Japan Inc. Network Engineering Div. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message