Managing and Developing Dynamically Loadable Kernel Modules
Managing and Developing Dynamically Loadable Kernel Modules
Developing Dynamically Loadable Kernel Modules
Chapter 12 525
Developing Dynamically Loadable Kernel
Modules
This section explains the process ofwriting modules in the DLKM format
and provides background information specific to device driver
development. It focuses on the writing and installation of loadable device
drivers because they constitute the majority of supported DLKM
modules for HP-UX 11.0 and later releases.
This section is intended primarily for programmers who want to write
DLKM modules and/or convert existing static (non-loadable) modules to
the DLKM format. It is assumed that the reader has a good
understanding of the HP-UX operating system, the C programming
language, and the writing and testing of static device drivers.
Since kernel modules written to the DLKM specification can either be
configured as dynamically loadable or statically linked, device driver
developers must write their DLKM modules to accommodate either
configuration.
Writing modules in the DLKM format requires writing additional
module initialization code called wrapper code, which enables the DLKM
infrastructure to logically connect and disconnect a loadable module to
and from the running kernel. Existing traditional device drivers that are
going to be configured into the system as loadable modules must be
converted to the DLKM format, and must be re-packaged according to
the module packaging architecture introduced in HP-UX 11.0.
NOTE For Itanium-based systems, boot time loading during phase BOOT1 is
available for miscellaneous modules only. For phase BOOT2, other
supported module types such as WSIO and Streams drivers may be
loaded.
This section covers the following topics:
❏ “Overview of Boot Time Loading” on page 526 explains the use of
loadable modules during the boot sequence.
❏ “Module Component Files” on page 529 identifies and describes the
file set that makes up a DLKM, which consists of the module’s object