Writing Device Drivers

moddebug

moddebug is a kernel variable that controls the module loading process. The possible values are:

0x80000000

Prints messages to the console when loading or unloading modules 

0x40000000

Gives more detailed error messages 

0x20000000

Prints more detail when loading or unloading (such as including the address and size) 

0x00001000

No auto-unloading drivers: the system will not attempt to unload the device driver when the system resources become low 

0x00000080

No auto-unloading streams: the system will not attempt to unload the streams module when the system resources become low 

0x00000010

No auto-unloading of kernel modules of any type 

0x00000001

If running with kadb, moddebug causes a breakpoint to be executed and a return to kadb immediately before each module's _init(9E) routine is called. Also generates additional debug messages when the module's _info and _fini routines are executed.