Subject: Re: probe/attach questions
To: None <tb90@mail.csuchico.edu>
From: Ben Harris <bjh21@netbsd.org>
List: tech-kern
Date: 04/13/2001 13:01:35
In article <3AD630BE.DCFE30F6@mail.csuchico.edu> you write:
>I'm working on moving a driver(ppc) from FreeBSD to NetBSD, however, the
>autoconf framework is different and I've got a few questions about how
>NetBSD handles things.  As the FreeBSD code stands the probe function
>has access to the FreeBSD version of the softc structure.  The probe
>function then investigates the hardware checking for supported modes and
>such, in the process it puts all of the relevant information it finds
>into this softc-like structure.  Then when attach is called, if hardware
>is found, attach uses this structure to configure and attach the
>device.  I'm wondering how to move information between the probe and
>attach functions of a device under NetBSD, is the softc structure
>allocated by autoconf after probe?

Yes.

> Also, it kinda seems like under
>NetBSD's autoconf framework the probe function really shouldn't be
>saving any information for later but is should just be working to
>determine if the hardware is present or not, the perhaps the attach
>function should be doing the probing for the modes and such?

That's correct, yes.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/arm26               <URL:http://www.netbsd.org/Ports/arm26/>