450 likes | 584 Views
This document provides a comprehensive overview of microkernel architecture, focusing on the L4μkernel family. It addresses the advantages of microkernels over monolithic kernels, discusses drivers and debugging, and outlines notable implementations like Fiasco and Pistachio. Key sections cover the history of microkernels, significant bugs encountered in USB host device drivers, and experiences in driver debugging. Additionally, it explores the evolution of L4 and its impact on real-time systems, offering valuable insights for developers and researchers in operating system design.
E N D
Some Experience About μkernel and Device Driver 970529 Sean Lin
Outline • Introduction of μkernel • Introduction of L4 μkernel Family • Something Interesting in L4 μkernel • Introduction of The Platform • The Bug of USB Host Device Driver • Other Experiences of Driver Debugging
Outline • Introduction of μkernel • Introduction of L4 μkernel Family • Something Interesting in L4 μkernel • Introduction of The Platform • The Bug of USB Host Device Driver • Other Experiences of Driver Debugging
Monolithic Kernel • Kernel has access to all things • All optimizations possible • All techniques/mechanisms implementable • Kernel can be extended • To add more code to the kernel
Why Microkernel(μkernel) • Cost of monolithic kernel • Complexity • Growing size • Limited maintainability
The Idea of Microkernel • Provide core functionality • Applications communicate via message-passing IPC
Outline • Introduction of μkernel • Introduction of L4 μkernel Family • Something Interesting in L4 μkernel • Introduction of The Platform • The Bug of USB Host Device Driver • Other Experiences of Driver Debugging
History of Microkernel • 1st generation μkernel • Mach • Chorus • Amoeba • L3
History of Microkernel (cont.) • 2nd generation μkernel • Spin (University of Washington) • Exo-kernel (MIT) • L4
Comparison • 1st generation μkernel were slow • Complex API • Poor design and implementation • Too many features • Slow and inflexible IPC
L4 Microkernel Family • A family of second-generation microkernel • There have been various re-implementations of the original L4 kernel interface(ABI) • Original version by JochenLiedtke
Introduction of L4 Microkernel • The L4 kernel API has evolved in numerous ways • Version 2 • Version X.0 • Version X.2 • NICTA N
Design Issue of L4 • Abstractions • Address spaces • Threads • Mechanisms • Inter-process communication (IPC) • Mapping
Outline • Introduction of μkernel • Introduction of L4 μkernel Family • Something Interesting in L4 μkernel • Introduction of The Platform • The Bug of USB Host Device Driver • Other Experiences of Driver Debugging
Famous L4 μkernel • Fiasco • Design by TU Dresden • Preemptible real-time kernel • Used for DROPS project • GPL License Last release: March 2007, Fiasco 1.2 http://os.inf.tu-dresden.de/drops/
DROPS • Dresden Real-Time Operating Systems Project • Find design techniques for the construction of distributed real time operating systems • Every component guarantees a certain level of service to applications.
DROPS (cont.) • Multiple instances of Linux running on one machine
Famous L4 μkernel (cont.) • L4Ka::Pistachio • Design by L4Ka team and NICTA EROPS Group • L4 API V X.2 Last release: June 2004, Pistachio 0.4 http://l4ka.org/projects/pistachio/
Famous L4 μkernel (cont.) • NICTA::Pistachio-embedded • Design by UNSW and NICTA EROPS Group • based on L4Ka::Pistachio, designed for embedded systems • keep almost all system calls short Last release: Feb 2007, pistachio 1.1 (discontinued) http://ertos.nicta.com.au/software/kenge/pistachio/latest/
Famous L4 μkernel (cont.) • OKL4 • Design by OKLab (Open Kernel Labs) • OKLab spun out from NICTA • Based on NICTA::Pistachio-embedded • Commercial deployment Last release: Apr 2008, OKL4 2.1 http://wiki.ok-labs.com/
OKL4 • Adopted by Qualcomm for CDMA chipsets • OKL4-based Toshiba phone http://www.fluffyspider.com/demos/live_videos/flv/fancypants-openmoko-neo1973-video-browser-phone-dialer.html
Trusted Computing Base in μkernel traditional embedded Linux/ Windows Microkernel based System TCB all code 100,000’s loc 10,000’s loc Diagram from Kashin Lin (NEWS Lab)
Related Research - SIGMA A Study on Asymmetric Operating Systems on Symmetric Multiprocessors, Yu Murata, Wataru Kanda, Kensuke Hanaoka, and Tatsuo Nakajima, EUC07 • Achieve asymmetric multiple operating system environments for symmetric multiprocessors • No virtualization • Direct control
SIGMA (cont.) • A multiple OS environment • Host OS: L4 micro kernel (NICTA::L4-embedded) • Guest OS: SIGMA Linux • The OS manager • The bootloader of CPU1
SIGMA (cont.) • Estimated use cases
Outline • Introduction of μkernel • Introduction of L4 μkernel Family • Something Interesting in L4 μkernel • Introduction of The Platform • The Bug of USB Host Device Driver • Other Experiences of Driver Debugging
Outline • Introduction of μkernel • Introduction of L4 μkernel Family • Something Interesting in L4 μkernel • Introduction of The Platform • The Bug of USB Host Device Driver • Other Experiences of Driver Debugging
Outline • Introduction of μkernel • Introduction of L4 μkernel Family • Something Interesting in L4 μkernel • Introduction of The Platform • The Bug of USB Host Device Driver • Other Experiences of Driver Debugging
GPIO support in DM6446 • 71 GPIO signals. • GPIO[53:0] are 1.8V I/O signals. • GPIOV33_[16:0] are 3.3V I/O signals. • 16 registers one bank • Total 5 banks
Remarks in GPIO • Others important setting depend on the platform • Power • Pinmux
Power Setting • In the DM644x system, the Power & Sleep Controller (PSC) is responsible for managing transitions of system power on/off, clock on/off, and reset
Pinmux Setting • DM644x allows multiplexing of shared device pins between peripherals. • Check the GPIO pins you used whether shares to other device?
SPI – DAC 88347 • Need a power meter • Send different value • Measure the voltage on output pin
SPI – Input/Ouput Connection • DM6446 is master • Peripheral is slave • The SPI output pin of master device needs to be connected to the input pin of slave device.
USB – Mode Setting • USB controller in DM6446 • Support USB 2.0 peripheral at High Speed (480 Mbps) and Full Speed (12 Mbps). • Support USB 2.0 host at High Speed (480 Mbps), Full Speed (12 Mbps), and Low Speed (1.5 Mbps).
USB – Mode Setting (cont.) • USB_ID pin