Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
?
EE Times-Asia > Embedded
?
?
Embedded??

Device tree partitioning for embedded software design

Posted: 26 Nov 2014 ?? ?Print Version ?Bookmark and Share

Keywords:Symmetric multi-processing? OS? multi-core processing? Flattened device trees? partitioning?

Performance, security, portability, and software consolidation on a single platform are key factors driving the demand of multi-OS multi-core designs in many embedded market segments, including industrial/medical, mobile, and automotive. Broadly speaking, these designs can be categorised as homogeneous or heterogeneous computing domains.

Homogenous computing is characterized by similar processing units (in terms of instruction set architecture) controlled by a single instance of an OS that can handle all the resources on the platform. Symmetric multi-processing OSes are an example of this, and were widely deployed in the early days of mutlicore adoption in the embedded industry. However, embedded systems are diverse and it is impossible to satisfy the majority of requirements/constraints with a homogeneous multi-core design. This is where heterogeneous computing comes into the picture, enabling multiple software stacks running on sets of core(s) suited to a perform a particular function.

Heterogeneous multi-core computing can be further classified into supervised and unsupervised multi-core processing. The supervised class covers designs with manager software mediating between multiple software stacks while the unsupervised class has a manager-less design where software running on one set of cores might assume the 'master' role and setup work for rest of the processing units.

Frequently 'heterogeneity' of the system comes from diverse software stacks and not necessarily from processing units. What this means is that two similar cores, one running Linux and another running an RTOS, would still classify as a heterogeneous multi-core design, although they are running on the same instruction set.

This article describes a resource partitioning scheme for a supervised, heterogeneous multi-core embedded system, where the system under consideration contains multiple instances of embedded Linux, each running on a different set of cores. After first reviewing the tools available currently for resource partitioning among multi-OS systems, along with their limitations, a partitioning algorithm is proposed that is used to produce a filtered view of the platform for the guest operating systems in the system's hypervisor. The resulting work flow is explained with the help of a real-world use case.

The need for resource partitioning
Whether supervised or unsupervised, heterogeneous computing introduces a significant resource partitioning challenge. Consider an unsupervised design where multiple OSes on a single platform need to run in tandem, but where each OS is allowed access to only one set of devices. Or alternatively, a supervised design with a hypervisor supporting multiple guest operating systems in which the hypervisor and guests all can have potentially different views of the hardware platform on which they are running.

Flattened device trees (FDTs). While there are several ways by which embedded software can gather hardware information, flattened device trees [1] are fast becoming the preferred way to provide fast enablement of Linux on hardware. A major breakthrough in the adoption of device trees has been their inclusion in Linux kernel 3.2 for the ARM architecture [2].

With the growing popularity of FDTs it is natural to look at the data contained within one and see if it can be processed to satisfy resource partitioning requirements. The idea is to take a master device tree completely describing the hardware platform and convert it into multiple independent device trees that would supply restricted hardware views to multiple associated operating systems.

FDTs are represented by device tree structures (DTS) as a convenient textual representation of the platform in the form of a tree. It is possible to hand edit these DTS files, inserting/removing data as desired, while driving new slave device trees. But this manual hand-editing process is prone to errors. For example, what happens if a device assigning to a particular OS needs to be assigned to another one? This would require changes in more than one place and recompilation of all the device trees touched.

Automating resource partitioning
What is necessary is a program that auto-generates the device trees according to the requirements of the design under consideration. In that context, a good thing about FDTs is that they come with excellent support in the form a device tree compiler (DTC) and runtime library (libfdt) to manipulate FDT data [3]. Using these tools, one can write a utility for resource partitioning among multiple OSes by generating new device tree structures/blobs for each OS in the system. Of course, this requires some additional metadata to be specified covering the design requirements. This can be done by extending the master DTS describing the platform for a regular single OS design.

1???2???3?Next Page?Last Page



Article Comments - Device tree partitioning for embedde...
Comments:??
*? You can enter [0] more charecters.
*Verify code:
?
?
Webinars

Seminars

Visit Asia Webinars to learn about the latest in technology and get practical design tips.

?
?
Back to Top