Date: Fri, 7 Mar 2008 15:49:46 -0500 From: John Baldwin <jhb@FreeBSD.org> To: arch@FreeBSD.org Subject: Change the x86 nexus to support different drivers for different platforms Message-ID: <200803071549.46730.jhb@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
Right now the two x86 platforms (i386 and amd64) support two different platforms (ACPI vs. legacy) via some rather hackish code (legacy checks for an acpi0 device in its probe routine, etc.). This makes it harder for 3rd parties to add support for proprietary platforms (such as for some embedded x86 appliances that run FreeBSD). This patch attempts to address this by allowing different platforms to provide their own nexus driver. The platform will do its probe in the nexus probe routine and then add suitable platform devices under its nexus device. One side effect of this change is that on x86 any devices that attach to directly to the nexus must be platform independent (this is already true) if they use identify routines. So the changes involved are to make the default nexus driver return BUS_PROBE_GENERIC and for it to explicitly add a legacy0 device in its attach routine (legacy no longer uses a normal identify routine). The ACPI platform now uses a custom nexus driver (which inherits from the default) in acpi_machdep.c which checks for ACPI in its probe routine and explicitly adds acpi0 in its attach routine. The ACPI bus driver no longer uses a standard acpi_identify routine, but instead exports a public 'acpi_identify()' function which serves as a probe routine for the MD nexus drivers to use. It might be nice, btw to possibly make other x86 platforms (such as xbox perhaps?) use their own nexus driver, but that can happen as a followup change later. Patch is at http://www.FreeBSD.org/~jhb/patches/acpi_nexus_cvs.patch -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803071549.46730.jhb>