[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.