summaryrefslogtreecommitdiff
path: root/open_issues/user-space_device_drivers.mdwn
blob: 25168fce3c7ac4f919d03ff491db60845e40cebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
[[!meta copyright="Copyright © 2009, 2011, 2012 Free Software Foundation,
Inc."]]

[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]

[[!tag open_issue_gnumach open_issue_hurd]]

This is a collection of resources concerning *user-space device drivers*.

Also see [[device drivers and IO systems]].
[[community/gsoc/project ideas/driver glue code]].

[[!toc levels=2]]


# Issues

## IRQs

  * Can be modeled using [[RPC]]s.

  * Security considerations: IRQ sharing.

  * *Omega0* paper defines an interface.

  * As is can be read in the *Mach 3 Kernel Principles*, there is an *event
    object* facility in Mach that can be used for having user-space tasks react
    to IRQs.  However, at least in GNU Mach, that code (`kern/eventcount.c`)
    doesn't seem functional at all and isn't integrated properly in the kernel.

  * IRC, freenode, #hurd, 2011-07-29

        < antrik> regarding performance of userspace drivers, there is one
          thing that really adds considerable overhead: interrupt
          handling. whether this is relevant very much depends on the hardware
          in question. when sending many small packets over gigabit ethernet,
          it might be noticable; in most other cases it's irrelevant
        < youpi> some cards support interrupt coalescin
        < youpi> could be supported by DDE too

## DMA

  * Security considerations.

      * I/O MMU.

## I/O Ports

  * Security considerations.

## PCI and other buses

  * Security considerations: sharing.

## Latency of doing RPCs

  * [[GNU Mach|microkernel/mach/gnumach]] is said to have a high overhead when
    doing RPC calls.

## System Boot

### IRC, freenode, #hurd, 2011-07-27

    < braunr> btw, was there any formulation of the modifications required to
      have disk drivers in userspace ?
    < braunr> (which would obviously need something like
      initrd/initramfs/whatever and may also need the root file system not to
      be the first task started)
    < braunr> hm actually, we may not need initrd
    < braunr> the boot loader could just load more modules
    < antrik> braunr: I have described all that in my thesis report... in
      German :-(
    < braunr> and the boot scripts could be adjusted to pass around the right
      ports
    < Tekk_> braunr: yeah, we could probably load a module that kciks us into
      userspace and starts the disk driver
    < braunr> modules are actualy userspace executables
    < Tekk_> ah
    < Tekk_> so what's the issue?
    < Tekk_> oh! I'm thinking the ext2fs server, which is already in userspce
    < braunr> change the file systems to tell them which underlying disk driver
      to use
    < Tekk_> mhm
    < braunr> s/disk/storage/

### IRC, freenode, #hurd, 2012-04-25

    <youpi> btw, remember the initrd thing?
    <youpi> I just came across task.c in libstore/ :)


# Plan

  * Examine what other systems are doing.

      * L4

          * Hurd on L4: deva, fabrica

          * [[/DDE]]

      * Minix 3

  * Start with a simple driver and implement the needed infrastructure (see
    *Issues* above) as needed.

      * <http://savannah.nongnu.org/projects/user-drivers/>

        Some (unfinished?) code written by Robert Millan in 2003: PC keyboard
        and parallel port drivers, using `libtrivfs`.


# Documentation

  * [An Architecture for Device Drivers Executing as User-Level
    Tasks](http://portal.acm.org/citation.cfm?id=665603), 1993, David B. Golub,
    Guy G. Sotomayor, Freeman L. Rawson, III

  * [Performance Measurements of the Multimedia Testbed on Mach 3.0: Experience
    Writing Real-Time Device Drivers, Servers, and
    Applications](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.40.8685),
    1993, Roger B. Dannenberg, David B. Anderson, Tom Neuendorffer, Dean
    Rubine, Jim Zelenka

  * [User Level IPC and Device Management in the Raven
    Kernel](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.57.3733),
    1993, D. Stuart Ritchie, Gerald W. Neufeld

  * [Creating User-Mode Device Drivers with a
    Proxy](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.26.3055),
    1997, Galen C. Hunt

  * [The APIC Approach to High Performance Network Interface Design: Protected
    DMA and Other
    Techniques](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.56.1198),
    1997, Zubin D. Dittia, Guru M. Parulkar, Jerome R. Cox, Jr.

  * [The Fluke Device Driver
    Framework](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.7927),
    1999, Kevin Thomas Van Maren

  * [Omega0: A portable interface to interrupt hardware for L4
    system](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.21.5958),
    2000, Jork Löser, Michael Hohmuth

  * [Userdev: A Framework For User Level Device Drivers In
    Linux](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.3.4461),
    2000, Hari Krishna Vemuri

  * [User Mode Drivers](http://www.linuxjournal.com/article/5442), 2002, Bryce
    Nakatani

  * [Towards Untrusted Device
    Drivers](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.13.1725),
    2003, Ben Leslie, Gernot Heiser

  * [Encapsulated User-Level Device Drivers in the Mungi Operating
    System](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.6.1531),
    2004, Ben Leslie Nicholas, Nicholas FitzRoy-Dale, Gernot Heiser

  * [Linux Kernel Infrastructure for User-Level Device
    Drivers](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.10.1408),
    2004, Peter Chubb

      * [Get More Device Drivers out of the
        Kernel!](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.59.6333),
        2004, Peter Chubb

      * <http://gelato.unsw.edu.au/IA64wiki/UserLevelDrivers>

  * [Initial Evaluation of a User-Level Device
    Driver](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.59.4531),
    2004, Kevin Elphinstone, Stefan Götz

  * [User-level Device Drivers: Achieved
    Performance](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.59.6766),
    2005, Ben Leslie, Peter Chubb, Nicholas FitzRoy-Dale, Stefan Götz, Charles
    Gray, Luke Macpherson, Daniel Potts, Yueting Shen, Kevin Elphinstone,
    Gernot Heiser

  * [Virtualising
    PCI](http://www.ice.gelato.org/about/oct06_presentations.php#pres14), 2006,
    Myrto Zehnder, Peter Chubb

  * [Microdrivers: A New Architecture for Device
    Drivers](http://www.cs.rutgers.edu/~vinodg/papers/hotos2007/), 2007, Vinod
    Ganapathy, Arini Balakrishnan, Michael M. Swift, Somesh Jha

      * <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.109.2623>
        [[!tag open_issue_documentation]]

      * <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.146.2170>
        [[!tag open_issue_documentation]]


# External Projects

  * [[/DDE]]

  * <http://ertos.nicta.com.au/research/drivers/uldd/>

  * <http://gelato.unsw.edu.au/IA64wiki/UserLevelDrivers>