Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Configuring a System
Reconfiguring the Kernel (Prior to HP-UX 11i Version 2)
Chapter 3298
kernel to resolve references to the absent module’s functions.
Configuring a module that uses stubs requires a full kernel build so that
the stubs can be statically linked to the kernel.
Modstub.o contains stubs for entry points defined in the associated
loadable module that can be referenced by other statically configured
kernel modules currently configured in the system. Access to a stub
causes the kernel to auto load the associated loadable module.
space.h File
Definition
An optional component, the space.h file contains storage allocations and
initialization of data structures associated with a DLKM module when
the size or initial value of the data structures depend on configurable
values such as tunable parameters. In order to communicate these values
to the rest of the DLKM module, the values are stored in global variables
and accessed by the module via external declarations in the module’s
mod.o file.
NOTE All tunable parameters specified in the master file are defined as global
variables in the space.h file.
STREAMS Drivers Initialization of STREAMS drivers is very similar for both the loadable
and statically configured module cases. The only difference is that
loadable drivers must use the drv_info_t structure that is passed as an
argument to the _load() function.
STREAMS drivers, like WSIO class drivers, automatically track open()
and close() system calls for the STREAMS device. The system will
prevent a STREAMS driver from unloading whenever the device has one
or more open file handles. Of course, the driver can still disallow an
unload if this check is insufficient for its needs.
Miscellaneous
Modules
Miscellaneous modules can implement any feature within the kernel. As
such, a miscellaneous module's _load() function must address all of the
module's specific needs. Similarly, the module's _unload() function must
determine for itself if it is safe to unload. The system will not allow a
module to be unloaded if other loaded modules are dependent upon the
module. Other than this check, the system performs no other checks
when the administrator attempts to remove a miscellaneous module
from the kernel.