PERFORCE change 154123 for review
Marius Strobl
marius at alchemy.franken.de
Fri Dec 5 18:23:31 PST 2008
On Fri, Dec 05, 2008 at 05:54:53PM +0000, Nathan Whitehorn wrote:
> http://perforce.freebsd.org/chv.cgi?CH=154123
>
> Change 154123 by nwhitehorn at nwhitehorn_trantor on 2008/12/05 17:54:14
>
> Expand the OFW PCI probing routines to do a regular PCI probe in
> addtion to asking the firmware. There can be devices even in Apple
> hardware that are not listed in the devtree (grackle_hb, for instance)
> and this also sets the stage for FDT support. Also add some
> pretty-printing of name and compat properties to the devinfo output.
>
> This commit also, and more importantly, fixes X11 on my Blue & White
> G3. Apparently X barfs if the OS's list of PCI devices doesn't match
> the ones that it finds? Unclear.
>
> MFp4: RSN
>
> Affected files ...
>
> .. //depot/projects/ppc-g5/sys/dev/ofw/ofw_bus_subr.c#4 edit
> .. //depot/projects/ppc-g5/sys/dev/ofw/ofw_bus_subr.h#3 edit
> .. //depot/projects/ppc-g5/sys/powerpc/ofw/ofw_pcibus.c#5 edit
> .. //depot/projects/ppc-g5/sys/powerpc/powermac/macio.c#6 edit
>
> Differences ...
>
> ==== //depot/projects/ppc-g5/sys/dev/ofw/ofw_bus_subr.c#4 (text+ko) ====
>
> @@ -34,7 +34,9 @@
> #include <sys/systm.h>
> #include <sys/bus.h>
> #include <sys/errno.h>
> +#include <sys/libkern.h>
>
> +#include <dev/ofw/ofw_bus.h>
> #include <dev/ofw/ofw_bus_subr.h>
> #include <dev/ofw/openfirm.h>
>
> @@ -72,6 +74,18 @@
> free(obd->obd_type, M_OFWPROP);
> }
>
> +int
> +ofw_bus_gen_child_location_str(device_t cbdev, device_t child, char *buf,
> + size_t buflen)
> +{
> + strlcat(buf, "name=", buflen);
> + strlcat(buf, ofw_bus_get_name(child), buflen);
> +
> + strlcat(buf, " compat=", buflen);
> + strlcat(buf, ofw_bus_get_compat(child), buflen);
> +
> + return (0);
> +};
>
IMO a bus_child_pnpinfo_str method would be way more appropriate
for this kind of information as it doesn't refer to an address,
physical location, etc.
Marius
More information about the p4-projects
mailing list