Device Tree 101

Total Page:16

File Type:pdf, Size:1020Kb

Device Tree 101 Device Tree 101 Device Tree 101 Organized in partnership with ST February 9, 2021 Thomas Petazzoni embedded Linux and kernel engineering [email protected] © Copyright 2004-2021, Bootlin. Creative Commons BY-SA 3.0 license. Corrections, suggestions, contributions and translations are welcome! - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 1/56 Who is speaking ? I Thomas Petazzoni I Chief Technical Officer at Bootlin I Joined in 2008, employee #1 I Embedded Linux & Linux kernel engineer, open-source contributor I Author of the Device Tree for Dummies talk in 2013/2014 I Buildroot co-maintainer I Linux kernel contributor: ≈ 900 contributions I Member of Embedded Linux Conference (Europe) program committee I Based in Toulouse, France - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 2/56 Agenda I Bootlin introduction I STM32MP1 introduction I Why the Device Tree ? I Basic Device Tree syntax I Device Tree inheritance I Device Tree specifications and bindings I Device Tree and Linux kernel drivers I Common properties and examples - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 3/56 Bootlin I In business since 2004 I Team based in France I Serving customers worldwide I 18% revenue from France I 44% revenue from EU except France I 38% revenue outside EU I Highly focused and recognized expertise I Embedded Linux I Linux kernel I Embedded Linux build systems I Activities I Training courses (≃ 20% revenue) I Engineering services (≃ 80% revenue) - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 4/56 Bootlin training courses - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 5/56 I Experienced trainers I Bootlin trainers are also engineers I Working on real engineering projects I Up-to-date and in-field experience I Worldwide recognized training courses I Taught 100s of sessions I To 1000s of engineers I For the past 15 years Why choose Bootlin training courses ? I Complete training materials freely available I Open-source license: Creative Commons I Allows to verify in detail the course contents I Shows Bootlin commitment to knowledge sharing I Unique in the training industry - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 6/56 I Worldwide recognized training courses I Taught 100s of sessions I To 1000s of engineers I For the past 15 years Why choose Bootlin training courses ? I Complete training materials freely available I Open-source license: Creative Commons I Allows to verify in detail the course contents I Shows Bootlin commitment to knowledge sharing I Unique in the training industry I Experienced trainers I Bootlin trainers are also engineers I Working on real engineering projects I Up-to-date and in-field experience - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 6/56 Why choose Bootlin training courses ? I Complete training materials freely available I Open-source license: Creative Commons I Allows to verify in detail the course contents I Shows Bootlin commitment to knowledge sharing I Unique in the training industry I Experienced trainers I Bootlin trainers are also engineers I Working on real engineering projects I Up-to-date and in-field experience I Worldwide recognized training courses I Taught 100s of sessions I To 1000s of engineers I For the past 15 years - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 6/56 Bootlin engineering services I Main activities I Linux Board Support Package development, update and maintenance I Linux kernel drivers development I Bootloader and Linux kernel porting I System integration: Yocto, Buildroot, boot time, secure boot, etc. I Upstreaming I Consulting and technical support I Focus on the low-level software stack I Customers I Silicon vendors: interested in U-Boot, Linux, Buildroot or Yocto support for their product, usually upstream I Embedded system manufacturers: complete BSP, specific drivers, debugging, optimization, consulting - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 7/56 Bootlin: open-source contributor I Bootlin 20th contributing company worldwide to the Linux kernel I 7600+ patches contributed, mainly around hardware support I Maintainers of several subsystems of the kernel: I3C, RTC, MTD, and several platforms I Key contributor to Buildroot: co-maintainer, 5000+ patches contributed I Contributor to the Yocto Project I Contributions to Barebox, Linux Test Project, etc. I Freely available training materials I Numerous talks at conferences to share technical knowledge - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 8/56 STM32MP157F system-on-chip - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 9/56 STM32MP1 system-on-chip family - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 10/56 STM32MP1 Discovery Kits I Discovery Kit 1 (DK1) I Discovery Kit 2 (DK2) I SoC: STM32MP157A I SoC: STM32MP157C I 512 MB DDR, microSD I Same as DK1 I 1G Ethernet, 1x USB-C, 4x USB-A, LEDs, I WiFi/Bluetooth buttons I Display + touchscreen I HDMI, audio codec, DSI connector I GPIO connectors, Arduino/RaspberryPi shields I On-board ST-Link - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 11/56 STM32MP1 DK2 partial block diagram - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 12/56 I But many hardware busses do not provide discoverability mechanisms I E.g: I2C, SPI, 1-wire, memory-mapped, etc. I One needs to know what is connected on those busses, and how they are connected to the rest of the system I Embedded systems typically make extensive use of such busses Discoverable vs. non-discoverable hardware I Some hardware busses provide discoverability mechanisms I E.g: PCI(e), USB I One does not need to know ahead of time what will be connected on these busses I Devices can be enumerated and identified at runtime I Concept of vendor ID, product ID, device class, etc. - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 13/56 Discoverable vs. non-discoverable hardware I Some hardware busses provide discoverability mechanisms I E.g: PCI(e), USB I One does not need to know ahead of time what will be connected on these busses I Devices can be enumerated and identified at runtime I Concept of vendor ID, product ID, device class, etc. I But many hardware busses do not provide discoverability mechanisms I E.g: I2C, SPI, 1-wire, memory-mapped, etc. I One needs to know what is connected on those busses, and how they are connected to the rest of the system I Embedded systems typically make extensive use of such busses - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 13/56 Hardware description for non-discoverable hardware Allows the operating system or bootloader to know things like: I This system-on-chip has: I 2 Cortex-A7 CPU cores I 2 memory-mapped UART controllers of this variant, one with registers at 0x5c000000 and IRQ 37, and another with registers at 0x4000e000 and IRQ 38 I 3 I2C controllers of that variant, with registers at those memory-mapped addresses, those IRQs and taking their input clock from this source I This board has a CS42L51 audio codec I Connected on the I2C bus 1 of the SoC, at slave address 0x4A I Connected to the SAI interface 2 of the SoC I With its reset signal connected to GPIO 67 of the SoC I ... → These details cannot be guessed by the operating system/bootloader. - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 14/56 2. Using ACPI tables 3. Using a Device Tree Describing non-discoverable hardware 1. Directly in the I Using compiled data structures, typically in C OS/bootloader I How it was done on most embedded platforms in Linux, code U-Boot. I Considered not maintainable/sustainable on ARM32, which motivated the move to another solution. - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 15/56 1. Directly in the OS/bootloader code 3. Using a Device Tree Describing non-discoverable hardware I On x86 systems, but also on a subset of ARM64 platforms 2. Using ACPI tables I Tables provided by the firmware - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 15/56 1. Directly in the OS/bootloader code 2. Using ACPI tables Describing non-discoverable hardware I Originates from OpenFirmware, defined by Sun, used on SPARC and PowerPC I That’s why many Linux/U-Boot functions related to DT have a of_ prefix I Now used most embedded-oriented CPU architectures that run Linux: ARC, ARM64, RISC-V, ARM32, PowerPC, Xtensa, MIPS, etc. 3. Using a Device Tree I Writing/tweaking a DT is now always necessary when porting Linux to a new board. I The topic of this talk ! - Kernel, drivers and embedded Linux - Development, consulting, training and support - https://bootlin.com 15/56 Device Tree: from source to
Recommended publications
  • Slide Set 17 for ENCM 339 Fall 2015
    Slide Set 17 for ENCM 339 Fall 2015 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Fall Term, 2015 SN's ENCM 339 Fall 2015 Slide Set 17 slide 2/46 Contents Data structures Abstract data types Linked data structures A singly-linked list type in C++ Operations and implementation of SLListV1 The Big 3 for a linked-list class Ordered linked lists SN's ENCM 339 Fall 2015 Slide Set 17 slide 3/46 Outline of Slide Set 17 Data structures Abstract data types Linked data structures A singly-linked list type in C++ Operations and implementation of SLListV1 The Big 3 for a linked-list class Ordered linked lists SN's ENCM 339 Fall 2015 Slide Set 17 slide 4/46 Data structures In discussion of programming, the term data structure means a collection of data items, organized to support some of the following goals: I fast insertion or removal of data items I fast access to data items I fast searching for the location of a particular data item, if the item is in the collection I maintaining items in some kind of sorted order I keeping the memory footprint of the collection as small as possible There are design trade-offs|no single data structure design is best for all of the above goals. SN's ENCM 339 Fall 2015 Slide Set 17 slide 5/46 Here are two kinds of data structures that everybody in this course should be familiar with: I arrays I C and C++ structure objects We're about to study a kind of data structure called a linked list.
    [Show full text]
  • Devicetree BOF
    Devicetree BOF Open Source Summit Japan 2018 Tokyo Frank Rowand, Sony June 20, 2018 180618_0351 My Goal Do NOT show all of the slides Agenda - Past events - Future events - New since elc 2017 (February 2017) - Tools status - dtc compiler - questions, comments, issues, concerns from the crowd - commit statistics Plumbers 2017 Summary September 2017 Los Angeles Was not scheduled -- not enough interest / commitment Devicetree Workshop Oct 2017 Prague, Czech Republic https://elinux.org/Device_tree_future #Kernel_Summit_2017.2C_Devicetree_Workshop - slides - notes === Validation Tools & Schema === Runtime usage === DTS maintenance issues === More stuff Devicetree Workshop Oct 2017 Prague, Czech Republic Devicetree Workshop 2017 9:30 Welcome and Schedule bashing 9:40 Encoding and Schema checking: Framing the problem 9:45 DT YAML encoding overview 10:00 YAML encoding discussion 10:20 DT Schema format - option 1 10:35 DT Schema format - option 2 10:50 DT Schema discussion - what should go in the spec? 11:50 Code Generation from DT 12:10 Runtime memory consumption 14:30 Overlay maintenance plan 14:45 Avoiding duplicate descriptions 15:00 Criteria for accepting board files 15:15 Location for maintaining bindings - how to handle foreign bindings 15:30 Sharing Generic bindings 15:45 ABI Stability 16:00 [break and overflow discussion] 16:30 DT health check 16:50 devicetree.org update 17:05 EBBR Discussion 17:20 Closing and feedback Plumbers 2018 November 13 - 15, 2018 Tuesday - Thursday Vancouver, British Columbia, Canada https://www.linuxplumbersconf.org/event/2/overview
    [Show full text]
  • Introduction to Linux Kernel Driver Programming
    IntroductionIntroduction toto LinuxLinux kernelkernel driverdriver programmingprogramming Introduction to Linux kernel driver programming The Linux kernel device model Authors and license ● Authors – Michael Opdenacker ([email protected]) Founder of Bootlin, kernel and embedded Linux engineering company https://bootlin.com/company/staff/michael-opdenacker ● License – Creative Commons Attribution – Share Alike 4.0 https://creativecommons.org/licenses/by-sa/4.0/ – Document sources: https://github.com/e-ale/Slides Need for a device model ● For the same device, need to use the same device driver on multiple CPU architectures (x86, ARM…), even though the hardware controllers are different. ● Need for a single driver to support multiple devices of the same kind. ● This requires a clean organization of the code, with the device drivers separated from the controller drivers, the hardware description separated from the drivers themselves, etc. Driver: between bus infrastructure and framework In Linux, a driver is always interfacing with: ● a framework that allows the driver to expose the hardware features in a generic way. ● a bus infrastructure, part of the device model, to detect/communicate with the hardware. Let’s focus on the bus infrastructure for now Device model data structures The device model is organized around three main data structures: ● The struct bus_type structure, which represent one type of bus (USB, PCI, I2C, etc.) ● The struct device_driver structure, which represents one driver capable of handling certain devices on a certain bus. ● The struct device structure, which represents one device connected to a bus The kernel uses inheritance to create more specialized versions of struct device_driver and struct device for each bus subsystem.
    [Show full text]
  • Kernel Boot-Time Tracing
    Kernel Boot-time Tracing Linux Plumbers Conference 2019 - Tracing Track Masami Hiramatsu <[email protected]> Linaro, Ltd. Speaker Masami Hiramatsu - Working for Linaro and Linaro members - Tech Lead for a Landing team - Maintainer of Kprobes and related tracing features/tools Why Kernel Boot-time Tracing? Debug and analyze boot time errors and performance issues - Measure performance statistics of kernel boot - Analyze driver init failure - Debug boot up process - Continuously tracing from boot time etc. What We Have There are already many ftrace options on kernel command line ● Setup options (trace_options=) ● Output to printk (tp_printk) ● Enable events (trace_events=) ● Enable tracers (ftrace=) ● Filtering (ftrace_filter=,ftrace_notrace=,ftrace_graph_filter=,ftrace_graph_notrace=) ● Add kprobe events (kprobe_events=) ● And other options (alloc_snapshot, traceoff_on_warning, ...) See Documentation/admin-guide/kernel-parameters.txt Example of Kernel Cmdline Parameters In grub.conf linux /boot/vmlinuz-5.1 root=UUID=5a026bbb-6a58-4c23-9814-5b1c99b82338 ro quiet splash tp_printk trace_options=”sym-addr” trace_clock=global ftrace_dump_on_oops trace_buf_size=1M trace_event=”initcall:*,irq:*,exceptions:*” kprobe_event=”p:kprobes/myevent foofunction $arg1 $arg2;p:kprobes/myevent2 barfunction %ax” What Issues? Size limitation ● kernel cmdline size is small (< 256bytes) ● A half of the cmdline is used for normal boot Only partial features supported ● ftrace has too complex features for single command line ● per-event filters/actions, instances, histograms. Solutions? 1. Use initramfs - Too late for kernel boot time tracing 2. Expand kernel cmdline - It is not easy to write down complex tracing options on bootloader (Single line options is too simple) 3. Reuse structured boot time data (Devicetree) - Well documented, structured data -> V1 & V2 series based on this. Boot-time Trace: V1 and V2 series V1 and V2 series posted at June.
    [Show full text]
  • Devicetree Specification
    Devicetree Specification Release unknown-rev devicetree.org unknown-rev 13 September 2021 Contents 1 Introduction 3 1.1 Purpose and Scope..............................................3 1.2 Relationship to IEEE™ 1275 and ePAPR..................................4 1.3 32-bit and 64-bit Support...........................................4 1.4 Definition of Terms..............................................4 2 The Devicetree 6 2.1 Overview...................................................6 2.2 Devicetree Structure and Conventions....................................7 2.2.1 Node Names............................................7 2.2.2 Generic Names Recommendation.................................8 2.2.3 Path Names............................................. 10 2.2.4 Properties.............................................. 10 2.3 Standard Properties.............................................. 12 2.3.1 compatible............................................. 12 2.3.2 model................................................ 13 2.3.3 phandle............................................... 13 2.3.4 status................................................ 14 2.3.5 #address-cells and #size-cells.................................... 14 2.3.6 reg.................................................. 15 2.3.7 virtual-reg.............................................. 15 2.3.8 ranges................................................ 15 2.3.9 dma-ranges.............................................unknown-rev 16 2.3.10 dma-coherent...........................................
    [Show full text]
  • Fast Sequential Summation Algorithms Using Augmented Data Structures
    Fast Sequential Summation Algorithms Using Augmented Data Structures Vadim Stadnik [email protected] Abstract This paper provides an introduction to the design of augmented data structures that offer an efficient representation of a mathematical sequence and fast sequential summation algorithms, which guarantee both logarithmic running time and logarithmic computational cost in terms of the total number of operations. In parallel summation algorithms, logarithmic running time is achieved by high linear computational cost with a linear number of processors. The important practical advantage of the fast sequential summation algorithms is that they do not require supercomputers and can run on the cheapest single processor systems. Layout 1. Motivation 2. Parallel Summation Algorithms 3. Choice of Data Structure 4. Geometric Interpretation 5. Representation of Sequence 6. Fast Sequential Summation Algorithms 7. Mean Value and Standard Deviation 8. Other Data Structures 1. Motivation The original version of the fast sequential summation algorithms described here was implemented in C++ using data structures that support interfaces of STL containers [1]. These interesting and important algorithms can be implemented in many other programming languages. This discussion provides an introduction to the design of data structures, which significantly improve performance of summation algorithms. The fast summation algorithms have been developed by applying the method of augmenting data structures [2]. This powerful method can be used to solve a wide range of problems. It helps design advanced data structures that support more efficient algorithms than basic data structures. The main disadvantage of this method is its complexity, which makes the use of this method difficult in practice.
    [Show full text]
  • Linked List Data Structure
    Linked List Data Structure Static and Dynamic data structures A static data structure is an organization of collection of data that is fixed in size. as memory ,(مسبقا") This results in the maximum size needing to be known in advance cannot be reallocated at a later. Arrays are example of static data structure. A dynamic data structure , where in with the latter the size of the structure can dynamically grow or shrink in size as needed. Linked lists are example of dynamic data structure. Linked Lists Like arrays, Linked List is a linear data structure. Unlike arrays, linked list elements are not stored at contiguous location; the elements are linked using pointers. It consists of group of nodes in a sequence which is divided in two parts. Each node consists of its own data and the address of the next node and forms a chain. Linked Lists are used to create trees and graphs. What are different between linked lists and arrays? Arrays Linked lists Have a pre-determined fixed No fixed size; grow one element at a time size Array items are store Element can be stored at any place contiguously Easy access to any element in No easy access to i-th element , need to hop through all previous constant time elements start from start Size = n x sizeof(element) Size = n x sizeof (element) + n x sizeof(reference) Insertion and deletion at Insertion and deletion are simple and faster particular position is complex(shifting) Only element store Each element must store element and pointer to next element (extra memory for storage pointer).
    [Show full text]
  • Device Tree the Disaster So Far
    Device Tree The Disaster so Far Mark Rutland <[email protected]> ELC Europe 2013 Agenda Disaster is a strong word. Let's talk about: I What was wrong with board files I What device tree is (and what it isn't) I The ARM conversion so far I The problems we have, and how to fix them I What we need to do in future Where we came from Two big problems: I Hard-coded board description I Kernel must know every possible configuration I Minor revisions require a new kernel I Separate kernels per platform I Uncoordinated { \stepping on each others toes" I Difficult to test I Painful for distributions Planned solution: I Single image I Dynamic configuration I Move board description out of the kernel Device Tree { Overview I A data structure for describing hardware I Defined by OpenFirmware (IEEE1275-1994) I Extended by ePAPR & other supplements I Handled by OpenFirmware, U-Boot, ... I Used by *BSD, Linux, OS X, Solaris, Xen I Used on ARC, ARM(64) C6X, META, MicroBlaze, MIPS, OpenRISC, PowerPC, SPARC, x86, Xtensa I Generated by KVM tool, Xen, others Device Tree { Overview I Declarative hardware description I Describes hardware topology I Format not tied to OS internals I Hierarchical key value(-list) I Just a data structure I Conventions, not rigid rules I Bindings I Conventions for describing a particular devices I Typically matched by compatible string I Device classes share common bindings I No central authority I Bindings created by users I No coordination of implementors Device Tree { Bindings Vendor dev2000 bindings ======================= The Vendor dev2000 is a memory-mapped device that may or may not do something useful.
    [Show full text]
  • EXTENDING the LIFECYCLE of IOT DEVICES USING SELECTIVE DEACTIVATION a Dissertation Presented to the Academic Faculty by Michael
    EXTENDING THE LIFECYCLE OF IOT DEVICES USING SELECTIVE DEACTIVATION A Dissertation Presented to The Academic Faculty By Michael Hesse In Partial Fulfillment of the Requirements for the Degree Master of Science in the School of Computer Science Georgia Institute of Technology August 2020 Copyright c Michael Hesse 2020 EXTENDING THE LIFECYCLE OF IOT DEVICES USING SELECTIVE DEACTIVATION Approved by: Professor Taesoo Kim, Advisor School of Computer Science Georgia Institute of Technology Professor Brendan Saltaformaggio School of Electrical and Computer Engineering Georgia Institute of Technology Professor Mustaque Ahmad School of Computer Science Georgia Institute of Technology Date Approved: April 29, 2020 ACKNOWLEDGEMENTS I would like to thank my advisor Taesoo Kim and the other members of the committee, Brendan Saltaformaggio and Mustaque Ahmad, for their time, patience and guidance, as this thesis would not have been possible without them. I would further like to thank Meng Xu and Fan San for their continued support and feedback during the course of my research. Ranjani and Sundar, thank you for emotional support and interest in my work. Finally, I would like to thank my parents and my sister for all the love and support they continue to provide throughout my entire life. iii TABLE OF CONTENTS Acknowledgments . iii List of Tables . viii List of Figures . ix Nomenclature . x Chapter 1: Introduction . 1 1.1 Problem Description . 2 1.2 Goal . 2 1.3 Assumptions & Threat Model . 4 1.4 Security Properties . 5 1.5 Challenges . 6 1.6 Thesis Overview . 6 Chapter 2: Background . 8 2.1 Platform Architecture . 8 2.2 Hardware Assisted Security Mechanisms .
    [Show full text]
  • Trees • Binary Trees • Traversals of Trees • Template Method Pattern • Data
    TREES • trees • binary trees • traversals of trees • template method pattern • data structures for trees Trees 1 Trees •atree represents a hierarchy - organization structure of a corporation Electronics R’Us R&D Sales Purchasing Manufacturing Domestic International TV CD Tuner Canada S. America Overseas Africa Europe Asia Australia - table of contents of a book student guide overview grading environment programming support code exams homeworks programs Trees 2 Another Example • Unix or DOS/Windows file system /user/rt/courses/ cs016/ cs252/ grades grades homeworks/ programs/ projects/ hw1 hw2 hw3 pr1 pr2 pr3 papers/ demos/ buylow sellhigh market Trees 3 Terminology • A is the root node. • B is the parent of D and E. • C is the sibling of B • D and E are the children of B. • D, E, F, G, I are external nodes, or leaves. • A, B, C, H are internal nodes. • The depth (level) of E is 2 • The height of the tree is 3. • The degree of node B is 2. A B C D E F G H I Property: (# edges) = (#nodes) − 1 Trees 4 Binary Trees • Ordered tree: the children of each node are ordered. • Binary tree: ordered tree with all internal nodes of degree 2. • Recursive definition of binary tree: •Abinary tree is either -anexternal node (leaf), or -aninternal node (the root) and two binary trees (left subtree and right subtree) Trees 5 Examples of Binary Trees • arithmetic expression + × × + 5 4 + × + 7 2 3 + 2 8 1 + 4 6 ((((3 × (1 + (4 + 6))) + (2 + 8)) × 5) + ( 4 × (7 + 2))) •river Trees 6 Properties of Binary Trees •(# external nodes ) = (# internal nodes) + 1 •(#
    [Show full text]
  • Create Platform Device for Node
    devicetree: kernel internals and practical troubleshooting There have been many presentations on what a devicetree looks like and how to create a devicetree. This talk instead examines how the Linux kernel uses a devicetree. Topics include the kernel devicetree framework, device creation, resource allocation, driver binding, and connecting objects. Troubleshooting will consider initialization, allocation, and binding ordering; kernel configuration; and driver problems. Frank Rowand, Sony Mobile Communications August 22, 2014 140821_1927 CAUTION The material covered in this presentation is kernel version specific Most information describes 3.16 or earlier In cases where arch specific code is involved, there will be a bias to looking at arch/arm/ Chapter 1 Device tree what is device tree? “A device tree is a tree data structure with nodes that describe the devices in a system. Each node has property/value pairs that describe the characteristics of the device being represented. Each node has exactly one parent except for the root node, which has no parent.” (ePAPR v1.1) what is device tree? “A device tree is a tree data structure with nodes that describe the devices in a system. Each node has property/value pairs that describe the characteristics of the device being represented. Each node has exactly one parent except for the root node, which has no parent.” (ePAPR v1.1) A device tree describes hardware that can not be located by probing. DT data life cycle (source) .dts .dts - device tree source file / { /* incomplete .dts example */ model
    [Show full text]
  • Verifying Linked Data Structure Implementations
    Verifying Linked Data Structure Implementations Karen Zee Viktor Kuncak Martin Rinard MIT CSAIL EPFL I&C MIT CSAIL Cambridge, MA Lausanne, Switzerland Cambridge, MA [email protected] viktor.kuncak@epfl.ch [email protected] Abstract equivalent conjunction of properties. By processing each conjunct separately, Jahob can use different provers to es- The Jahob program verification system leverages state of tablish different parts of the proof obligations. This is the art automated theorem provers, shape analysis, and de- possible thanks to formula approximation techniques[10] cision procedures to check that programs conform to their that create equivalent or semantically stronger formulas ac- specifications. By combining a rich specification language cepted by the specialized decision procedures. with a diverse collection of verification technologies, Jahob This paper presents our experience using the Jahob sys- makes it possible to verify complex properties of programs tem to obtain full correctness proofs for a collection of that manipulate linked data structures. We present our re- linked data structure implementations. Unlike systems that sults using Jahob to achieve full functional verification of a are designed to verify partial correctness properties, Jahob collection of linked data structures. verifies the full functional correctness of the data structure implementation. Not only do our results show that such full functional verification is feasible, the verified data struc- 1 Introduction tures and algorithms provide concrete examples that can help developers better understand how to achieve similar results in future efforts. Linked data structures such as lists, trees, graphs, and hash tables are pervasive in modern software systems. But because of phenomena such as aliasing and indirection, it 2 Example has been a challenge to develop automated reasoning sys- tems that are capable of proving important correctness prop- In this section we use a verified association list to demon- erties of such data structures.
    [Show full text]