purpose Search : automation methods for device driver development in IP-based embedded systems in order to achieve high reliability, productivity, reusability.

Slides:



Advertisements
Similar presentations
Embedded System, A Brief Introduction
Advertisements

Device Drivers. Linux Device Drivers Linux supports three types of hardware device: character, block and network –character devices: R/W without buffering.
Windows XP Kernel Architecture Mike Karlsven James Farrer Jason Smith.
Operating System Structure
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Computer Systems/Operating Systems - Class 8
Chapter 13 Embedded Systems
Chapter 13 Embedded Systems Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Slide 6-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 6 Implementing Processes, Threads, and Resources.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
Embedded Real-time Systems The Linux kernel. The Operating System Kernel Resident in memory, privileged mode System calls offer general purpose services.
Chapter 13 Embedded Systems
Memory Management, File Systems, I/O How Multiprogramming Issues Mesh ECEN 5043 Software Engineering of Multiprogram Systems University of Colorado, Boulder.
Students:Gilad Goldman Lior Kamran Supervisor:Mony Orbach Mid-Semester Presentation Spring 2005 Network Sniffer.
Figure 1.1 Interaction between applications and the operating system.
Process Concept An operating system executes a variety of programs
CS 3013 & CS 502 Summer 2006 Threads1 CS-3013 & CS-502 Summer 2006.
1 Threads Chapter 4 Reading: 4.1,4.4, Process Characteristics l Unit of resource ownership - process is allocated: n a virtual address space to.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
RTOS Design & Implementation Swetanka Kumar Mishra & Kirti Chawla.
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 4: Threads.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
Chapter 4: Threads. 4.2CSCI 380 Operating Systems Chapter 4: Threads Overview Multithreading Models Threading Issues Pthreads Windows XP Threads Linux.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS6: Device Management 6.1. Principles of I/O.
Composition and Evolution of Operating Systems Introduction to Operating Systems: Module 2.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
Interrupts By Ryan Morris. Overview ● I/O Paradigm ● Synchronization ● Polling ● Control and Status Registers ● Interrupt Driven I/O ● Importance of Interrupts.
Operating Systems Lecture 7 OS Potpourri Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Source: Operating System Concepts by Silberschatz, Galvin and Gagne.
Chapter 4: Threads. 4.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th edition, Jan 23, 2005 Chapter 4: Threads Overview Multithreading.
Chapter 4: Threads. 4.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th edition, Jan 23, 2005 Chapter 4: Threads Overview Multithreading.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 7: Operating.
Device Driver Concepts Digital UNIX Internals II Device Driver Concepts Chapter 13.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Operating Systems.
1 Chapter 5: Threads Overview Multithreading Models & Issues Read Chapter 5 pages
CSCE451/851 Introduction to Operating Systems
Introduction to Operating Systems Concepts
Input/Output (I/O) Important OS function – control I/O
Chapter 4: Threads Modified by Dr. Neerja Mhaskar for CS 3SH3.
Introduction to threads
ARM Embedded Systems
Lab 1: Using NIOS II processor for code execution on FPGA
Current Generation Hypervisor Type 1 Type 2.
Chapter 2 Processes and Threads Today 2.1 Processes 2.2 Threads
Chapter 5: Threads Overview Multithreading Models Threading Issues
Operating Systems: A Modern Perspective, Chapter 6
CS 286 Computer Organization and Architecture
Hierarchical Architecture
CS703 - Advanced Operating Systems
CSCI 315 Operating Systems Design
Threads, SMP, and Microkernels
Operating Systems Chapter 5: Input/Output Management
Slides for Chapter 6: Operating System support
Lecture Topics: 11/1 General Operating System Concepts Processes
B.Ramamurthy Chapter 2 : Appendix
Threads Chapter 4.
Threads Chapter 5 2/17/2019 B.Ramamurthy.
Threads Chapter 5 2/23/2019 B.Ramamurthy.
Implementing Processes, Threads, and Resources
Chapter 13: I/O Systems.
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

purpose Search : automation methods for device driver development in IP-based embedded systems in order to achieve high reliability, productivity, reusability and fast time to market. Section 2 : reviews related work Section 3 : describes the framework for our methodology Section 4 presents the formal specification of device behavior using the Universal Serial Bus (USB) as an example Section 5 discusses driver synthesis Section 6 case study Section 7 discusses future work and directions.

Introduction Device drivers It provide a bridge between a peripheral device and the upper layers of the operating system and the application software It significantly affect design quality and productivity Necessary knowledge chips and boards, processors, peripherals, operating systems, compilers, logic and timing requirements important Ex) Motorola MPC860 PowerQUIC-board support package (BSP) lines of C code – complexity Ex) Microsoft Windows XP crash data that 61% of XP crashes are caused by driver problems - reliability

Methodology Framework 2 Methodology Framework Driver Environment Framework Overview

3 Methodology Framework Core functions Trace the states of devices, enforce device state transitions required for certain operations, and operate data paths. Platform functions glue the core functions to the hardware and OS platform virtual environment : architectural behaviors - big or little endian, programmed I/O, memory mapped I/O. It also specifies OS services and OS requirements - memory management, DMA/bus controllers, synchronization mechanisms etc. Registry functions To export driver services into the kernel or application name space. Ex) The interface can register a driver class to the NT I/O manager (IOM) or fill one entry of the VFS (Virtual File Switching) structure of the Unix kernel

3 Methodology Framework device specification provides all the information about the device required by the driver core function synthesis process(Core Gen). Core functions are implemented in the virtual environment mapper maps core functions in the virtual environment to the target environment. The driver configuration defines the target platform and necessary parameters.-OS name, processor name, bus name, device instance parameters SA1100 USB Device Controller (UDC) Driver Configuration

4 Device Specification Device specification input to the generation of the core functions Partition Part Data Path It defined as a stream of data units. data unit data block moving between the device and the software by a primitive hardware operation. Device Control It specifies the state changes of a device. device may be composed of several sub-devices operating in parallel, we use a concurrency model, event driven finite state machines 4type of event : hardware events, input events, output events and internal events. Device Programming Interface specification

4 Device Specification Control Function Specification Control functions are responsible for changing the control state of the device according to the state machines. Device Programming Interface specification To model device register accesses, we use the concepts of register and variable

5.Synthesis the synthesis process synthesizes the C code for the entire driver synthesis process. Platform Function and Registry Function Mapping This part is done manually based on the platform All virtual data types and API are mapped into platform specific types and API. Synchronization functions Timer management functions Memory management functions DMA and bus access functions Interrupt handling (setup, enable, disable, etc.) Tracing functions Register/memory access functions.

5.Synthesis Linux 2.4 Mapping of the Primitive Specified /*synchronization object */ Data Type: iblk_unit Operations: IDECLARE_BLK_UNIT(name) /* block on bu */ inline void iblk(iblk_unit bu); /* unblock */ inline void iunblock(iblk_unit bu); /*check if any one is blocked on bu*/ inline int ichk_blk(iblk_unit bu); typedef wait_queue_head_t iblk_unit; #define IDECLARE_BLK_UNIT(name) \ DECLARE_WAIT_QUEUE_HEAD(name) inline void iblk(iblk_unit *bu) { sleep_on(bu); } inline void iunblock(iblk_unit *bu) { wake_up (bu); } inline int ichk_blk(iblk_unit *bu) { return(waitqueue_active(bu)); }

5.Synthesis Device Core Function Synthesis device driver core functions : data access functions or control functions data access functions <- data path specification control functions <- device control specification. Synchronization Mechanisms Data Access Function Synchronous communication It achieved by synchronizing the caller and the callback function Callback - notify the completion of a data transfer data path - modeled as a stream of data units

5.Synthesis Control Function - it moves the device to a particular state. The execution of application software depends on such a state change void ctrl(DEV_PRIV_DS *priv, IEsmEvtVal val) { Enqueue the input event; while (true) { while(firable transitions exist){ Fire the transition; if(final state set is reached) return; } block(time_out_value); } Fig. Control Function control function involves a series of state transitions. It completes when the final state set is reached.

6 Case Study Condition : Intel StrongArm SA1100 peripheral control module contains a universal serial bus (USB) endpoint controller supports three endpoints: endpoint 0 (ep0): USB host controls the UDC endpoint 1 (ep1): transmit FIFO endpoint 2 (ep2):receive FIFO. Ethernet device driver interface has been implemented on top of the USB data flow.

6 Case Study Modeling UDC and synthesized a UDC Linux device driver:Ethernet driver interface and manages data transfer and USB connection setup UDC ep1 : OUT data path UDC ep2 : IN data path UDC control : 4 state machines: one state machine for each endpoint and one state machine managing the USB protocol state of the device

7 Conclusions and future work Issues : addresses the complexity and portability A platform independent specification is used to synthesize platform independent driver code, which is then mapped to a specific platform using platform specific library functions expectation : This methodology greatly simplifies driver development as it makes it possible for developers to provide this specification and then leverage the synthesis procedures as well as the library code reuse to derive significant productivity benefits