Managing and Developing Dynamically Loadable Kernel Modules

Managing and Developing Dynamically Loadable Kernel Modules
Developing Dynamically Loadable Kernel Modules
Chapter 12528
Module dependency
If a module requires another module in order to work properly, you can
specify a dependency between them. The module loader attempts to load
all the dependent modules when it finds dependencies during loading of
a module. This module dependency mechanism is also applicable to Boot
Time Loading.
For the system to work properly, the module developer or system
administrator needs to exercise care in determining the configured
loading phase and the supported loading phase of modules. A module
without BOOT1 or BOOT2 specified in its supported loading phase would
not be registered during boot phase 1 or boot phase 2. Such modules
cannot be loaded in those phases even if they are defined as dependents
of other boot-time-loaded modules. A module loading failure in boot time
may be critical for your system if the failed module provides essential
functionality for your system (i.e., SCSI disk driver).
If there is a possibility that the module will be referred to as a dependent
during boot time, then the module must include BOOT1 or BOOT2 in the
supported loading phase specification.
Module Registration
All modules that have BOOT1 in their supported loading phase
specification are registered in system boot phase 1. All other modules are
registered during boot phase 2, regardless of the values specified in their
supported loading phase.
NOTE Only miscellaneous modules (MISC) can be registered during boot phase
1 on Itanium-based systems. Other DLKM types supportedin HP-UX 11i
Version 1.5 will not work properly in early boot. When their type-specific
registration is performed, the needed functionality will not be available
during the early phases of booting, (i.e., streams, wsio, etc.).
Module Loading
A module having a configured loading phase of BOOT1 will be loaded just
after DLKM has initialized in boot phase 1. This is later than
initialization steps for spinlocks and the primitive memory allocation
method used by boot phase 1, but prior to beginning I/O initialization.