Subject: probe/attach questions
To: None <tech-kern@netbsd.org>
From: Tyrel Beede <tb90@mail.csuchico.edu>
List: tech-kern
Date: 04/12/2001 15:48:30
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?  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?  However, I
could use a some advice and/or some source to reference for the proper
solution.

Thanks
Tyrel