[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

Next, most resident system modules (for example graphics) are initialized.
As part of the system initialization procedure a search is made of the
expansion.library's private list of boards (which contains a ConfigDev
structure for each of the AUTOCONFIG hardware boards). If the cd_Flags
specify CONFIGME and the er_Type specifies DIAGVALID, the system
initialization will do three things:

First, it will set the current ConfigDev as the current binding (see the
expansion.library SetCurrentBinding() function).  Second, it will check
the DiagArea's da_Config flag to make sure that the CONFIGTIME bit is set.
Third, it will search the ROM "image" associated with this hardware board
for a valid Resident structure (<exec/resident.h>); and, if one is
located, will call InitResident() on it, passing a NULL segment list
pointer as part of the call.

Next, the board's device driver is initialized.  The Resident structure
associated with this board's device driver (which has now been patched by
the ROM/diagnostic routine) should follow standard system conventions in
initializing the device driver provided in the boot ROMs.  This driver
should obtain the address of its associated ConfigDev structure via
GetCurrentBinding().

Once the driver is initialized, it is responsible for some further steps.
It must clear the CONFIGME bit in the cd_Flags of its ConfigDev structure,
so that the system knows not to configure this device again if binddrivers
is run after bootstrap.  Also, though it is not currently mandatory, the
driver should place a pointer to its Exec node in the cd_Driver field of
the ConfigDev structure.  This will generally be a device (NT_DEVICE)
node.  And for this device to be bootable, the driver must create a
BootNode structure, and link this BootNode onto the expansion.library's
eb_MountList.

The BootNode structure (see <libraries/expansionbase.h>) contains a Node
of the new type NT_BOOTNODE (see <exec/nodes.h>).  The driver must
initialize the ln_Name field to point to the ConfigDev structure which it
has obtained via the GetCurrentBinding() call.  The bn_Flags subfield is
currently unused and should be initialized to NULL.  The bn_DeviceNode
must be initialized to point to the DosNode for the device.

When the DOS is initialized later, it will attempt to boot from the first
BootNode on the eb_MountList.  The eb_MountList is a priority sorted List,
with nodes of the highest priority at the head of the List.  For this
reason, the device driver must enqueue a BootNode onto the list using the
Exec library function Enqueue().

In the case of an autoboot of AmigaDOS, the BootNode must be linked to a
DeviceNode of the AmigaDOS type (see <libraries/filehandler.h>), which the
driver can create via the expansion library MakeDosNode() function call.
When the DOS "wakes up", it will attempt to boot from this DeviceNode.