Device drivers

In POK, device drivers are executed in partitions. It means that you must embedds your code in partitions and drivers are isolated in terms of time and space. Consequently, drivers rely on the kernel to gain access to hardware resources (I/O, DMA and so on).

To do that, AADL components are considered as partitions. So, when your model contains an AADL device, the underlying code generator consider that it is a partition. So, you have to associate device components with virtual processor components to indicate the partition runtime of your driver.

However, the device driver cannot describe the actual implementation of the driver. For that, we use the Implemented_As property. This property points to an abstract component that contains the implementation of our driver. Annexes of the current document provide an example of the modeling of a driver (see section ): the driver_rtl8029 abstract component models the driver by defining a process that contains threads. These threads handle the device and perform function calls to access to hardware resources.

However, for each device, POK must know which device you are actually using. So, you have to specify the POK::Device_Name property. It is just a string that indicate which device driver you are using with this device component.

In addition, for network device that represent ethernet buses, you must specify the hardware address (also known as the MAC address). For that, we have the property POK::Hw_Addr. This property must be associated with a device component.



Subsections
Copyright 2009 POK Team