From owner-cvs-all Mon Aug 26 10:55:50 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6728937B400; Mon, 26 Aug 2002 10:55:43 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B0E443E4A; Mon, 26 Aug 2002 10:55:43 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from freefall.freebsd.org (jhb@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7QHtgJU083690; Mon, 26 Aug 2002 10:55:42 -0700 (PDT) (envelope-from jhb@freefall.freebsd.org) Received: (from jhb@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7QHtgNg083689; Mon, 26 Aug 2002 10:55:42 -0700 (PDT) Message-Id: <200208261755.g7QHtgNg083689@freefall.freebsd.org> From: John Baldwin <jhb@FreeBSD.org> Date: Mon, 26 Aug 2002 10:55:42 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/acpica acpi_pci.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: <cvs-all.FreeBSD.ORG> List-Archive: <http://docs.freebsd.org/mail/> (Web Archive) List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions) List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20cvs-all> List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20cvs-all> X-Loop: FreeBSD.ORG jhb 2002/08/26 10:55:42 PDT Added files: sys/dev/acpica acpi_pci.c Log: Add an ACPI PCI bus driver that is a subclass of the generic PCI bus driver. This driver overrides the probe, attach, and read_ivar methods. If the parent bridge is an ACPI PCI bridge, then the probe routine will match, otherwise it will fail. It tests this by seeing if it can get the ACPI_HANDLE ivar from the bridge device. In the attach routine, it uses pci_add_children() to add all the child devices (but with a slightly larger ivar so it can store ACPI_HANDLE's for child devices) and then walks through the ACPI namespace below the bus device to cache ACPI_HANDLE's for all child devices present in the namespace. It does this by comparing the pci slot and function to the address encoded in _ADR of the devices in the ACPI namespace. The read_ivar routine passes most requests off to pci_read_ivar() and adds a new request so that the ACPI_HANDLE for a child device can be read. To add proper power support the power methods can be overridden as well, but that is not currently implemented. Also, there are cases where a device may show in the ACPI namespace as a PCI device that the PCI probe does not find. Currently such devices are ignored. Tested on: i386, ia64 Revision Changes Path 1.1 +235 -0 src/sys/dev/acpica/acpi_pci.c (new) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message