Thursday, January 22, 2015

SYMBIAN DEVICE DRIVER CONCEPTS (LDD & PDD)

Device Drivers: (Device Driver Concepts in Symbian)
The role of device drivers is to give a user side-application access to peripheral resources without exposing the operation of the underlying hardware. Device drivers are dynamically loaded kernel dll that are loaded in to the kernel process after the kernel booted (either by user request are by another layer of the OS).
Device driver archtecture:
The symbian OS device drivers model used two types of kernel dll, The Logical Device Driver and the physical device driver


Logical Device Drivers: The LDD contains functionality that is common to a specific class of device. Designed to perform generic functionality. LDD are dynamically loaded from user side code, but they perform some initialization at boot time. user-side code communicates with an LDD via a simple interface class, derived from RBusLogicalChannel which presents well defied driver specific API. (Note: different type of LDD headset, charger & USB which performs generic functionality, But the interface used for all these LDD are same so there can be one PDD).
Physical Device Drivers: The physical device driver is an optional component, which contains functionality that is specific to a particular member of the class of device supported by the LDD. The PDD controls a particular peripheral on behalf of it’s LDD. It is may not be directly accessible from user side application. The role of the PDD to communicate with the variant, an extension, or the hardware inself, on behalf of the LDD.
Extension(Kernel): Extension’s are merely special device drivers that are loaded automatically at kernel boot. After initializing the variant and ASSP extentions (ASSP/Variant), the kernel continues to boot until It starts the scheduler and enter the supervisory thread which initialize all the remaining kernel extentions. At this point all the kernel services such as scheduling, memory managment, object creation, timer and basic peripheral resources interupt controller and other ASSP/variant functionality are available for user. Extension are loaded at this stage, are not critical for the operation of kernel itself, but are typically used to perfrom early initialzation of hardware component.
HAL: Provides standard device specific interface to user side code. This HAL is used by extension and device . Symbian OS defines a set of hardware and information services via HAL interface. HAL functions are simple get/set interface and are used by both kernel and user code.
Device Driver classes:(EKA2 Device Driver Framework)
The shaded boxex indicate classes that must be implemented by the device driver
Two components make up the logical device driver (LDD) - the LDD factory (Derived from DLogicalDevice) and the logical channel (derived from DLogicalChannelBase). The LDD factory is responsible for creating an instance of the logical channel. The LDD channel contains the functionalty that is common to specific class of device. A user-side application communicates with the logical channel via a handle to the logical channel (RBusLogicalChannel).
Similarly, two components make up the physical device driver(PDD) – the PDD factory (derived from DPhysicalDevice) andthe physical channel (derived from DBase). the physical channel is responsible for communicatingwith the underlying hardware on behalf of the more generic logicalchannel. The physical channel exists purely to provide functionality tothe logical channel, so is not directly accessible from the user side.

0 comments:

Post a Comment