summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--configure.ac8
-rw-r--r--doc/Makefile.am20
-rw-r--r--doc/ddf_insert_event.fig148
-rw-r--r--doc/device-drivers.tex130
-rw-r--r--doc/hurd-on-l4.tex1
6 files changed, 275 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index 86067cf..240eb56 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-03-09 Daniel Wagner <wagi@gmx.ch>
+
+ * configure.ac: Add check for fig2dev.
+ * doc/Makefile.am (EXTRA_DIST): New target.
+ (tex_files, fig_files, eps_files, eps_cleanfiles): New variable
+ (SUFFIXES): Add eps, fig and pdf to the list.
+ (.fig.eps): New generic rule.
+ (MAINTAINERCLEANFILES): New target.
+ * doc/ddf_insert_event.fig: New file.
+
2003-10-12 Marcus Brinkmann <marcus@gnu.org>
* acinclude.m4: New file.
diff --git a/configure.ac b/configure.ac
index fc952d0..a9c65ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,8 @@ AC_CONFIG_SRCDIR([laden/laden.c])
AC_CONFIG_HEADER([config.h])
AC_GNU_SOURCE
+maintainer_mode=${enable_maintainer_mode-no}
+
# Checks for programs.
AC_PROG_CC
AM_PROG_AS
@@ -51,6 +53,12 @@ AC_PATH_PROG([PS2PDF], [ps2pdf], no)
if test "x$PS2PDF" = xno; then
missing_progs="$missing_progs ps2pdf"
fi
+AC_PATH_PROG([FIG2DEV], [fig2dev], no)
+if test "x$FIG2DEV" = xno; then
+ if test "x$maintainer_mode" = xyes; then
+ missing_progs="missing_progs fig2dev"
+ fi
+fi
# Checks for libraries.
AC_MSG_CHECKING([for static GNU C library])
diff --git a/doc/Makefile.am b/doc/Makefile.am
index b226e5b..9820c07 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -20,9 +20,9 @@
pkgdata_DATA = hurd-on-l4.dvi hurd-on-l4.ps hurd-on-l4.pdf
-# _DEPENDENCIES does not work with _DATA.
-hurd-on-l4.dvi: \
- hurd-on-l4.tex \
+EXTRA_DIST=${fig_files} ${eps_files} ${tex_files} hurd-on-l4.ps hurd-on-l4.pdf
+
+tex_files= hurd-on-l4.tex \
introduction.tex \
booting.tex \
ipc.tex \
@@ -32,7 +32,15 @@ hurd-on-l4.dvi: \
debugging.tex \
device-drivers.tex
-SUFFIXES = .ps .dvi .tex
+fig_files=ddf_insert_event.fig
+
+eps_files=$(patsubst %.fig,%.eps,${fig_files})
+eps_cleanfiles=${eps_files}
+
+# _DEPENDENCIES does not work with _DATA.
+hurd-on-l4.dvi: ${eps_files} ${tex_files}
+
+SUFFIXES = .ps .dvi .tex .eps .fig .pdf
.tex.dvi:
$(LATEX) $< -o $@
@@ -48,6 +56,10 @@ SUFFIXES = .ps .dvi .tex
.ps.pdf:
$(PS2PDF) $<
+.fig.eps:
+ $(FIG2DEV) -L eps $< $@
+
clean:
rm -f *.aux *.ps *.dvi *.pdf *.log *.toc
+MAINTAINERCLEANFILES=${eps_cleanfiles}
diff --git a/doc/ddf_insert_event.fig b/doc/ddf_insert_event.fig
new file mode 100644
index 0000000..9a3a074
--- /dev/null
+++ b/doc/ddf_insert_event.fig
@@ -0,0 +1,148 @@
+#FIG 3.2
+Portrait
+Center
+Metric
+A4
+100.00
+Single
+-2
+1200 2
+2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5
+ 5625 1125 6525 1125 6525 5175 5625 5175 5625 1125
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 4050 1350 5625 1350
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 5625 1575 4050 1575
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 6525 1350 7200 1350
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 7200 1575 6525 1575
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 4050 2475 5625 2475
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 6525 2475 7200 2475
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 7200 2700 6525 2700
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 5625 2700 4050 2700
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 4050 3600 5625 3600
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 6525 3600 7200 3600
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 7200 3825 6525 3825
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 5625 3825 4050 3825
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 7650 4050 7650 4500
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 7875 4500 7875 4050
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 4
+ 1 1 1.00 60.00 120.00
+ 7650 5175 7650 5400 2250 5400 2250 5175
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 4
+ 1 1 1.00 60.00 120.00
+ 2025 5175 2025 5625 7875 5625 7875 5175
+2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5
+ 7200 1125 8100 1125 8100 1800 7200 1800 7200 1125
+2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5
+ 7200 2250 8100 2250 8100 2925 7200 2925 7200 2250
+2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5
+ 7200 3375 8100 3375 8100 4050 7200 4050 7200 3375
+2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5
+ 7200 4500 8100 4500 8100 5175 7200 5175 7200 4500
+2 2 1 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5
+ 6300 900 8325 900 8325 5850 6300 5850 6300 900
+2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5
+ 4500 4050 5400 4050 5400 5175 4500 5175 4500 4050
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 4500 4275 4050 4275
+2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5
+ 3375 1125 4050 1125 4050 5175 3375 5175 3375 1125
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 2700 1350 3375 1350
+2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5
+ 1800 1125 2700 1125 2700 2250 1800 2250 1800 1125
+2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5
+ 1800 2610 2700 2610 2700 3735 1800 3735 1800 2610
+2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5
+ 1800 4050 2700 4050 2700 5175 1800 5175 1800 4050
+2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 2070 2610 2070 2250
+2 2 1 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5
+ 1575 900 5850 900 5850 5850 1575 5850 1575 900
+2 1 2 1 0 7 60 -1 -1 3.000 0 0 -1 0 0 2
+ 5400 4725 3375 4725
+2 1 2 1 0 7 60 -1 -1 3.000 0 0 -1 0 0 2
+ 4500 5175 4050 5175
+2 1 2 1 0 7 60 -1 -1 3.000 0 0 -1 0 0 2
+ 2700 5175 3375 4275
+2 1 2 1 0 7 60 -1 -1 3.000 0 0 -1 0 0 3
+ 1800 4725 2700 4725 3375 3825
+2 1 2 1 0 7 60 -1 -1 3.000 0 0 -1 0 0 2
+ 3375 3825 4050 3825
+2 1 2 1 0 7 60 -1 -1 3.000 0 0 -1 0 0 2
+ 3375 4275 4050 4275
+2 1 2 1 0 7 60 -1 -1 3.000 0 0 -1 0 0 4
+ 1800 3150 2700 3150 3375 2925 4050 2925
+2 1 2 1 0 7 60 -1 -1 3.000 0 0 -1 0 0 3
+ 2700 3735 3375 3510 4050 3510
+2 1 2 1 0 7 60 -1 -1 3.000 0 0 -1 0 0 3
+ 1800 1800 2700 1800 3375 2025
+2 1 2 1 0 7 60 -1 -1 3.000 0 0 -1 0 0 2
+ 3375 2025 4050 2025
+2 1 2 1 0 7 60 -1 -1 3.000 0 0 -1 0 0 3
+ 2700 2250 3375 2475 4050 2475
+4 0 0 60 -1 0 12 0.0000 4 135 135 2250 2475 1.\001
+4 0 0 60 -1 0 12 0.0000 4 135 135 3150 1260 2.\001
+4 0 0 60 -1 0 12 0.0000 4 135 135 5400 3375 3.\001
+4 0 0 60 -1 0 12 0.0000 4 135 225 5400 2250 16.\001
+4 0 0 60 -1 0 12 0.0000 4 135 225 5400 1125 11.\001
+4 0 0 60 -1 0 12 0.0000 4 135 225 4275 1800 14.\001
+4 0 0 60 -1 0 12 0.0000 4 135 225 4275 2925 20.\001
+4 0 0 60 -1 0 12 0.0000 4 135 225 4275 4050 10.\001
+4 0 0 60 -1 0 12 0.0000 4 135 225 4275 4500 15.\001
+4 0 0 60 -1 0 12 0.0000 4 135 225 6975 1125 12.\001
+4 0 0 60 -1 0 12 0.0000 4 135 225 6975 2250 17.\001
+4 0 0 60 -1 0 12 0.0000 4 135 225 6750 2925 18.\001
+4 0 0 60 -1 0 12 0.0000 4 135 225 6750 1800 13.\001
+4 0 0 60 -1 0 12 0.0000 4 135 135 6975 3375 4.\001
+4 0 0 60 -1 0 12 0.0000 4 135 135 6750 4050 9.\001
+4 0 0 60 -1 0 12 0.0000 4 135 135 7425 4275 5.\001
+4 0 0 60 -1 0 12 0.0000 4 135 135 8100 4275 8.\001
+4 0 0 60 -1 0 12 0.0000 4 135 135 8100 5400 7.\001
+4 0 0 60 -1 0 12 0.0000 4 135 135 2475 5400 6.\001
+4 0 0 60 -1 0 12 0.0000 4 135 225 4275 4950 21.\001
+4 0 0 60 -1 0 12 0.0000 4 135 240 1575 6075 ddf\001
+4 0 0 60 -1 0 12 0.0000 4 135 330 8010 6075 hurd\001
+4 0 0 60 -1 0 12 0.0000 4 135 705 1890 1530 Root Bus\001
+4 0 0 60 -1 0 12 0.0000 4 135 480 1890 1755 Driver\001
+4 0 0 60 -1 0 12 0.0000 4 135 630 1845 2880 PCI Bus\001
+4 0 0 60 -1 0 12 0.0000 4 135 480 1845 3105 Driver\001
+4 0 0 60 -1 0 12 0.0000 4 135 315 1935 4365 IDE\001
+4 0 0 60 -1 0 12 0.0000 4 135 480 1935 4590 Driver\001
+4 0 0 60 -1 0 12 0.0000 4 135 315 4590 4365 NIC\001
+4 0 0 60 -1 0 12 0.0000 4 135 480 4590 4590 Driver\001
+4 0 0 60 -1 0 12 0.0000 4 135 375 3465 1530 PLM\001
+4 0 0 60 -1 0 12 0.0000 4 135 405 5850 1530 Deva\001
+4 0 0 60 -1 0 12 0.0000 4 135 480 7245 1485 wortel\001
+4 0 0 60 -1 0 12 0.0000 4 180 720 7245 2610 physmem\001
+4 0 0 60 -1 0 12 0.0000 4 135 330 7290 3780 ext2\001
+4 0 0 60 -1 0 12 0.0000 4 180 795 7290 4815 ddwrapper\001
diff --git a/doc/device-drivers.tex b/doc/device-drivers.tex
index 42af801..53825c3 100644
--- a/doc/device-drivers.tex
+++ b/doc/device-drivers.tex
@@ -29,13 +29,6 @@ The framework consists of:
\item Service servers (plugin managers, $\omega_0$, deva)
\end{itemize}
-\subsection{Drivers and the filesystem}
-
-The device driver framework will only offer a physical device view.
-Ie. it will be a tree with devices as the leaves connected by
-various bus technologies. Any logical view and naming persistence
-will have to be build on top of this (translator).
-
\subsection{Layer of the drivers}
The device driver framework consists only of the lower level drivers
@@ -60,7 +53,10 @@ is small enough to do so.
It is assumed that there are no differences between physical memory
pages. For example each physical memory page can be used for DMA
transfers. Of course, older hardware like ISA devices can so not be
-supported. Who cares?
+supported.
+
+Still some support for ISA devices like serial ports and PS/2 for
+keyboard is needed.
With this assumption, the device driver framework can be given any
physical memory page for DMA operation. This physical memory page
@@ -112,11 +108,14 @@ perform the following tasks:
1 insertion event for every device connected to it when the bus
driver is started. Drivers which don't support autoprobing of
devices will probably have to read some configuration data from a
- file or if the driver is a needed for bootstrapping configuration
- can be given as argument on its stack. In some cases the bus
- doesn't generate insertion/removal events, but can still support
- some form of hotplug functionality if the user tells the driver when
- a change to the bus configuration has happened (eg. SCSI).
+ file\footnote{It might be a good idea, if the device driver has no
+ notion how the configuraiton is stored. It just asks the bus driver
+ which should know how to get the configuration.} or if the driver is
+ a needed for bootstrapping configuration can be given as argument on
+ its stack. In some cases the bus doesn't generate insertion/removal
+ events, but can still support some form of hotplug functionality if
+ the user tells the driver when a change to the bus configuration has
+ happened (eg. SCSI).
\item Configure client device drivers
The bus driver should start the appropriate client device driver
@@ -139,8 +138,9 @@ perform the following tasks:
can get access to the memory range or is allowed to access the I/O
addresses. The client device driver should use a library, which is
bus dependant, to access the device on the bus. This library hides
- the platform specific details of accessing the bus.
-
+ the platform specific details of accessing the bus.
+\item Rescans
+
Furthermore the bus driver must also support rescans for hardware.
It might be that not all drivers are found during bootstrapping and
hence later on drivers could be loaded. This is done by regenerate
@@ -148,16 +148,13 @@ perform the following tasks:
manager loads then if possible a new driver. A probe funtion is not
needed since all supported hardware can be identified by
vendor/device identifactions (unlike ISA hardware). For hardware
- busses which don't support such identifaction (ISA) only static
+ busses which don't support such identifaction only static
configuration is possible (configuration scripts etc.)
\end{itemize}
\subsection{Root bus driver}
-The root bus is the entrypoint to look up devices.
-
-XXX There should be iterators/visitors for operating on
-busses/devices. (daniel)
+The root bus is the entrypoint to look up devices.
\subsection{Generic Bus Driver}
@@ -167,10 +164,6 @@ Operations:
\item string enumerate
\end{itemize}
-XXX Extract generic bus services from the PCI Bus Driver section
-which could be also be used other PCI related busses (ISA) be used.
-The name for this service is missleading, since a SCSI Bus Driver
-does not have anything in common with a PCI bus. (daniel)
\subsection{ISA Bus Driver}
@@ -184,7 +177,6 @@ Operations:
\item (none)
\end{itemize}
-XXX The interface has not been defined up to now. (daniel)
\subsection{PCI Bus Driver}
@@ -263,11 +255,9 @@ Inherits from:
Supported devices
\begin{itemize}
\item Keyboard (ps2)
-\item serial port (mainly for debugging purposses)
-\item parallel port
+\item Serial port (mainly for debugging purposses)
\end{itemize}
-XXX interface definition for each device driver is missing. (daniel)
\subsection{PCI Devices}
@@ -279,11 +269,8 @@ Inherits from:
Supported devices:
\begin{itemize}
\item block devices
-\item ...
\end{itemize}
-XXX interface definition for each device driver is missing. (daniel)
-
\section{Service Servers}
@@ -294,9 +281,16 @@ are send. The owner of the handle/refence must then take
appropriate action like loading the drivers. These actors are
called plugin managers.
+The plugin manager is also the pager for the loaded driver.
+
+\begin{comment}
+Obviously, the plugin manager needs some sort of exec format
+support. Maybe it's own ELF loader.
+\end{comment}
+
\subsection{Deva}
-Deva stands for Device Access Server. This server implements basic
+Deva stands for \emph{Device Access Server}. This server implements basic
services for the device driver framework like thread creation, thread
deletion, etc. The device driver framework itself doesn't depend on
any Hurd code. The interaction with the Hurd system will be
@@ -311,6 +305,8 @@ Which services must deva provide:
\item bootstrapping
\end{itemize}
+%% Deva is also the pager for the first plugin manager.
+
\subsection{$\omega_0$}
$\omega_0$ is a system-central IRQ-logic server. It runs in the
@@ -319,7 +315,7 @@ privileged AS space in order to be allowed rerouting IRQ IPC.
If an IRQ is shared between several devices, the drivers are daisy
chained and have to notify their peers if an IRQ IPC has arrived.
-For more details see http://os.inf.tu-dresden.de/~hohmuth/prj/omega0.ps.gz
+For more details see http://os.inf.tu-dresden.de/\~hohmuth/prj/omega0.ps.gz
Operations:
\begin{itemize}
@@ -417,11 +413,6 @@ The device driver framework will be started by deva, which is started
by wortel. All drivers and server (e.g. the plugin manager) are
stored in a archive which will be extracted by deva.
-\subsection{Plugin Manager}
-
-A Plugin manager handles driver loading for devices. It ask for drivers
-deva.
-
\subsection{deva}
For bootstrapping deva will only have a subset of drivers ready.
@@ -429,6 +420,16 @@ As soon the filesystem runs deva can ask for drivers from the harddisk.
If new drivers are available it has to inform the plugin manager to ask
for unresolved drivers again.
+Deva starts as first task a plugin server. The plugin server does
+then the rest of the bootstrapping process.
+
+\subsection{Plugin Manager}
+
+A Plugin manager handles driver loading for devices. It ask for drivers
+deva.
+
+The first plugin server does also some bootstrapping. First, it starts
+the root bus driver.
\section{Order of implementation}
@@ -441,3 +442,56 @@ for unresolved drivers again.
\item console
\end{enumerate}
+\section{Scenarios}
+\subsection{Insert Event}
+
+\begin{figure}
+ \begin{center}
+ \includegraphics{ddf_insert_event.eps}
+ \end{center}
+ \caption{A new hardware device is detected.}
+ \label{fig:ddf_insert_event}
+\end{figure}
+
+If a simple hardware device is found the ddf will load an driver for
+the new hardware device as follows (see Figure~\ref{fig:ddf_insert_event}):
+
+\begin{enumerate}
+\item The PCI Bus Driver detects a hardware device for which now driver
+has been loaded yet. It generates an insert event which is sends to
+one (all?) registered entity. The interface for the event handler has
+not been decided yet.
+\item The Root Bus Driver receives the event signal. Note it is not
+necessary that the Root Bus Driver handles for all drivers the insert
+signal. It forwards the signal to the/a Plugin Manager (PLM).
+\item The/a Plugin Manager (PLM) asks Deva to load the driver binary
+for the new device.
+\item Deva forwards the loading request to the ext2 filesystem
+process. During bootstrapping Deva will handle the request by itself.
+Deva has an archive of drivers loaded by grub.
+\item The ext2 process decides where it finds the device driver binary
+(block address)
+\item The ddwrapper (device driver wrapper) forwards the read call
+from the ext2 process to the IDE Driver.
+\item After checking if the caller is allowed start a read command,
+the IDE Driver reads the device driver from the disk.
+\item The IDE Driver returns the data.
+\item ddwrapper returns the data. XXX This might be wrong. IFRC, the
+data is return in a container and only the handle of the container is
+transfered.
+\item Ext2 returns the device driver (data).
+\item Deva returns the device driver (data).
+\item Ask Deva to create a new address space.
+\item Deva asks wortel to create new address space.
+\item wortel returns ``a new address space''.
+\item Deva returns ``a new address space''.
+\item PLM is registered as pagefault handler for the new driver
+address space. The bootstrap thread starts to run an generated a
+page fault.
+\item PLM asks Deva for memory.
+\item Deva asks physmem for memory.
+\item physmem returns memory pages.
+\item Deva returns memory pages.
+\item PLM maps the device driver binary into the address space of the
+new driver.
+\end{enumerate}
diff --git a/doc/hurd-on-l4.tex b/doc/hurd-on-l4.tex
index d428440..b4a9e71 100644
--- a/doc/hurd-on-l4.tex
+++ b/doc/hurd-on-l4.tex
@@ -1,6 +1,7 @@
\documentclass{book}
%\usepackage{german}
%\usepackage[margin=2.5cm]{geometry}
+\usepackage{graphicx}
\newenvironment{comment}{\footnotesize \begin{quote}}{\end{quote}}