Presentation is loading. Please wait.

Presentation is loading. Please wait.

UDI, a Uniform Driver Interface Architecture Overview Kurt Gollhardt (Chair, Project UDI) November 2010.

Similar presentations


Presentation on theme: "UDI, a Uniform Driver Interface Architecture Overview Kurt Gollhardt (Chair, Project UDI) November 2010."— Presentation transcript:

1 UDI, a Uniform Driver Interface Architecture Overview Kurt Gollhardt (Chair, Project UDI) November 2010

2 Uniform Driver Interface Project UDI - Slide 2 Copyright 2010 Kurt Gollhardt What is UDI? OS-Neutral Platform-Neutral Device Driver Interface

3 Uniform Driver Interface Project UDI - Slide 3 Copyright 2010 Kurt Gollhardt UDI Driver Portability 100% Driver Source Portability –Defines architecture, APIs and packaging format Binary Portability (where applicable) –IA-32 and IA-64 ABIs defined (Recent work on AMD64, ARM in 2010) Source and Binary Distributions

4 Uniform Driver Interface Project UDI - Slide 4 Copyright 2010 Kurt Gollhardt The “Driver Problem” One Device, Many Operating Systems Requires Many Drivers for One Device –Who writes all these drivers? »Device Manufacturer (IHV)? OS Vendor (OSV)? 3 rd -Party Contractor or Systems Integrator? »Business decisions or personal priorities mean that some combinations get left out. –Less popular OSes get fewer drivers »(Everybody but Microsoft )

5 Uniform Driver Interface Project UDI - Slide 5 Copyright 2010 Kurt Gollhardt The UDI Solution One driver source for all UDI-compliant OSes UDI moves up IHV porting order –More bang for the buck for IHVs UDI-compliant OSes get better coverage (once critical mass reached)

6 Uniform Driver Interface Project UDI - Slide 6 Copyright 2010 Kurt Gollhardt UDI In Action First Prototype Completed 12/9/1997 Tru64 UNIX 64 bit Alpha SCO Unixware 32 bit Intel SUN Solaris 32 bit UltraSparc HP-UX 32 bit PA_RISC IBM AIX PowerPC NCR MP-RAS 32 bit Intel Adapters Adaptec SCSI Interphase 100BT Gigabit NIC Adapters Adaptec SCSI Interphase 100BT Gigabit NIC

7 Uniform Driver Interface Project UDI - Slide 7 Copyright 2010 Kurt Gollhardt The Versioning Problem OS Driver APIs Change Over Time Driver and OS Development Cycles Unnecessarily Linked –IHV should change driver as H/W evolves –OSV should be able to evolve OS w/o waiting for new drivers

8 Uniform Driver Interface Project UDI - Slide 8 Copyright 2010 Kurt Gollhardt UDI Versioning Stable API –Strict separation of responsibilities –Eliminate cross-cutting concerns Link-Level Versioning –Enables support for multiple versions simultaneously, even at binary level

9 Uniform Driver Interface Project UDI - Slide 9 Copyright 2010 Kurt Gollhardt Uniformity Across Device Types Reduces Learning Curve Common Execution Model Common Data Model Common Inter-Module Communication Mechanism Common System Services

10 Uniform Driver Interface Project UDI - Slide 10 Copyright 2010 Kurt Gollhardt UDI: Next-Generation Technology Instance Independence –Hot plug/hot swap adapters and devices Location Independence –Distributed environments and I/O processors

11 Uniform Driver Interface Project UDI - Slide 11 Copyright 2010 Kurt Gollhardt UDI: Next-Generation Technology (continued) Implicit Synchronization –Thread-safe drivers W/O locking calls –High parallelism between driver instances Support for Field-Installable 3rd-Party Extensions –Add new device classes w/o OS updates

12 Uniform Driver Interface Project UDI - Slide 12 Copyright 2010 Kurt Gollhardt UDI as Technology Enabler UDI simplifies support for: –Future platforms (new CPU & I/O bus architectures) –Mixed-endian platforms & arbitrary bus hierarchies –User-mode drivers –Advanced driver debugging tools –Fault recovery and validation environments None of these require driver changes!

13 Uniform Driver Interface Project UDI - Slide 13 Copyright 2010 Kurt Gollhardt Free and Open Specification Published on the Web (1999 & 2001) No Licensing Fees Developed Jointly by a Multi-Company Team of OS Architects and Driver Writers

14 Uniform Driver Interface Project UDI - Slide 14 Copyright 2010 Kurt Gollhardt Primary Participants (thru 2002)

15 Uniform Driver Interface Project UDI - Slide 15 Copyright 2010 Kurt Gollhardt UDI Architecture Driver Encapsulation

16 Uniform Driver Interface Project UDI - Slide 16 Copyright 2010 Kurt Gollhardt UDI Fully Encapsulates Drivers UDI Drivers Physical I/O Abstraction System Services: Configuration Resource Allocation Inter-Module Communication Tracing & Logging Error Handling Time Management Buffer Management Operating System UDI Environment Application Programs CPU and I/O Hardware (PIO, DMA, Interrupts) I/O Requests

17 Uniform Driver Interface Project UDI - Slide 17 Copyright 2010 Kurt Gollhardt UDI System Services System interface & resource management –Implemented for all UDI environments –Abstract OS services Calls from driver to environment services are called service calls

18 Uniform Driver Interface Project UDI - Slide 18 Copyright 2010 Kurt Gollhardt Embedding OS UDI Environment Path From Application to Driver Integrated Implementation I/O Subsystem Application UDI Driver Physical I/O Adapter or System Hardware OS Requests UDI Channel Operations Interrupts UDI Services Hardware Access

19 Uniform Driver Interface Project UDI - Slide 19 Copyright 2010 Kurt Gollhardt Embedding OS UDI Environment Path From Application to Driver Layered Implementation OS-to-UDI External Mapper I/O Subsystem Application UDI Driver Physical I/O Adapter or System Hardware OS Requests Native Driver Interface UDI Channel Operations Interrupts UDI Services Hardware Access

20 Uniform Driver Interface Project UDI - Slide 20 Copyright 2010 Kurt Gollhardt Monitor Keyboard Example Driver Hierarchy Monitor External Mapper Keyboard External Mapper Monitor Driver Instance Keyboard Driver Instance Disk Driver Instance Disk Driver Instance Tape Driver Instance Base I/O Adapter Driver Instance Disk External Mapper Tape External Mapper SCSI Adapter Driver Instance I/O Bus Adapter Driver Instance PROCESSOR-MEMORY INTERCONNECT I/O Bus Adapter Base I/O AdapterSCSI Adapter Disk Tape UDI Environment Embedding OS I/O SOFTWARE I/O HARDWARE Child Parent

21 Uniform Driver Interface Project UDI - Slide 21 Copyright 2010 Kurt Gollhardt UDI Architecture Execution Model

22 Uniform Driver Interface Project UDI - Slide 22 Copyright 2010 Kurt Gollhardt UDI Regions Basic unit for execution and scheduling –Each call into the driver region is serialized No direct data sharing between regions –You have to go through channels Region attributes (e.g. priority hints) specified at build time

23 Uniform Driver Interface Project UDI - Slide 23 Copyright 2010 Kurt Gollhardt UDI Regions (continued) One driver instance per device instance One or more regions per driver instance –Multi-region drivers may have higher parallelism Enables instance-independence –Driver state separate for each device instance Enables location-independence –Each region may operate in a different domain »e.g. address space, NUMA or network node

24 Uniform Driver Interface Project UDI - Slide 24 Copyright 2010 Kurt Gollhardt Regions and Channels Region A (driver or environment) communication channel channel endpoints Region B (driver or environment) Region Data

25 Uniform Driver Interface Project UDI - Slide 25 Copyright 2010 Kurt Gollhardt UDI Service Calls Two Styles Synchronous service calls –Complete without blocking –Results returned “immediately” Asynchronous service calls –Return without blocking –Delayed completion –Results returned via callback function

26 Uniform Driver Interface Project UDI - Slide 26 Copyright 2010 Kurt Gollhardt Non-Blocking Execution Model All service calls and channel operations return without blocking Drivers usually return after making one service call or channel operation call Gives environment complete control over thread usage and driver scheduling Sequence of call chains between callbacks can be viewed as a “Pseudo-Thread”

27 Uniform Driver Interface Project UDI - Slide 27 Copyright 2010 Kurt Gollhardt UDI Architecture Inter-Module Communication

28 Uniform Driver Interface Project UDI - Slide 28 Copyright 2010 Kurt Gollhardt UDI Channels Basis for Inter-Module Communication (IMC) Bi-directional channels connect regions Communication via channel operations –Strongly typed function-call interface –Paired asynchronous one-way operations »Each request has a corresponding response »Context managed via control blocks

29 Uniform Driver Interface Project UDI - Slide 29 Copyright 2010 Kurt Gollhardt channel context UDI Channel Communications Region A channel handle communication channel channel endpoints Region B channel ops vector Channel Operation entry point region data control block

30 Uniform Driver Interface Project UDI - Slide 30 Copyright 2010 Kurt Gollhardt UDI Architecture Data Model

31 Uniform Driver Interface Project UDI - Slide 31 Copyright 2010 Kurt Gollhardt UDI Data Model Context managed via control blocks –Used with channel ops & async service calls –Environment uses CB to hold service call state –Driver uses context pointer in CB to find its data No memory shared between regions –Memory allocated in a region is private to that region –Regions share data by using channel operations

32 Uniform Driver Interface Project UDI - Slide 32 Copyright 2010 Kurt Gollhardt UDI Control Blocks CB contains scratch and context pointers (preserved across service calls, not ops) »Scratch space in CB holds per-request state »Context pointer lets driver find the context of a channel op or callback Initially set to channel context Channel context struct points to global data All CBs can be cast to generic udi_cb_t

33 Uniform Driver Interface Project UDI - Slide 33 Copyright 2010 Kurt Gollhardt Implicit Synchronization No locking primitives required in UDI –All data accesses implicitly synchronized »Region data accessible only from that region »Only one thread per region active at a time Other calls deferred until active call returns –Typically by adding CB to a region queue –Driver controls its parallelism by picking number and type of regions

34 Uniform Driver Interface Project UDI - Slide 34 Copyright 2010 Kurt Gollhardt More Information on UDI Project UDI Website http://project-udi.org Reference Implementation http://projectudi.sourceforge.net

35 Uniform Driver Interface Project UDI - Slide 35 Copyright 2010 Kurt Gollhardt UDI Specifications Now Available UDI 1.01 Specifications at project-udi.org –UDI Core Specification (2 volumes) –UDI Physical I/O Specification –UDI PCI Bus Binding Specification –UDI System Bus Binding Specification –UDI SCSI Driver Specification –UDI Network Driver Specification –UDI IA-32/IA-64 ABI Binding Specification

36 Uniform Driver Interface Project UDI - Slide 36 Copyright 2010 Kurt Gollhardt Informative Documents Introductory Info –UDI FAQ & Data Sheet –UDI Management & Technical Overviews –UDI Advantages & Opportunities Other Materials –Various Presentations & Tutorials –UDI Environment Implementer’s Guide

37 Uniform Driver Interface Project UDI - Slide 37 Copyright 2010 Kurt Gollhardt Reference Implementation Sample drivers & metalanguage libraries Sample OS implementations, including: –Linux*, UnixWare*, OpenServer*, Solaris* (partial) –Easily portable to other OSes User-mode test environments (no PIO) for: –Linux, UnixWare, Solaris, FreeBSD, Mac OS X Jointly developed by Project UDI members BSD-style Open Source License

38 Uniform Driver Interface Project UDI - Slide 38 Copyright 2010 Kurt Gollhardt Intel Moves Closer to Unix in Standards Effort - Information Week Intel Pushing Unified Unix - InfoWorld/C-Net Intel, Computer Makers to Forge Common Guidelines for Unix - Wall Street Journal Heavyweights Unite Behind Interface for Unix Servers - PC Week Uniform Driver Interface Spells Relief - EE Times UDI News Headlines (1999)

39 Uniform Driver Interface Project UDI - Slide 39 Copyright 2010 Kurt Gollhardt UDI Architecture More Details & Examples

40 Uniform Driver Interface Project UDI - Slide 40 Copyright 2010 Kurt Gollhardt UDI Metalanguages Device-type specific communication for a particular device class Defines communication paradigm between cooperating modules –Operations and sequences to implement technology-specific functionality Analogous to SCSI CAM, DLPI, etc.

41 Uniform Driver Interface Project UDI - Slide 41 Copyright 2010 Kurt Gollhardt Metalanguages and Channels Metalanguages define: –Number and types of channels –Legal “channel operation” types for each channel type »Control block plus meta-specific parameters –Structure of control block for each operation type »Meta-specific “subclasses” of generic udi_cb_t »Implemented in C by using udi_cb_t as first member of each udi_xxx_cb_t structure

42 Uniform Driver Interface Project UDI - Slide 42 Copyright 2010 Kurt Gollhardt UDI Execution Model Driver’s udi_init_info structure contains entry- point pointers, size requirements, etc. No other global entry points –Avoids possible name collisions –No need to wrap driver with generated entry tables All driver code executed in context of a region –Regions are associated with driver instances »At least one region for each adapter/device controlled

43 Uniform Driver Interface Project UDI - Slide 43 Copyright 2010 Kurt Gollhardt Fundamental Data Types Specific-length types –udi_ubit8_t, udi_sbit8_t, udi_ubit16_t, udi_sbit16_t, udi_ubit32_t, udi_sbit32_t –udi_boolean_t (udi_ubit8_t) Abstract types –udi_size_t, udi_index_t

44 Uniform Driver Interface Project UDI - Slide 44 Copyright 2010 Kurt Gollhardt Fundamental Data Types (continued) Opaque types –Contain environment-private fields and structure –Must be allocated using UDI service calls –Opaque handles »udi_channel_t, udi_constraints_t Semi-opaque types –udi_cb_t *, udi_buf_t *

45 Uniform Driver Interface Project UDI - Slide 45 Copyright 2010 Kurt Gollhardt Core Services Inter-Module Communication (IMC) Memory Management Buffer Management Time Management Tracing and Logging

46 Uniform Driver Interface Project UDI - Slide 46 Copyright 2010 Kurt Gollhardt Core Utility Functions String/Memory Utilities –udi_strcpy, udi_strlen, udi_memcmp et al –udi_snprintf, udi_strtou32 Queue Management Utilities Endianness Management Utilities

47 Uniform Driver Interface Project UDI - Slide 47 Copyright 2010 Kurt Gollhardt Core Metalanguages Management Metalanguage –Environment-initiated control operations Generic I/O Metalanguage –Generic read/write plus custom ops –Useful for prototyping and “one-off” extensions –Used to access driver diagnostics

48 Uniform Driver Interface Project UDI - Slide 48 Copyright 2010 Kurt Gollhardt Region Kill Different environments have different levels of trust in drivers UDI environments can: –detect misbehaved drivers (e.g. bad pointers) –track resource ownership and transfers –abruptly terminate (“region-kill”) driver instances »Frees all resources and shuts down device

49 Uniform Driver Interface Project UDI - Slide 49 Copyright 2010 Kurt Gollhardt Host OS UDI Environment Example UDI & I 2 O Combination OS-to-UDI External Mapper Application UDI Driver (OSM) I 2 O Mapper I 2 O RTOS System Bus Hardware I 2 O Mapper UDI Environment UDI Driver (HDM) I2O Messages


Download ppt "UDI, a Uniform Driver Interface Architecture Overview Kurt Gollhardt (Chair, Project UDI) November 2010."

Similar presentations


Ads by Google