From owner-freebsd-arch@FreeBSD.ORG Tue Jan 27 02:21:46 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DACE16A4CE; Tue, 27 Jan 2004 02:21:46 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 882AD43D5D; Tue, 27 Jan 2004 02:21:42 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id i0RALfET090037; Tue, 27 Jan 2004 03:21:41 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 27 Jan 2004 03:21:19 -0700 (MST) Message-Id: <20040127.032119.28084825.imp@bsdimp.com> To: msmith@freebsd.org From: "M. Warner Losh" In-Reply-To: References: <20040126.181720.15264443.imp@bsdimp.com> <20040126191657.B31071@root.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: arch@freebsd.org cc: nate@root.org Subject: Re: newbus ioport usage X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2004 10:21:46 -0000 In message: Mike Smith writes: : The whole reason for the sysresource device was to have something : sitting on resources that the AML said had "something" behind them : so that they didn't get handed out to devices on eg. PCI. If you're : in the same sort of scope as the sysresource device, it's fair to : say that you know more than eg. the PCI bus resource code does about : whether you can use the resource in question. Yes. It is a form of resource enumeration that belongs to ACPI. Therefore, ACPI should manage it and dole it out to its children which are based on the AML. That's what it is there for. It is akin to the PCI code assigning resources based on the BARs that a child has. However, only akin, because the entire resource space is enumerated in the bus, not the children, for ACPI. The sysresource stuff was a means to an end, not the only way to that end. I'm starting to think that the right way to go is to reserve EVERYTHING up front, and then have all the acpi_foo devices allocate out of that reserveation. In this way it is similar to a BAR that has been assigned by the BIOS, but isn't allocated by a child device on pci. In the code I'm working on, those resources are reserved at the bus level and given to the child if it asks for it later. Well, it is a little more complex than that because the child device actually owns the resource, but the bus is who assigns ownership. In ACPI, since the resource maps aren't child specific, the ownership should resided in the bus layer. So instead of belonging to acpi_sysresource0, it would belong to acpi0. This may also help some downstream resource allocations, since they would now be happening a little earlier in the game. Warner