Multiple Passes of the FreeBSD Device Tree

Slides:



Advertisements
Similar presentations
1 Peripheral Component Interconnect (PCI). 2 PCI based System.
Advertisements

Chapter 12: File System Implementation
Principles of I/O Hardware I/O Devices Block devices, Character devices, Others Speed Device Controllers Separation of electronic from mechanical components.
CSC 360- Instructor: K. Wu Overview of Operating Systems.
BIOS Data for OS Booting Outline Necessary Data for OS Booting System Information APM OS ACPI OS DOS Service Routines Conclusions.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
Xen and the Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, Andrew Warfield.
Dreams in a Nutshell Steven Sommer Microsoft Research Institute Department of Computing Macquarie University.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
Computer Organization
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Attilio Rao FreeBSD developers summit 2012 FreeBSD Xen status update.
FINAL MPX DELIVERABLE Due when you schedule your interview and presentation.
The Best of Both Worlds with On-Demand Virtualization Thawan Kooburat and Michael M. Swift On-Demand Virtualization allows systems to benefit from virtualization.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Thread Scheduling.
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.
January 10, Kits Workshop 1 Washington WASHINGTON UNIVERSITY IN ST LOUIS A Smart Port Card Tutorial --- Software John DeHart Washington University.
WHDC PowerPoint Template Notes & Handouts
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
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.
ICOM Noack Linux I/O structure Device special files Device switch tables and fops How the kernel finds a device Parts of a device driver or module.
© 2006 Open Grid Forum Network Services Interface Policy-based routing enforcement John MacAuley, ESnet 4 th February 2015.
PCI Interrupts for x86 Machines under FreeBSD May 18, 2007 John Baldwin
CSCE451/851 Introduction to Operating Systems
Multiprogramming. Readings r Chapter 2.1 of the textbook.
Introduction to Operating Systems Concepts
Computer System Structures
Introduction to Kernel
REAL-TIME OPERATING SYSTEMS
Kernel Design & Implementation
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Interrupts and Interrupts Handling
Chapter 19: Real-Time Systems
Why VT-d Direct memory access (DMA) is a method that allows an input/output (I/O) device to send or receive data directly to or from the main memory, bypassing.
Processes and threads.
Current Generation Hypervisor Type 1 Type 2.
Interrupts and signals
Chapter 8: Main Memory.
Credits: 3 CIE: 50 Marks SEE:100 Marks Lab: Embedded and IOT Lab
Time Sources and Timing
Operating System Structure
Mechanism: Limited Direct Execution
The PCI bus (Peripheral Component Interconnect ) is the most commonly used peripheral bus on desktops and bigger computers. higher-level bus architectures.
CS703 - Advanced Operating Systems
KERNEL ARCHITECTURE.
Graceful Degradation Of Collision Handling in Physically Based Animation John Dingliana , Carol O’ Sullivan.
Chapter 3: Windows7 Part 2.
Processor Fundamentals
Chapter 3: Windows7 Part 2.
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
Direct Memory Access Disk and Network transfers: awkward timing:
Lecture Topics: 11/1 General Operating System Concepts Processes
CSE 451: Operating Systems Spring 2008 Module 15 I/O
Threads Chapter 4.
Chapter 5: I/O Systems.
CSE 451: Operating Systems Spring 2007 Module 15 I/O
Chapter 19: Real-Time Systems
Processes and operating systems
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Operating System Introduction.
Chapter 3: Operating Systems Computer Science: An Overview
Device Mgmt © 2004, D. J. Foreman.
Code Composer Essentials 3.0
Device Mgmt © 2004, D. J. Foreman.
Module 12: I/O Systems I/O hardwared Application I/O Interface
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:

Multiple Passes of the FreeBSD Device Tree May 9, 2009 John Baldwin jhb@FreeBSD.org

Overview FreeBSD's Existing Device Driver Framework Some Tricky Problems Adding Multiple Passes Problems Revisited

“new-bus” Device Tree Dynamic Single-pass Depth- first Traversals

Tricky Problems Low-level Hardware Resource Discovery and Allocation Boot vs Non-Boot Probing

Low-level Hardware Interrupt Controllers, Timers, etc. are Devices, Too Probed Too Late Not Always Managed Via “new-bus” ACPI Hacks to Enforce Ordering

Resource Discovery and Allocation Reserve All Fixed Resources Before Assigning Dynamic Resources PCI-PCI Bridge Problem

Boot vs Non-Boot Probing Boot Probes Run Without Full Scheduler config_intrhook(9) Helps Some Scheduler Needs Timeout Which Needs Timer

Common Themes Devices Have Prerequisites Not All Are Consistent With Depth-First Traversal How to Fix?

Multiple Passes Multiple Scans of the Device Tree “Early” Drivers Probe During Initial Scans Most Drivers Probe Final Pass

Possible Passes BUS_PASS_ROOT – marker for root0 BUS_PASS_BUS – populate the tree BUS_PASS_CPU – add CPU devices BUS_PASS_RESOURCE – resource discovery BUS_PASS_INTERRUPT – PICs BUS_PASS_TIMER BUS_PASS_SCHEDULER BUS_PASS_DEFAULT

Implementation Details Driver Attachments Have Pass Level New BUS_NEW_PASS() Bus Interface Method bus_generic_new_pass() Pass Levels Are Sparse and Dynamic – like SYSINIT() subsystems bus_set_pass() Raises Pass Level

Writing an “Early” Driver EARLY_DRIVER_MODULE() Device Attach Routines May Need to Be Revised Attach Routines May Need to Handle Boot vs Non-Boot

Problems Revisited Low-level Hardware Drivers Resource Discovery and Management Perform Actions After Pass Traversal Hooking Passes vs. New Bus Methods Boot vs Non-Boot Probing Suspend and Resume Not In The Paper Similar Prequisite and Ordering Problems

Conclusion Code Currently Lives in FreeBSD p4 in //depot/projects/multipass/... Plan to Commit Framework to 8.0 Future Work in 9.0

Q&A http://www.FreeBSD.org/~jhb/papers/bsdcan09 Questions?