The Portable Diagnostic Kernel Extension (PDIAGEX) is designed to allow a user-level application to exercise or test a device without requiring specialized diagnostic code to be added to the device driver. PDIAGEX is loaded and bound into the kernel by the Diagnostic Controller before the application is invoked.
PDIAGEX provides system calls for reading and writing device registers, performing Direct Memory Access (DMA), and handling interrupts.
To use P>DIAGEX for exercising a device, make the device unavailable to the rest of the system by invoking device methods to move the device from the DEFINED or AVAILABLE state to the DIAGNOSE state. Once the device is in the DIAGNOSE state, the device may be exercised using PDIAGEX. This is accomplished by using the libpdiag.a call pdiag_diagnose_state.
Applications using PDIAGEX must be linked with the pdiagex.exp file specified as an import file.