Specifications

Red Hat Enterprise Linux to Oracle Solaris Porting Guide
58
Chapter 6 Migrating the Device Drivers and
Kernel
Device driver software is tightly coupled to the operating system it is running on. In order to develop a
device driver, you need to have a thorough knowledge of the operating system architecture and
internals. While writing the device drivers, the operating system (kernel) interfaces that your driver will
use to access the hardware must be well studied. In Oracle Solaris, the set of driver interfaces that
device drivers must use while communicating with the operating system and vice versa are called the
Device Driver Interfaces (DDI) and Driver-Kernel Interfaces (DKI), and they are well documented
and published on Oracle’s Website.
A list of data structures that can be used to share the information between device drivers and kernel on
Oracle Solaris 11 is available at http://docs.oracle.com/cd/E23824_01/html/821-1478/index.html
.
Entry-point routines, their syntax, specification and return values are also documented:
Kernel to the device driver interfaces: http://docs.oracle.com/cd/E23824_01/html/821-
1476/index.html
Device driver to kernel interfaces:http://docs.oracle.com/cd/E23824_01/html/821-
1477/index.html
The DDI and DKI are intended to standardize and document all interfaces between device drivers and
the rest of the kernel.
Instead of going into details about DDI and DKI, this document will describe various issues,
precautions, and platform-specific differences that developers must consider during migration from
RHEL to Oracle Solaris 11.
Migrating Kernel Modules and Device Drivers
Platform-specific differences in system administration commands for device drivers and kernel
modules are shown in Table 6-1. Entry points and implementation differences are shown in Table 6.2.
TABLE 6-1. INFRASTRUCTURE DIFFERENCES
RHEL ORACLE SOLARIS 11
In Linux, kernel modules and device drivers are treated same.
Both of them can be added using modprobe command
In Oracle Solaris, different sets of commands needs to be used
to load kernel modules and device driver.
Kernel modules are loaded using modload command.
Device drivers can be added using add_drv command