summaryrefslogtreecommitdiff
path: root/microkernel/mach
diff options
context:
space:
mode:
Diffstat (limited to 'microkernel/mach')
-rw-r--r--microkernel/mach/concepts.mdwn6
-rw-r--r--microkernel/mach/discussion.mdwn23
-rw-r--r--microkernel/mach/documentation.mdwn24
-rw-r--r--microkernel/mach/external_pager_mechanism.mdwn181
-rw-r--r--microkernel/mach/gnumach.mdwn30
-rw-r--r--microkernel/mach/gnumach/boot_trace.mdwn222
-rw-r--r--microkernel/mach/gnumach/building.mdwn114
-rw-r--r--microkernel/mach/gnumach/building/example.mdwn54
-rw-r--r--microkernel/mach/gnumach/debugging.mdwn68
-rw-r--r--microkernel/mach/gnumach/hardware_compatibility_list.mdwn111
-rw-r--r--microkernel/mach/gnumach/hardware_compatibility_list/discussion.mdwn4
-rw-r--r--microkernel/mach/gnumach/hardwarecompatibilitylist.mdwn11
-rw-r--r--microkernel/mach/gnumach/open_issues.mdwn19
-rw-r--r--microkernel/mach/gnumach/ports.mdwn15
-rw-r--r--microkernel/mach/gnumach/ports/xen.mdwn84
-rw-r--r--microkernel/mach/gnumach/ports/xen/internals.mdwn14
-rw-r--r--microkernel/mach/gnumach/ports/xen/networking_configuration.mdwn105
-rw-r--r--microkernel/mach/gnumach/projects.mdwn129
-rw-r--r--microkernel/mach/gnumach/projects/clean_up_the_code.mdwn121
-rw-r--r--microkernel/mach/gnumach/projects/gdb_stubs.mdwn13
-rw-r--r--microkernel/mach/history.mdwn64
-rw-r--r--microkernel/mach/ipc.mdwn22
-rw-r--r--microkernel/mach/ipc/sequence_numbering.mdwn19
-rw-r--r--microkernel/mach/logo.pngbin0 -> 13617 bytes
-rw-r--r--microkernel/mach/mig.mdwn13
-rw-r--r--microkernel/mach/mig/building.mdwn71
-rw-r--r--microkernel/mach/mig/dealloc.mdwn11
-rw-r--r--microkernel/mach/mig/discussion.mdwn17
-rw-r--r--microkernel/mach/mig/documentation.mdwn77
-rw-r--r--microkernel/mach/mig/logo.pngbin0 -> 23622 bytes
-rw-r--r--microkernel/mach/mig/open_issues.mdwn19
-rw-r--r--microkernel/mach/mig/open_issues/duplicate_inclusion_guards.mdwn14
-rw-r--r--microkernel/mach/port.mdwn41
-rw-r--r--microkernel/mach/rpc.mdwn15
34 files changed, 1731 insertions, 0 deletions
diff --git a/microkernel/mach/concepts.mdwn b/microkernel/mach/concepts.mdwn
new file mode 100644
index 00000000..04dbb1c6
--- /dev/null
+++ b/microkernel/mach/concepts.mdwn
@@ -0,0 +1,6 @@
+[[Mach]] is a first-generation [[microkernel]]. Mach's basic abstractions
+include [[address_space]]s in the form of [[task]]s, execution contexts in the
+form of [[thread]]s, [[IPC]], [[capabilities|capability]] in the form of [[port]]s, and
+[[memory_object]]s, which enable Mach's [[external_pager_mechanism]].
+
+Mach's [[API]] is well-[[documented|documentation]].
diff --git a/microkernel/mach/discussion.mdwn b/microkernel/mach/discussion.mdwn
new file mode 100644
index 00000000..589e302d
--- /dev/null
+++ b/microkernel/mach/discussion.mdwn
@@ -0,0 +1,23 @@
+## <a name="Maintenance_of_the_Mach_web"> Maintenance of the Mach web </a>
+
+**_Old discussions:_** [[WIKIHOMEURLMachTOPICrev13]]
+
+Interesting, for consistency sake I'll think about making your changes you made on the right hand side to the other web WebHome pages. I guess it's not critical that they are identical, but I was trying to keep them identical if possible. I also wanted it to be "light" enough feature wise that it doesn't overpower the page. You've added back a few of the features, so we obviously differ in how important you and I think these features are. That's OK, I'll think about it some more and we'll see what happens.
+
+Oh, I see you added back [[WebTopicList]] and [[WebPreferences]]. I purposely removed [[WebPreferences]] from the lists on the right because it has nothing to do with navigation. I also didn't think that people actually use topic names to navigate. If they do they could search for them. Keeping the number to four items instead of six and keeping the descriptions concise makes a big difference when I view the page.
+
+(goes off to think more...)
+
+and eat... ;-)
+
+-- [[Main/GrantBow]] - 29 Dec 2002
+
+**_Reasons for my change:_**
+
+1. [[WebTopicList]] is a lot quicker than the [[WebIndex]] - brings down the load times and the load of the server
+2. [[WebPreferences]] - users might be curious to see what can be modified. Changes should of course only be made in their home topics, like in %WIKIUSERNAME%. However, the [[WebPreferences]] can serve as an inspiration. Therefore we should perhaps make sure only the [[Main/TWikiAdminGroup]] members can alter the \*Preferences topics.
+3. If you look closely I've also reordered the links. Shorter names first and long ones last, I tried to keep the descriptions brief and in proportional length as well.
+
+I don't know about you, but keeping the number of items to four rather than six doesn't really matter to me. The text is quite small and if it's the space we're after the [[WebStatistics]] does take up more than the navigation links.
+
+-- [[Main/JoachimNilsson]] - 29 Dec 2002
diff --git a/microkernel/mach/documentation.mdwn b/microkernel/mach/documentation.mdwn
new file mode 100644
index 00000000..fe870386
--- /dev/null
+++ b/microkernel/mach/documentation.mdwn
@@ -0,0 +1,24 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+ - [Meet Mach](http://www.stepwise.com/Articles/Technical/MeetMach.html), a
+ summary of Mach's history and main concepts.
+
+ - OSF's [Kernel Interface (ps)](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_interface.ps)
+ [Kernel Interface (pdf)](http://shakthimaan.com/downloads/hurd/kernel_interface.pdf)
+
+ - OSF's [Kernel Principles (ps)](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_principles.ps)
+ [Kernel Principles (pdf)](http://shakthimaan.com/downloads/hurd/kernel_principles.pdf)
+
+ - [Porting and Modifying the Mach 3.0 Microkernel](http://shakthimaan.com/downloads/hurd/Porting%20and%20Modifying%20the%20Mach%203.0%20Microkernel.pdf)
+
+ - [An IO System for Mach](http://shakthimaan.com/downloads/hurd/An%20IO%20System%20for%20Mach.pdf)
+
+ - [A Programmers' Guide to Mach System Call](http://shakthimaan.com/downloads/hurd/A.Programmers.Guide.to.the.Mach.System.Calls.pdf)
diff --git a/microkernel/mach/external_pager_mechanism.mdwn b/microkernel/mach/external_pager_mechanism.mdwn
new file mode 100644
index 00000000..608b6581
--- /dev/null
+++ b/microkernel/mach/external_pager_mechanism.mdwn
@@ -0,0 +1,181 @@
+[[meta copyright="Copyright © 2002, 2007, 2008 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]]."]]"""]]
+
+Mach provides a so-called external pager [[mechanism]]. This
+mechanism serves to separate *managing memory* from *managing
+content*. Mach does the former while user space tasks do the
+latter.
+
+
+# Introduction
+
+In Mach, a task's [[Mach/AddressSpace]] consists of references
+to [[Mach/MemoryObjects]]. A memory object is designated using
+a [[port]] (a port is just a [[capability]]) and
+implemented by a normal process.
+
+To associate a memory object with a portion of a task's
+address space, vm\_map is invoked a capability designating
+the task and passing a reference to the memory object
+and the offset at which to install it. (The first time
+a task maps an object, Mach sends an initialization message
+to the server including a control capability, which it uses
+to supply pages to the kernel.) This is essentially
+the same as mapping a file into an address space on [[Unix]]
+using mmap.
+
+When a task faults, Mach checks to see if there is a memory
+object associated with the fault address. If not, the task
+is sent an exception, which is normally further propagated
+as a segmentation fault. If there is an associated memory
+object, Mach checks whether the corresponding page is in core.
+If it is, it installs the page and resumes the task. Mach
+then invokes the memory object with the memory\_object\_request
+method and the page to read. The memory manager then fetches
+or creates the content as appropriate and supplies it to
+Mach using the memory\_object\_supply method.
+
+
+# Creating and Mapping a Memory Object
+
+The following illustrates the basic idea:
+
+> ________
+> / \
+> | Mach |
+> \________/
+> /| / |\ \
+> (C) vm_map / / m_o_ready (E)\ \ (D) memory_object_init
+> / |/ (F) return \ \|
+> ________ ________
+> / \ -----> / \
+> | Client | (A) open | Server |
+> \________/ <----- \________/
+> (B) memory_object
+
+(A) The client sends an "open" rpc to the server.
+
+(B) The server creates a memory object (i.e., a port receive right), adds
+it to the port set that it is listening on and returns a capability (a port
+send right) to the client.
+
+(C) The client attempts to map the object into its address space using
+the vm\_map rpc. It passes a reference to the port that the server gave
+it to the vm server (typically Mach).
+
+(D) Since Mach has never seen the object before, it queues a
+memory\_object\_init on the given port along with a send right (the
+memory control port) for the manager to use to send messages to the
+kernel and also as an authentication mechanism for future
+interactions: the port is supplied so that the manager will be able to
+identify from which kernel a given memory\_object\_* IPC is from.
+
+(E) The server dequeues the message, initializes internal data
+structures to manage the mapping and then invokes the
+memory\_object\_ready method on the control object.
+
+(F) The kernel sees that the manager is ready, sets up the appropriate
+mappings in the client and then replies to the vm\_map rpc indicating
+success.
+
+There is nothing stopping others from playing "the kernel." This is
+not a security problem: clients must [[trust]] the server from whom they
+obtain memory objects and also the servers with whom they share
+the object. Multiple memory managers are a reality that should be
+dealt with gracefully: they are useful for network transparent
+mappings etc.
+
+
+# Resolving Page Faults
+
+> (G) Client ________
+> resumed / \
+> | Mach |
+> (A) Fault +----|------+ | \ (B) m_o_request (C) store_read
+> ____|___ \_____|__/ |\ \| ________ _________
+> / +---\-------+ \ / \ / \
+> | Client | (F) | Server |<===>| storeio |
+> \________/ m_o_supply \________/ \_________/
+> (E) return data | ^
+> | | (D) device_read
+> v |
+> ________
+> / Device \
+> | Driver |
+> \________/
+> | ^
+> | |
+> v
+> ____________
+> / Hardware \
+
+(A) The client does a memory access and faults. The kernel catches
+the fault and maps the address to the appropriate memory object. It
+then invokes the memory\_object\_request method on the associated
+capability. (In addition to the page to supply, it also supplies the
+control port so that the server can determine which kernel
+sent the message.)
+
+(B) The manager dequeues the message. On the Hurd, this is translated
+into a store\_read: a function in the libstore library which is used to
+transparently manage block devices. The storeio server starts off as
+a separate process, however, if the server has the appropriate
+permission, the backing object can be contacted directly by the
+server. This layer of indirection is desirable when, for instance, a
+storeio running as root may want to only permit read only access to a
+resource, yet it cannot safely transfer its handle to the client. In
+this case, it would proxy the requests.
+
+(C) The storeio server contacts, for instance, a device driver to do
+the read. This could also be a network block device (the NBD server
+in GNU/Linux), a file, a memory object, etc.
+
+(D) The device driver allocates an anonymous page from the default
+pager and reads the data into it. Once all of the operations are
+complete, the device returns the data to the client unmapping it from
+its own address space at the same time.
+
+(E) The storeio transfers the page to the server. The page is still
+anonymous.
+
+(F) The manager does a memory\_object\_supply transferring the page to
+the kernel. Only now is the page not considered to be anonymous but
+managed.
+
+(G) The kernel caches the page, installs it in the client's virtual
+address space and finally, resumes the client.
+
+
+# Paging Data Out
+
+> Change manager Pager m_o_return store_write
+> \ _________ (B) __(A)__ (C) ________ (D) _______
+> S | / Default \ / \ / \ / \
+> W |<=>| Pager |<=>| Mach |==>| server |<=>| storeio |<=>
+> A | \_________/ \________/ \________/ \_______/
+> P |
+> /
+
+(A) The paging [[policy]] is implemented by Mach: servers just implement
+the [[mechanism]].
+
+(B) Once the kernel has selected a page that it would like to evict, it
+changes the manager from the server to the default pager. This way,
+if the server does not deallocate the page quickly enough, it cannot
+cause a denial of service: the kernel will just later double page it
+to swap (the default pager is part of the [[tcb]]).
+
+(C) Mach then invokes memory\_object\_return method on the control
+object. The server is expected to save the page free it in a timely
+fashion. The server is not required to send a response to the kernel.
+
+(D) The manager then transfers the data to the storeio which
+eventually sends it to disk. The device driver consumes the memory
+doing the equivalent of a vm\_deallocate.
diff --git a/microkernel/mach/gnumach.mdwn b/microkernel/mach/gnumach.mdwn
new file mode 100644
index 00000000..d45549f5
--- /dev/null
+++ b/microkernel/mach/gnumach.mdwn
@@ -0,0 +1,30 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+GNU Mach is currently used by the GNU [[Hurd]].
+
+GNU Mach remains compatible with [[Mach]] 3.0.
+
+The majority of GNU Mach's [[device_driver]]s are from Linux 2.0. They were
+added using glue code, i.e., a Linux [[emulation]] layer in Mach.
+
+GNU Mach runs on x86 machines. See the
+[[hardware_compatibility_list]] and information about
+[[ports]] to other architectures.
+
+
+# Development
+
+* [[Building]]
+* [[Debugging]]
+* [[Boot_Trace]]
+* [[Projects]]
+ * [[Rules]]
+ * [[Open_Issues]]
diff --git a/microkernel/mach/gnumach/boot_trace.mdwn b/microkernel/mach/gnumach/boot_trace.mdwn
new file mode 100644
index 00000000..a08384f0
--- /dev/null
+++ b/microkernel/mach/gnumach/boot_trace.mdwn
@@ -0,0 +1,222 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+`if NCPUS > 1` stuff is not being considered so far.
+
+
+> i386/i386at/boothdr.S: \_start
+
+> i386/i386at/boothdr.S: boot\_entry
+
+>> i386/i386at/model\_dep.c: c\_boot\_entry
+
+>>> i386/i386at/boothdr.S: discover\_x86\_cpu\_type
+
+>>> i386/i386at/model\_dep.c: i386at\_init
+
+>>>> i386/i386/pic.c: picinit
+
+>>>> i386/i386at/model\_dep.c: mem\_size\_init
+
+>>>> i386/intel/pmap.c: pmap\_bootstrap
+
+>>>> i386/i386/gdt.c: gdt\_init
+
+>>>> i386/i386/idt.c: idt\_init
+
+>>>> i386/i386at/int\_init.c: int\_init
+
+>>>> i386/i386/ldt.c: ldt\_init
+
+>>>> i386/i386/ktss.c: ktss\_init
+
+>>> kern/startup.c: setup\_main
+
+>>>> kern/debug.c: panic\_init
+
+>>>> kern/printf.c: printf\_init
+
+>>>> kern/sched\_prim.c: sched\_init
+
+>>>>> kern/sched\_prim.c: wait\_queue\_init
+
+>>>>> kern/processor.c: pset\_sys\_bootstrap
+
+>>>>> kern/ast.c: ast\_init
+
+>>>> vm/vm\_init.c: vm\_mem\_bootstrap
+
+>>>>> vm/vm\_resident.c: vm\_page\_bootstrap
+
+>>>>>> vm/vm\_resident.c: pmap\_startup
+
+>>>>> kern/zalloc.c: zone\_bootstrap
+
+>>>>> vm/vm\_object.c: vm\_object\_bootstrap
+
+>>>>>> vm/vm\_external.c: vm\_external\_module\_initialize
+
+>>>>> vm/vm\_map.c: vm\_map\_init
+
+>>>>> vm/vm\_kern.c: kmem\_init
+
+>>>>> i386/intel/pmap.c: pmap\_init
+
+>>>>> kern/zalloc.c: zone\_init
+
+>>>>> kern/kalloc.c: kalloc\_init
+
+>>>>> vm/vm\_fault.c: vm\_fault\_init
+
+>>>>> vm/vm\_resident.c: vm\_page\_module\_init
+
+>>>>> vm/memory\_object.c: memory\_manager\_default\_init
+
+>>>> ipc/ipc\_init.c: ipc\_bootstrap
+
+>>>>> ipc/ipc\_table.c: ipc\_table\_init
+
+>>>>> ipc/ipc\_notify.c: ipc\_notify\_init
+
+>>>>> ipc/ipc\_hash.c: ipc\_hash\_init
+
+>>>>> ipc/ipc\_marequest.c: ipc\_marequest\_init
+
+>>>> vm/vm\_init.c: vm\_mem\_init
+
+>>>>> vm/vm\_object.c: vm\_object\_init
+
+>>>> ipc/ipc\_init.c: ipc\_init
+
+>>>>> kern/ipc\_host.c: ipc\_host\_init
+
+>>>>>> kern/ipc\_host.c: ipc\_pset\_init
+
+>>>>>> kern/ipc\_host.c: ipc\_pset\_enable
+
+>>>>>> kern/ipc\_host.c: ipc\_processor\_init
+
+>>>> i386/intel/pmap.h: PMAP\_ACTIVATE\_KERNEL
+
+>>>> kern/timer.c: init\_timers
+
+>>>> kern/mach\_clock.c: init\_timeout
+
+>>>> kern/xpr.c: xprbootstrap
+
+>>>> kern/time\_stamp.c: timestamp\_init
+
+>>>> kern/mach\_clock.c: mapable\_time\_init
+
+>>>> i386/i386at/model\_dep.c: machine\_init
+
+>>>>> device/cons.c: cninit
+
+>>>>> i386/i386/fpu.c: init\_fpu
+
+>>>>> linux/dev/init/main.c: linux\_init
+
+>>>>>> linux/dev/arch/i386/kernel/irq.c: init\_IRQ
+
+>>>>>>> linux/dev/arch/i386/kernel/irq.c: reserve\_mach\_irqs
+
+>>>>>> linux/dev/kernel/sched.c: linux\_sched\_init
+
+>>>>>> linux/dev/init/main.c: calibrate\_delay
+
+>>>>>> linux/dev/glue/kmem.c: linux\_kmem\_init
+
+>>>>>> linux/src/drivers/pci/pci.c: pci\_init
+
+>>>>>>> linux/src/arch/i386/kernel/bios32.c: pcibios\_init
+
+>>>>>>> linux/src/drivers/pci/pci.c: scan\_bus
+
+>>>>>>> linux/src/arch/i386/kernel/bios32.c: pcibios\_fixup
+
+>>>>>> linux/dev/glue/net.c: linux\_net\_emulation\_init
+
+>>>>>> linux/dev/drivers/block/genhd.c: device\_setup
+
+>>>>>>> linux/dev/glue/block.c: blk\_dev\_init
+
+>>>>>>>> linux/src/drivers/block/ide.c: ide\_init
+
+>>>>>>>> linux/dev/drivers/block/floppy.c: floppy\_init
+
+>>>>>>> linux/src/drivers/scsi/scsi.c: scsi\_dev\_init
+
+>>>>>>> linux/dev/net/core/dev.c: net\_dev\_init
+
+>>>>>> linux/pcmcia-cs/glue/pcmcia.c: pcmcia\_init
+
+>>>>> i386/i386at/autoconf.c: probeio
+
+>>>>> i386/i386at/model\_dep.c: inittodr
+
+>>>>> i386/intel/pmap.c: pmap\_unmap\_page\_zero
+
+>>>> kern/task.c: task\_init
+
+>>>>> kern/syscall\_emulation.c: eml\_init
+
+>>>> kern/thread.c: thread\_init
+
+>>>>> i386/i386/pcb.c: pcb\_module\_init
+
+>>>>>> i386/i386/fpu.c: fpu\_module\_init
+
+>>>>>> i386/i386/iopb.c: iopb\_init
+
+>>>> kern/thread\_swap.c: swapper\_init
+
+>>>> kern/sched\_prim.c: recompute\_priorities
+
+>>>> kern/mach\_factor.c: compute\_mach\_factor
+
+>>>> kern/startup.c: start\_kernel\_threads
+
+[...]
+
+>>>> kern/startup.c: cpu\_launch\_first\_thread
+
+>>>>> i386/i386at/model\_dep.c: startrtclock
+
+>>>>>> i386/i386/pit.c: clkstart
+
+>>>>> i386/intel/pmap.h: PMAP\_ACTIVATE\_KERNEL
+
+>>>>> i386/i386/pcb.c: load\_context
+
+[...]
+
+> kern/startup.c: start\_kernel\_threads
+
+> Threads get created.
+
+>> kern/sched\_prim.c: idle\_thread
+
+>> One for each CPU.
+
+>> kern/thread.c: reaper\_thread
+
+>> kern/thread\_swap.c: swapin\_thread
+
+>> kern/sched\_prim.c: sched\_thread
+
+>> [...]
+
+>> kern/bootstrap.c: bootstrap\_create
+
+>> [...]
+
+>> vm\_pageout
+
+>> Does not return.
diff --git a/microkernel/mach/gnumach/building.mdwn b/microkernel/mach/gnumach/building.mdwn
new file mode 100644
index 00000000..27573b64
--- /dev/null
+++ b/microkernel/mach/gnumach/building.mdwn
@@ -0,0 +1,114 @@
+Additional to the following text, a further [[example]] has be posted.
+
+
+# Building [[GNUMach]] from Source
+
+If you want to build the [[GNUMach]] kernel yourself instead of just using a
+pre-built binary, follow these instructions.
+
+The unpacked source tree is around 20 MiB, and the build tree (with all drivers
+enabled) is around 50 MiB.
+
+## Getting the Source Code
+
+### Developers's RCS
+
+See [here](http://www.gnu.org/software/hurd/gnumach-download.html#cvs).
+
+ $ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/hurd co -r gnumach-1-branch gnumach
+
+(Most probably you want to get hold of the *GNU Mach 1 branch* and not the
+trunk, which is also what we've done above.)
+
+You then have to create the automatically generatable files:
+
+ $ ( cd gnumach && autoreconf --install )
+
+### What Debian is currently using
+
+See [here](http://packages.debian.net/source/unstable/gnumach).
+
+ $ apt-get source gnumach
+
+Please see the Debian [[running/debian/FAQ]] before using `apt-get source`.
+
+## Preparing for the Build
+
+### ... on Debian systems
+
+Building GNU Mach requires the *build-essential* and *fakeroot* packages, their
+dependencies and additional packages that are specified by the source gnumach
+package:
+
+ # apt-get install build-essential fakeroot
+ # apt-get build-dep gnumach
+
+### ... on non-Debian systems
+
+Apart from the case that you only want to install GNU Mach's header files (see
+below), building GNU Mach requires you to have the Mach Interface Generator
+installed. See [[building_MIG|mig/building]] about how to do that, then come
+back here.
+
+Additionally, building GNU Mach requires a C compiler, a standard C library and
+your favourite flavor of awk (gawk) and GNU make.
+
+## Building and Installing
+
+### ... Debian `.deb` files
+
+Change into the directory with the downloaded / unpacked GNU Mach sources, e.g.
+
+ $ cd gnumach-20050801
+
+Start the build process with
+
+ $ dpkg-buildpackage -us -uc -b -rfakeroot
+
+[[GNUMach]] is now building. To use the new kernel, you must install the
+resulting `.deb` package which is located one directory above the build
+directory and has a similar name as the build directory, e.g.
+
+ # dpkg -i ../gnumach_20050801-4_hurd-i386.deb
+
+You can now reboot your computer and enjoy the new kernel.
+
+### [TODO]
+
+GNU Mach should be built in a separate directory:
+
+ $ mkdir gnumach-build
+ $ cd gnumach-build
+
+Find the path to your GNU Mach sources (`[...]/gnumach-1-branch`) and configure
+it:
+
+ $ [...]/gnumach-1-branch/configure [TODO]
+
+Build the kernel image:
+
+ $ make gnumach.gz
+
+Optionally run the (tiny) test suite:
+
+ $ make check
+
+You can then install and use `gnumach.gz`.
+
+[TODO.]
+
+### Installing only the Header Files
+
+GNU Mach should be built in a separate directory:
+
+ $ mkdir gnumach-build
+ $ cd gnumach-build
+
+Find the path to your GNU Mach sources (`[...]/gnumach-1-branch`) and configure
+it:
+
+ $ [...]/gnumach-1-branch/configure --prefix=
+
+Install the header files into e.g. `~/gnu/include/`:
+
+ $ make DESTDIR=~/gnu install-data
diff --git a/microkernel/mach/gnumach/building/example.mdwn b/microkernel/mach/gnumach/building/example.mdwn
new file mode 100644
index 00000000..6da05c5b
--- /dev/null
+++ b/microkernel/mach/gnumach/building/example.mdwn
@@ -0,0 +1,54 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+## Compiling GNU Mach microkernel
+
+Host development system is IBM T41 running Debian Sarge 3.1r0a GNU/Linux.
+
+* gcc version: 3.3.5
+* GNU sed version: 4.1.2
+* GNU make version: 3.8
+* mig version: 1.3-4
+
+Obtained gnumach-1-branch sources from cvs:
+
+ export CVS_RSH="ssh"
+ cvs -z3 -d:ext:anoncvs@ savannah.gnu.org:/cvsroot/hurd co -r gnumach-1-branch gnumach
+
+Obtained mig_1.3-4_i386.deb from
+http://www.hadrons.org/~guillem/debian/pool/main/mig/. Installed it using dpkg:
+
+ dpkg -i mig_1.3-4_i386.deb
+
+Entered into the gnumach sources and did the following for compilation:
+
+ mkdir build
+ cd build
+ ../configure --host=i386-unknown-gnu0.2 --build=i586-pc-linux-gnu \
+ --enable-kdb --enable-ide
+ make
+
+The kernel file is created in the build directory. Move it to /boot on the
+testing x86 system Hurd partition. Rename it as gnumach1 and compress it:
+
+ mv kernel gnumach1
+ gzip gnumach1
+
+Add a new entry on the testing machine /boot/grub/menu.lst to boot the new
+kernel.
+
+ title GNU Hurd K10 Compiled gnumach
+ kernel (hd0,3)/boot/gnumach1.gz root=device:hd2s4 -s
+ module (hd0,3)/hurd/ext2fs.static--multiboot-command-line=${kernel-command-line} \\
+ --host-priv-port=${host-port} --device-master-port=${device-port} \\
+ --exec-server-task=${exec-task} -T typed ${root} $(task-create)$(task-resume)
+ module (hd0,3)/lib/ld.so.1 /hurd/exec $(exec-task=task-create)
+
+Reboot into the new compiled mygnumach1.gz kernel!
diff --git a/microkernel/mach/gnumach/debugging.mdwn b/microkernel/mach/gnumach/debugging.mdwn
new file mode 100644
index 00000000..fa2a9d42
--- /dev/null
+++ b/microkernel/mach/gnumach/debugging.mdwn
@@ -0,0 +1,68 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+Mach has a built-in kernel debugger.
+[Manual](http://www.gnu.org/software/hurd/gnumach-doc/Kernel-Debugger.html).
+
+
+When you're [[running_a_system_in_QEMU|hurd/running/qemu]] you can directly
+[use GDB on the running
+kernel](http://fabrice.bellard.free.fr/qemu/qemu-doc.html#SEC36).
+
+
+Alternatively you can use an approach like this one: add the following code
+snippet to `device/ds_routines.c`'s `ds_device_open` function, right at the top
+of the function, and modify the code as needed.
+
+ void D (char *s)
+ {
+ switch (s[0] - '0')
+ {
+ case 0:
+ printf ("Hello from %s!\n", __FUNCTION__);
+ break;
+ case 1:
+ printf ("%s: Invoking task_collect_scan.\n", __FUNCTION__);
+ extern void task_collect_scan (void);
+ task_collect_scan ();
+ break;
+ default:
+ printf ("No idea what you want me to do.\n");
+ break;
+ }
+ }
+
+ if (name && name[0] == 'D')
+ D (name + 1);
+
+Then boot your system and do something like this:
+
+ # devprobe D0
+ Hello from D!
+ # devprobe D1
+ D: Invoking task_collect_scan.
+ # devprobe D2
+ No idea what you want me to do.
+
+This is especially useful if you need to manually trigger some stuff inside the
+running kernel, as with the *D1* example.
+
+
+If you're doing real low level debugging, you might want to put variations of
+the following snipped into the code, this code will write a `#` character at
+line `[LINE]`, column `[COLUMN]` on the screen:
+
+ *((char *) 0xb8000 + 2 * ([LINE] * 80 + [COLUMN])) = '#';
+ halt_cpu ();
+
+The call of `halt_cpu` will -- as the name suggests -- halt the system
+afterwards. This might be what you want or it might not, but it is needed at
+some place when running the kernel inside QEMU, as QEMU somehow decides not to
+update its display buffer anymore under certain conditions.
diff --git a/microkernel/mach/gnumach/hardware_compatibility_list.mdwn b/microkernel/mach/gnumach/hardware_compatibility_list.mdwn
new file mode 100644
index 00000000..09882467
--- /dev/null
+++ b/microkernel/mach/gnumach/hardware_compatibility_list.mdwn
@@ -0,0 +1,111 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+# CPU Architecture
+
+GNU Mach current only supports the `x86` (alias `ia32` or `i386`) architecture.
+
+`amd64`/`ix64` should work in `32-bit` compatibility mode. However, in practice
+`amd64` systems seem to be troublesome more often than not. This is probably
+related to the same (chipset-related) problems we often see with recent
+machines; but it seems that `amd64` ones use problematic chipsets particularily
+often. So far we haven't heard of similar problems with Intel's eqivalent
+`ix64` (or `EM64T` as it used to be called) -- but maybe that just means fewer
+people tried running the Hurd on such machines :-)
+
+Support for running GNU Mach (and a complete GNU/Hurd system) in a
+[Xen](http://www.cl.cam.ac.uk/research/srg/netos/xen/) `domU` (again on `x86`
+only) is [[being_worked_on|ports/xen]].
+
+Read about further [[ports]].
+
+# Memory
+
+GNU Mach will use a maximum of 1 GiB of RAM. If your system has more,
+the surplus will silently be ignored. (In past times, this would hinder GNU
+Mach from booting at all, but this has been fixed, so you no longer need to
+apply GRUB's `uppermem` directive.)
+
+# Video Cards
+
+Debian distributes a version of [X.org](http://x.org/). If your video card driver
+depends on a special kernel interface such as that provided by
+the `agpgart` kernel module for the Linux kernel, then your video
+card will only be supported by the VESA driver.
+
+Using an internal i815 videocard [won't
+work](http://lists.debian.org/debian-hurd/2007/12/msg00007.html) (at least when
+using the specialized driver), because of [missing AGP GART support in GNU
+Mach](http://lists.debian.org/debian-hurd/2007/12/msg00011.html).
+
+# Sound
+
+No sound cards are supported at this time.
+
+# USB 1.1/2.0
+
+USB is not supported at this time.
+
+However, USB-type keyboards and mice may (and have been reported to) work
+nevertheless, given that the hardware / BIOS is doing emulation to the
+supported legacy interfaces.
+
+# IEEE 1394 (Firewire)
+
+IEEE 1394 is not supported at this time
+
+# Storage
+
+All common IDE drives should work. Some drive geometries do not work,
+e.g. drives with hundreds of GiB of storage space. If you find a specific IDE
+drive that does not work, make a note of the model and technical specifications
+here.
+
+[[toggle id="SATA" text="SATA drives may work in compatibility mode."]]
+<!-- Sure? --[[tschwinge]] -->
+
+[[toggleable id="SATA" text="""
+This is how booting a [[GNU/Hurd_system|hurd]] will typically fail if GNU Mach
+couldn't connect to the hard disk, e.g., in a SATA system without IDE
+compatibility mode:
+
+ start (hd0,3)/hurd/ext2fs.static: (hd0,3)/hurd/ext2fs.static
+ device:hd0s4: No such device or address
+
+There *may* be an option in the system's BIOS setup to configure enabling such
+a compatibility mode.
+"""]]
+
+# Device Drivers
+
+[GNU Mach Reference Manual,
+Configuration](http://www.gnu.org/software/hurd/gnumach-doc/Configuration.html)
+contains a list of device drivers that are included in GNU Mach and elaborates
+on the hardware devices they support.
+
+# User Success Reports
+
+These boards are known to work. Gnumach/Hurd has been installed and run on these board successfully.
+
+* ASUS P2B motherboard with an Intel PII 450MHz CPU with Intel Pro/100 NIC in PCI slot
+* Intel SE-440BX motherboard
+* VIA EPIA-M Mini-ITX motherboard with VIA Nehemiah C3 1Ghz processor. Onboard NIC (VIA Rhine) works good.
+* Compaq Deskpro ENS, Pentium3 (666 MHz upgraded to 1 GHz), Intel i815 chipset, chipset integrated NIC (detected twice, but works fine with eth0; trying to access eth1 confuses the driver and makes the system unusable), Matrox Mystique 220 (PCI) graphics card. Also works with rtl8029 (NE2000 PCI) NIC when onboard NIC disabled in BIOS setup.
+* Abit BX6 Rev. 2.0 with Celeron 400, after disabling "memory hole at 15MB" option in BIOS setup. (Otherwise, Mach detects only 15MiB of RAM, making Hurd run *extremely* slow and instable.) Should also work with PentiumII or Pentium3.
+
+# User Failure Reports
+
+Some people couldn't get these hardware combinations to work with Hurd.
+
+Note: The Debian GNU/Hurd installer actually runs on Linux, so it (almost) always works. The critical bit is booting after installation.
+
+* ASUS P5A motherboard and AMD K6-2 333MHz CPU - doesn't boot
+* ASUS P2B-LS motherboard with an Intel PII-MMX 400 MHz CPU - this board had a defective onboard NIC (that could not be disable in BIOS) and working 3COM Etherlink III NIC in a PCI bus slot. This combination worked with GNU/Linux. The 3COM NIC is known to work with the Hurd. However, while gnumach/Hurd will boot on this system, it is confused by the defective onboard NIC and unable to use the 3COM NIC. Attempting to start networking generates a continous stream of eth0 and eth1 reset messages on the console that renders the system unusable.
+* ASrock 775Twins-HDTV with a Pentium D 810 (533 MGz FSB/2600GHz core -- information no longer present on intel's site). Doesn't boot.
diff --git a/microkernel/mach/gnumach/hardware_compatibility_list/discussion.mdwn b/microkernel/mach/gnumach/hardware_compatibility_list/discussion.mdwn
new file mode 100644
index 00000000..69ca3190
--- /dev/null
+++ b/microkernel/mach/gnumach/hardware_compatibility_list/discussion.mdwn
@@ -0,0 +1,4 @@
+Further information may still be found on
+<http://www.nongnu.org/thug/gnumach_hardware.html>
+and could perhaps be incorporated into that page.
+--[[tschwinge]]
diff --git a/microkernel/mach/gnumach/hardwarecompatibilitylist.mdwn b/microkernel/mach/gnumach/hardwarecompatibilitylist.mdwn
new file mode 100644
index 00000000..8c67e3e0
--- /dev/null
+++ b/microkernel/mach/gnumach/hardwarecompatibilitylist.mdwn
@@ -0,0 +1,11 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+[[meta redir=hardware_compatibility_list]]
diff --git a/microkernel/mach/gnumach/open_issues.mdwn b/microkernel/mach/gnumach/open_issues.mdwn
new file mode 100644
index 00000000..433ec3ef
--- /dev/null
+++ b/microkernel/mach/gnumach/open_issues.mdwn
@@ -0,0 +1,19 @@
+[[meta copyright="Copyright © 2008 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]]."]]"""]]
+
+[[meta title="Open Issues"]]
+
+This is a dumping ground for open issues for GNU Mach.
+
+[[inline
+pages="microkernel/mach/gnumach/open_issues/* and !*/discussion"
+show=0
+actions=yes
+rootpage="microkernel/mach/gnumach/open_issues" postformtext="Add a new item titled:"]]
diff --git a/microkernel/mach/gnumach/ports.mdwn b/microkernel/mach/gnumach/ports.mdwn
new file mode 100644
index 00000000..00cdee8c
--- /dev/null
+++ b/microkernel/mach/gnumach/ports.mdwn
@@ -0,0 +1,15 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+ * x86. This is the main port.
+ * [PowerPC](http://www.pjbruin.dds.nl/hurd/). Is not in a usable state.
+ * Alpha. Was once started, but isn't in a usable state either.
+
+ * [[Xen]]
diff --git a/microkernel/mach/gnumach/ports/xen.mdwn b/microkernel/mach/gnumach/ports/xen.mdwn
new file mode 100644
index 00000000..cdb4e2de
--- /dev/null
+++ b/microkernel/mach/gnumach/ports/xen.mdwn
@@ -0,0 +1,84 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+[[toc ]]
+
+## Xen dom0, PAE-disabled hypervisor
+
+/!\ Since GNU Mach doesn't handle PAE yet, you'll need a PAE-disabled hypervisor.
+
+On Debian Lenny, for example, you can install xen-hypervisor-3.2-1-i386-nonpae.
+
+This also means that you'll currently need a PAE-disabled `dom0`.
+[[Stefan_Siegl|stesie]] is providing a PAE-disabled Linux kernel image at
+<http://brokenpipe.de/GnuHurd/XEN/>.
+
+You can either get binaries at <http://youpibouh.thefreecat.org/hurd-xen/> or build them yourself.
+
+- Copy `gnumach-xen` and `hurd-modules` to your dom0 /boot.
+- Copy `hurd` into `/etc/xen`, edit it for fixing access to your hurd / and swap
+
+## GNU/Hurd system
+
+/!\ You need an already installed GNU/Hurd system.
+
+If you have a free partition, you can fdisk to type 0x83, create a filesystem using:
+
+ sudo mke2fs -b 4096 -I 128 -o hurd /dev/sda4
+
+Replace /dev/sda4 with your partition. Install and use crosshurd to setup a GNU/Hurd system on this partition.
+
+## /etc/xen/hurd configuration
+
+Here is a sample /etc/xen/hurd configuration
+
+ kernel = "/boot/gnumach-xen"
+ memory = 256
+ disk = ['phy:sda4,hda,w']
+ extra = "root=device:hd0"
+ vif = [ '' ]
+ ramdisk = "/boot/hurd-modules"
+
+Suggestions about [[networking_configuration]] are available.
+
+If you need stable MAC addresses, use a syntax like `vif = [
+'mac=00:16:3e:XX:XX:XX, bridge=br0' ]`.
+
+## Running Hurd with Xen
+
+To run Hurd with Xen, use:
+
+ xm create -c hurd
+
+and gnumach should get started. Proceed with native-install.
+
+ export TERM=mach
+ ./native-install
+
+- If `xm` complains about networking (`vif could not be connected`), it's Xen scripts' fault, see Xen documentation for how to configure the network. The simplest way is network-bridge with fixed IPs (note that you need the bridge-utils package for this). You can also just disable networking by commenting the vif line in the config.
+- If `xm` complains `Error: (2, 'Invalid kernel', 'xc_dom_compat_check: guest type xen-3.0-x86_32 not supported by xen kernel, sorry\n')`, you most probably have a PAE-enabled hypervisor, and you just need to install and boot non-PAE hypervisor and kernel.
+
+## Building from sources
+
+If you want to generate these images, first get the `gnumach-1-branch-Xen-branch` branch from gnumach CVS.
+Then look for "Ugly" in `kern/bootstrap.c`, how to generate `hurd-modules` is explained there, and you'll have to fix `EXT2FS_SIZE` and `LD_SO_SIZE` by hand.
+Then use
+
+ ./configure --enable-platform=xen
+ make
+
+The current `hurd-modules` was built from the debian packages `hurd 20070606-2` and `libc0.3 2.6.1-1`.
+/!\ This means that when using this image, your GNU/Hurd system also needs to be a glibc version 2.6-based one!
+
+---
+
+[[Internals]].
+
+[[GNU_Savannah_task 5468]], [[GNU_Savannah_task 6584]].
diff --git a/microkernel/mach/gnumach/ports/xen/internals.mdwn b/microkernel/mach/gnumach/ports/xen/internals.mdwn
new file mode 100644
index 00000000..09e707ea
--- /dev/null
+++ b/microkernel/mach/gnumach/ports/xen/internals.mdwn
@@ -0,0 +1,14 @@
+[[meta copyright="Copyright © 2008 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]]."]]"""]]
+
+The port does use Xen's para-virtualized interface for device (ide, network,
+etc.) access.
+
+[[Virtualization]].
diff --git a/microkernel/mach/gnumach/ports/xen/networking_configuration.mdwn b/microkernel/mach/gnumach/ports/xen/networking_configuration.mdwn
new file mode 100644
index 00000000..71a72bac
--- /dev/null
+++ b/microkernel/mach/gnumach/ports/xen/networking_configuration.mdwn
@@ -0,0 +1,105 @@
+[[meta copyright="Copyright © 2008 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]]."]]"""]]
+
+[[toc ]]
+
+The Xen dom0 infrastructure provides for a bridged networking setup using shell
+scripts to configure the bridging device properly and attach the domUs' virtual
+interfaces to the bridge. However, we've [seen
+problems](http://lists.gnu.org/archive/html/bug-hurd/2008-08/msg00023.html)
+when using this approach, so to [solve these
+issues](http://lists.gnu.org/archive/html/bug-hurd/2008-09/msg00071.html),
+instead suggest the following configuration method (to achieve the same thing).
+
+This is for a Debian dom0.
+
+# */etc/network/interfaces*
+
+Comment out everything referencing your physical devices. Add this:
+
+ auto br0
+ iface br0 inet dhcp
+ bridge_ports regex (eth|vif).* noregex
+
+... or if you want to do the manual configuration dance:
+
+ auto br0
+ iface br0 inet static
+ bridge_ports regex (eth|vif).* noregex
+ address 192.168.10.60
+ netmask 255.255.255.0
+ [...]
+
+This needs a version of the `bridge-utils` package more recent than the current
+Debian stable one ([[debbug 405215]]). (It's trivial to rebuild the `dpkg` of,
+e.g., the Debian testing one on Debian stable.)
+
+# */etc/xen/xend-config.sxp*
+
+Make sure that only `(network-script network-dummy)` and `(vif-script
+vif-bridge)` are activated and all other `(network-script network-WHATEVER)`,
+respective `(vif-script vif-WHATEVER)` are commented out.
+
+
+# Sample configuration files on Debian Lenny
+
+## /etc/xen/hurd on dom0
+
+ kernel = "/boot/gnumach-xen"
+ memory = 256
+ disk = ['phy:sda5,hda,w']
+ extra = "root=device:hd0"
+ vif = [ 'mac=00:16:3e:00:00:00, bridge=br0' ]
+ ramdisk = "/boot/hurd-modules"
+
+/dev/sda5 is an extended partition. br0 is bridge interface on dom0.
+
+## /etc/xen/xend-config.sxp on dom0
+
+ (network-script 'network-bridge netdev=br0')
+ (dom0-min-mem 196)
+ (dom0-cpus 0)
+ (vncpasswd '')
+
+## /etc/network/interfaces on dom0
+
+ auto br0
+ iface br0 inet static
+ address 192.168.1.211
+ network 192.168.1.0
+ netmask 255.255.255.0
+ broadcast 192.168.1.255
+ gateway 192.168.1.1
+ bridge_ports eth1
+
+eth1 is the interface that is connected to the Internet on the LAN:
+
+## Doing settrans on domU
+
+ settrans -fgap /servers/socket/2 /hurd/pfinet -i eth0 -a 192.168.1.210 -g 192.168.1.1 -m 255.255.255.0
+
+## /sbin/ifconfig on dom0
+
+ br0 Link encap:Ethernet HWaddr 00:19:d1:2e:06:33
+ inet addr:192.168.1.211 Bcast:192.168.1.255 Mask:255.255.255.0
+ inet6 addr: fe80::219:d1ff:fe2e:633/64 Scope:Link
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
+ RX packets:14187 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:9214 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:0
+ RX bytes:936563 (914.6 KiB) TX bytes:746184 (728.6 KiB)
+
+ eth1 Link encap:Ethernet HWaddr 00:19:d1:2e:06:33
+ inet6 addr: fe80::219:d1ff:fe2e:633/64 Scope:Link
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
+ RX packets:34339 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:18526 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:1000
+ RX bytes:3019251 (2.8 MiB) TX bytes:1453672 (1.3 MiB)
diff --git a/microkernel/mach/gnumach/projects.mdwn b/microkernel/mach/gnumach/projects.mdwn
new file mode 100644
index 00000000..9ace6270
--- /dev/null
+++ b/microkernel/mach/gnumach/projects.mdwn
@@ -0,0 +1,129 @@
+[[meta copyright="Copyright © 2005, 2006, 2007, 2008
+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]]."]]"""]]
+
+This page is a place to keep track of ideas about things that may be improved
+in GNU Mach, so that it'll evolve to a reliable microkernel for The Hurd, both
+in terms of stability and performance. If you find anything missing here,
+please feel free to add a entry with a short description.
+
+If you want to help with any of the task (thanks!), please send a mail to
+*[[mailing_lists/bug-hurd]]* stating what task you wish to work on,
+so that no duplicate efforts end up.
+
+# Active Branches
+
+ * `gnumach-1-branch` is the main branch.
+
+ * `gnumach-1-branch-Xen-branch` is a branch created by Samuel Thibault for
+ working on a [[ports/Xen]] port.
+
+ * `gnumach-1-branch-gdb-branch` is a branch created by Michael Casadevall for
+ working on [[GDB_stubs]].
+
+
+# Task List
+
+ * [[Clean_up_the_code]]
+
+ * [[Open_Issues]]
+
+ * Update the core architecture and drivers
+
+ * Check what NetBSD, FreeBSD and Linux do with their host specific code
+ (i486, PPC, Sparc, ...). And if it might be wise to take that and use
+ it in GNU Mach. There is no need to worry about purely internal API's,
+ but the external ones shouldn't require any major changes.
+
+ * Write a list of all functions provided by the host dependant code in
+ GNU Mach that gets used in the non-host specific code (kernel, IPC and
+ VM).
+
+ * Once we have decided what the new internal API should look like, make a
+ list of the new API and the old one, and try to make things as
+ compatible as possible, but not at the expense of anything.
+
+ * Implement Migrating Threads
+
+ * Migrating Threads (MT) could improve IPC performance and making easier
+ the work of the scheduler. For more information, check
+ <http://www.usenix.org/publications/library/proceedings/sf94/ford.html>
+
+ * Improve the external pagers interface
+
+ * Implement read-ahead (huge I/O improvements expected).
+
+ * Making this interface synchronous should improve I/O performance
+ significantly, without (almost) any drawbacks (we also get some
+ advantage from MT's).
+
+ * Implement more paging eviction policies, so they fit better with usual
+ behaviour of the pagers.
+
+ * Implement resource accounting for external pagers.
+
+ * VM
+
+ * Put it on user level (?)
+
+ * Clean up the mess.
+
+ * Provide a fast way to read/write from/to a memory object.
+
+ * Simplify/normalise the code.
+
+ * Simplify the IPC Semantics
+
+ * There are a lot of things in GNU Mach's IPC that we don't need. Track
+ down those things, and get rid of them without requiring many changes
+ in the Hurd (the changes will affect MiG, but that is OK).
+
+ * Temporary mappings for Client-Server memory transfers
+
+ * Extend Mach's IPC to provide some kind of object which can represent a
+ range of memory that can temporarily be mapped into the servers address
+ space for sending/receiving data. This would allow us to avoid
+ excessive memory copies.
+
+ * Find a new way to work with unaligned memory.
+
+ * GDB remote debugging support
+
+ * Implement support for GDB debugging via serial line and/or network.
+ Maybe this can be done together with the host-specific work above.
+
+ See [[GDB_stubs]].
+
+ * Make it run as a [[UNIX]]/Linux executable.
+
+ * Neal:
+
+ <neal> here's a fun project: port the mach interface to Linux
+ <neal> (e.g., via kernel modifications)
+ <neal> or, to posix/glibc
+ <neal> (mmap, some minimal ptrace, etc.)
+
+ * From the [Hurd bits at
+ sourceforge.net](http://sourceforge.net/projects/hurd):
+ <http://hurd.cvs.sourceforge.net/hurd/gnumach-otop/>, started by John
+ Tobey. Last time touched in 2003. Status completely unknown.
+
+ * [README](http://hurd.cvs.sourceforge.net/hurd/gnumach-otop/README?view=markup)
+
+
+# Wish List
+
+ * Interface for userspace non-critical drivers.
+
+ * Sound Support
+
+ * WLAN support (ipw2200) with WEP/WPA
+
+ * ACPI support
diff --git a/microkernel/mach/gnumach/projects/clean_up_the_code.mdwn b/microkernel/mach/gnumach/projects/clean_up_the_code.mdwn
new file mode 100644
index 00000000..875bb8cd
--- /dev/null
+++ b/microkernel/mach/gnumach/projects/clean_up_the_code.mdwn
@@ -0,0 +1,121 @@
+[[meta copyright="Copyright © 2005, 2006, 2007, 2008
+ 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]]."]]"""]]
+
+# Restructure the tree in a sane way
+
+Merge `linux/src` and `linux/dev`. But only if using a sane RCS, so leave it
+as-is for now. Also, a bunch of (header) files from there may probably be
+discarded.
+
+
+# Remove dead files from the GNU Mach source tree
+
+For *exported* files (via `make install`), the plan is to first stick some
+`#error This file is scheduled for removal. Write to <bug-hurd@gnu.org> if you
+have a reason to have it kept available.` into them, and then actually remove
+them after some months.
+
+For some of the internal header files (containing function prototypes and the
+like), it might actually be useful to use them. (And then get rid of a bunch
+of `extern ...` statements in other files.)
+
+This following list was assembled by putting such a `#error ...` line into each
+of the `gnumach-1-branch`'s header files (exported and internal; save the
+`linux/` ones (only internal) for simplicity), and then trying to build GNU
+Mach until this would succeed again (by removing offending `#error ...`s), and
+afterwards using the set of exported files for building a cross toolchain
+(again still removing offending `#error ...`s). A very crude and imprecise
+method.
+
+So, additionally to the list given below, there may actually be a bunch of
+further files (also exported ones) that serve no real value, but are being
+`#include`d through one way or another.
+
+* [[source_gnumach-1-branch ddb/db_expr.h]]
+
+ Currently used, but copyright violation? Rewrite?
+
+* [[source_gnumach-1-branch ddb/db_print.h]]
+
+ Copyright violation? Currently unused, but could be used in principle (or
+ be rewritten, to avoid the copyright oddity).
+
+* [[source_gnumach-1-branch ddb/tr.h]]
+
+ Copyright violation. Unused. Remove.
+
+* [[source_gnumach-1-branch device/dev_master.h]]
+
+ Might be usable for SMP? Remove otherwise.
+
+* [[source_gnumach-1-branch i386/i386/kttd_machdep.h]]
+
+* [[source_gnumach-1-branch i386/i386/sched_param.h]]
+
+* [[source_gnumach-1-branch i386/include/mach/i386/cthreads.h]]
+
+ Was probably once exported, but is no longer.
+
+* [[source_gnumach-1-branch i386/include/mach/i386/ioccom.h]]
+
+ Exported.
+
+* [[source_gnumach-1-branch include/device/audio_status.h]]
+
+ Exported.
+
+* [[source_gnumach-1-branch include/device/tape_status.h]]
+
+ Exported.
+
+* [[source_gnumach-1-branch include/mach/alert.h]]
+
+ Exported.
+
+* [[source_gnumach-1-branch include/mach/boot.h]]
+
+ Exported.
+
+* [[source_gnumach-1-branch include/mach/macro_help.h]]
+
+ Exported.
+
+* [[source_gnumach-1-branch include/mach/multiboot.h]]
+
+ Exported.
+
+* [[source_gnumach-1-branch include/mach/profil.h]]
+
+ Exported.
+
+* [[source_gnumach-1-branch include/mach/profilparam.h]]
+
+ Exported.
+
+* [[source_gnumach-1-branch include/mach/exec/a.out.h]]
+
+ Exported.
+
+* [[source_gnumach-1-branch include/mach_debug/pc_info.h]]
+
+ Currently not exported, but was probably once meant to be.
+
+* [[source_gnumach-1-branch kern/act.h]]
+
+* [[source_gnumach-1-branch kern/refcount.h]]
+
+* [[source_gnumach-1-branch kern/shuttle.h]]
+
+
+# Remove dead functions, variables, etc. from source files
+
+
+# Rewrite ugly code
diff --git a/microkernel/mach/gnumach/projects/gdb_stubs.mdwn b/microkernel/mach/gnumach/projects/gdb_stubs.mdwn
new file mode 100644
index 00000000..9a11a82b
--- /dev/null
+++ b/microkernel/mach/gnumach/projects/gdb_stubs.mdwn
@@ -0,0 +1,13 @@
+[[meta copyright="Copyright © 2008 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]]."]]"""]]
+
+ * <http://lists.gnu.org/archive/html/bug-hurd/2008-04/msg00103.html>
+
+ * [ChangeLog.gdb](http://cvs.savannah.gnu.org/viewvc/gnumach/ChangeLog.gdb?root=hurd&view=markup&pathrev=gnumach-1-branch-gdb-branch)
diff --git a/microkernel/mach/history.mdwn b/microkernel/mach/history.mdwn
new file mode 100644
index 00000000..a8951737
--- /dev/null
+++ b/microkernel/mach/history.mdwn
@@ -0,0 +1,64 @@
+# <a name="Table_of_Contents"> Table of Contents </a>
+
+%TOC%
+
+# <a name="Early_beginnings"> Early beginnings </a>
+
+Mach has quite a history. Everything actually started at the University of Rochester in 1975. It was invented to demonstrate how operating systems could be built using a modular design where processes communicated using message passing, even across networks. The system was called the Rochester Intelligent Gateway and ran on a 16 bit mini computer called Eclipse from Data General.
+
+One of the engineers behind the project was Richard Rashid. In 1979 he moved his socks to Carnegie Mellon University to continue his research on message passing operating systems. The result emerged in 1981 and was called Accent.
+
+Accent kept running at CMU until 1984 but was by then being run over by
+[[UNIX]]. Rashid then decided to use an early embrace strategy and started
+designing the third generation OS project called Mach. By making Mach
+compatible with UNIX, Mach was supposed to gain a lot of available UNIX
+software.
+
+Mach was a vast improvement over Accent. It incorporated parts commonly used today, such as: threads, better IPC, multiprocessor support and an advanced VM system.
+
+At the time of Mach's conception, DARPA was seeking a multiprocessor (MP) capable OS and found Mach. With money from the Dept. of Defense, 4.2BSD support was added, to bloat the kernel; but most of all, to add complete UNIX compatibility.
+
+Now enters the UNIX war.
+
+UNIX was owned by AT&amp;T which controlled the market almost completely. Industry giants such as IBM, DEC and H got together and formed the Open Software Foundation, OSF. In an effort to conquer market share, OSF took the Mach 2.5 release and made it the OSF/1 system. By that time Mach contained a lot of BSD and AT&amp;T code but the OSF hoped that it would be able to take control of the rudder with OSF/1. What happens after that is a story better told by someone else ...
+
+In 1989 CMU decided to revamp Mach. They removed the bloat and put the UNIX emulation in user space making the Mach 3.0 release -- the pure Mach release.
+
+Later on support for Mach 3.0 at CMU vaned and the project was taken over by the University of Utah. The FLUX group started the Mach4 project. An ambitious project which included complete rewrite of the x86 support code and integration of Linux 2.0 drivers. That's right, Linux awoke around 1991 so this makes it apx. 1994.
+
+# <a name="GNU_Mach_and_OSKit_Mach"> </a> GNU Mach and OSKit-Mach
+
+GNU Mach is based on Mach4 from University of Utah, which in turn is based on Mach3 from Carnegie-Mellon University. The last release of Mach4 was the [UK22 release](http://www.cs.utah.edu/flux/mach4-i386/html/mach4-UK22.html).
+
+The OSKit was what evolved when the Mach4 project at University of Utah was dropped. The people involved wanted to reuse the work they had put into Mach in the form of hardware support and drivers.
+
+The oskit-mach version of GNU Mach was presented in November 1999 by Roland McGrath. <http://mail.gnu.org/pipermail/bug-hurd/1999-November/003554.html> The purpose of the port was to get better hardware support through new drivers and platform code available in the OSKit.
+
+On May 27 2002, after the Gnumach 1.3 release, Roland McGrath merged OSKit-Mach onto the HEAD of CVS making it the Gnumach 2.x mainline.
+
+Meanwhile, OSKit became unmaintained, thus posing more of a burden on than being helpful in GNU Mach development. Consequently, as of March 2006, nobody is working on OSKit Mach, or trying to use it.
+
+In 2005 Gianluca Guida started a different attempt to use the osenv interface with minimal changes to GNU Mach 1.x, thus allowing use of the generic driver interface while importing as little of the umaintained OSKit code as possible. However, there turned out to be serious problems with OSKit, so this attempt was abandoned as well.
+
+Today, GNU Mach development focuses on the 1.x branch again -- see also this
+list of [[gnumach/projects]].
+
+# <a name="Status_of_the_project"> Status of the project </a>
+
+GNU Mach 1.3 was released in May 2002, and features advanced boot script support, support for large disks (&gt;= 10GB) and an improved console.
+
+GNU Mach is used as the default microkernel in the GNU/Hurd system. It is compatible with other popular Mach distributions. The device drivers for block devices and network cards are taken from Linux 2.0.x kernel versions (plus some backports of more recent drivers), so most newer hardware is not supported.
+
+As of March 2006 a GNU Mach 1.4 release is planned, focusing on code cleanup. It is meant to serve as a starting point for more radical future changes while maintaining 1.4.x as a stable branch.
+
+----
+
+Copyright (C) 2001 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA
+
+Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
+
+-- [[Main/JoachimNilsson]] - 24 Oct 2002
+
+Apple's Macintosh OSX (OS 10.x) is based on [Darwin](http://www.apple.com/macosx/technologies/darwin.html). _"Darwin uses a monolithic kernel based on [[TWiki/FreeBSD]] 4.4 and the OSF/mk Mach 3."_ Darwin also has a [Kernel Programming](http://developer.apple.com/techpubs/macosx/Darwin/General/KernelProgramming/About/index.html) Book.
+
+-- [[Main/GrantBow]] - 22 Oct 2002
diff --git a/microkernel/mach/ipc.mdwn b/microkernel/mach/ipc.mdwn
new file mode 100644
index 00000000..889fac2f
--- /dev/null
+++ b/microkernel/mach/ipc.mdwn
@@ -0,0 +1,22 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+[[General_information|/ipc]] about IPC.
+
+An IPC is sent by invoking a [[port]]. <!-- Isn't this wording a bit strange?
+``IPC is sent'' --tschwinge -->
+
+[[Sequence_numbering]].
+
+[The Unofficial GNU Mach IPC beginner's guide](http://www.nongnu.org/hurdextras/ipc_guide/ipc_guide.html)
+
+# See Also
+
+* [[RPC]]
diff --git a/microkernel/mach/ipc/sequence_numbering.mdwn b/microkernel/mach/ipc/sequence_numbering.mdwn
new file mode 100644
index 00000000..7c1f68e4
--- /dev/null
+++ b/microkernel/mach/ipc/sequence_numbering.mdwn
@@ -0,0 +1,19 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+Mach's [[IPC]] mechanism allows for getting access to a message's sequence
+number.
+
+This can be used for serializing requests in a multithreaded environment.
+
+* [GNU Mach Reference Manual: 4.2.6 Message
+ Receive](http://www.gnu.org/software/hurd/gnumach-doc/Message-Receive.html)
+* [GNU Mach Reference Manual: 4.3.6 Receive
+ Rights](http://www.gnu.org/software/hurd/gnumach-doc/Receive-Rights.html)
diff --git a/microkernel/mach/logo.png b/microkernel/mach/logo.png
new file mode 100644
index 00000000..94951acf
--- /dev/null
+++ b/microkernel/mach/logo.png
Binary files differ
diff --git a/microkernel/mach/mig.mdwn b/microkernel/mach/mig.mdwn
new file mode 100644
index 00000000..c620420a
--- /dev/null
+++ b/microkernel/mach/mig.mdwn
@@ -0,0 +1,13 @@
+[[img logo.png]]
+
+The Mach Interface Generator (MIG) is an [[IDL]] compiler. Based on an
+interface definition, it creates stubs to [[invoke]] object methods
+and to demultiplex incoming messages. These stubs conveniently hide
+the details of Mach's [[IPC]] machinery.
+
+GNU MIG is fully compatible with OSF MIG.
+
+* MIG's [homepage](http://www.gnu.org/software/hurd/mig.html)
+* [[Documentation]]
+* [[Building]] - Building (and obtaining) MIG
+* [[Open_Issues]]
diff --git a/microkernel/mach/mig/building.mdwn b/microkernel/mach/mig/building.mdwn
new file mode 100644
index 00000000..ee299166
--- /dev/null
+++ b/microkernel/mach/mig/building.mdwn
@@ -0,0 +1,71 @@
+# <a name="Building_the_Mach_Interface_Gene"> Building the Mach Interface Generator from Source </a>
+
+If you want to build the Mach Interface Generator yourself instead of just using a pre-built package, follow these instructions.
+
+## <a name="Getting_the_Source_Code"> Getting the Source Code </a>
+
+You can chose between getting the [sources from the developers's rcs](http://www.gnu.org/software/hurd/mig-download.html#cvs):
+
+ $ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/hurd co mig
+
+... or (if you are working on a Debian system) the ones that are used for the [current Debian mig package](http://packages.debian.net/source/unstable/mig):
+
+ $ apt-get source mig
+
+Please see the Debian [[running/debian/FAQ]] before using _apt-get source_.
+
+The unpacked source tree is around 1 MiB, and the build tree also is around 1 MiB.
+
+## <a name="Preparing_for_the_Build"> Preparing for the Build </a>
+
+### <a name="_on_Debian_systems"> ... on Debian systems </a>
+
+Building the Mach Interface Generator requires the _build-essential_ and _fakeroot_ packages, their dependencies and additional packages that are specified by the source mig package:
+
+ # apt-get install build-essential fakeroot
+ # apt-get build-dep mig
+
+### <a name="_on_non_Debian_systems"> ... on non-Debian systems </a>
+
+Building the Mach Interface Generator requires a C compiler, a standard C library (with corresponding header files) and your favourite flavor of awk (gawk), yacc (bison), lex (flex) and make.
+
+Additionally, you need to have GNU Mach's header files installed. See [[mach/gnumach/building]] about how to do that, then come back here.
+
+## <a name="Building_and_Installing"> Building and Installing </a>
+
+### <a name="_a_deb_file"> ... a _.deb_ file </a>
+
+Change into the directory with the downloaded / unpacked MIG sources (_mig-1.3.1.99_):
+
+ $ cd mig-1.3.1.99
+
+Start the build process:
+
+ $ dpkg-buildpackage -us -uc -b -rfakeroot
+
+You can then install / distribute the _.deb_ file which will drop out one directory above the current one.
+
+### <a name="_TODO_"> [TODO] </a>
+
+The Mach Interface Generator has to be built in a separate directory:
+
+ $ mkdir mig-build
+ $ cd mig-build
+
+Find the root directory where you installed GNU Mach's header files and where you now intend to install the Mach Interface Generator (_~/gnu_) and the path to your Mach Interface Generator sources (\_[...]/mig) and configure it:
+
+ $ GNU=~/gnu
+ $ TARGET_CPPFLAGS=-I"$GNU"/include [...]/mig/configure --prefix="$GNU"
+
+Build and install the Mach Interface Generator into _$GNU_, i.e. _~/gnu/_ in our example:
+
+ $ make all install
+
+To make your _mig_ binary easily available, you should append something like the following to e.g. your _~/.bash\_profile_:
+
+ PATH=~/gnu/bin:$PATH
+ export PATH
+
+If you already have e.g. _~/bin_ in your _$PATH_, you could also create a symbolic link:
+
+ $ ln -s ~/gnu/bin/mig ~/bin/
diff --git a/microkernel/mach/mig/dealloc.mdwn b/microkernel/mach/mig/dealloc.mdwn
new file mode 100644
index 00000000..1ed9d52b
--- /dev/null
+++ b/microkernel/mach/mig/dealloc.mdwn
@@ -0,0 +1,11 @@
+[[meta copyright="Copyright © 2008 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]]."]]"""]]
+
+[[meta redir=documentation#dealloc]]
diff --git a/microkernel/mach/mig/discussion.mdwn b/microkernel/mach/mig/discussion.mdwn
new file mode 100644
index 00000000..fdab3a45
--- /dev/null
+++ b/microkernel/mach/mig/discussion.mdwn
@@ -0,0 +1,17 @@
+Created
+
+-- [[Main/JoachimNilsson]] - 29 Oct 2002
+
+The logo seems very programmer friendly as this web topic is intended.
+
+-- [[Main/GrantBow]] - 15 Nov 2002
+
+There's little traffic here and little content. Perhaps we should just remove this web? It seemed like a good idea to create it when we split the others off...
+
+-- [[Main/GrantBow]] - 22 Dec 2002
+
+Maybe, but not yet. Let's keep it for a while longer - say, three months. 1st April 2003. If the traffic still is low then we move the Mig topics to the Mach web ...
+
+...Mig = **Mach** Interface Generator.
+
+-- [[Main/JoachimNilsson]] - 22 Dec 2002
diff --git a/microkernel/mach/mig/documentation.mdwn b/microkernel/mach/mig/documentation.mdwn
new file mode 100644
index 00000000..8c977e55
--- /dev/null
+++ b/microkernel/mach/mig/documentation.mdwn
@@ -0,0 +1,77 @@
+[[meta copyright="Copyright © 2002, 2003, 2005, 2007, 2008 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]]."]]"""]]
+
+This is a small collection of links to external documents describing the *Mach
+Interface Generator* used by GNU Mach.
+
+
+# MIG and C Thread Programming
+
+A tutorial which demonstrates the use of the C Threads library primitives in
+writing a multithreaded program and the use of the Mach Interface Generator
+(MIG) to generate remote procedure calls for interprocess communication. Like
+its companion tutorial, it is based on the Mach 2.5 system. However, the
+concepts are applicable to Mach 3.0 user level programming.
+
+Linda R. Walmer and Mary R. Thompson. *A Programmer's Guide to the Mach User
+Environment*. [PostScript
+](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/unpublished/machuse.ps),
+[Doc](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/unpublished/machuse.doc).
+February 1988. School of Computer Science, Carnegie Mellon University.
+
+An ftp directory containing the [mig programming
+examples](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/unpublished/mig_example)
+for this tutorial.
+
+Slides to Rich Drave's talk on MIG, on November 21, 1991:
+[PostScript](ftp://ftp.cs.cmu.edu//afs/cs/project/mach/public/doc/unpublished/internals_slides/Mig/root.ps),
+[TeX](ftp://ftp.cs.cmu.edu//afs/cs/project/mach/public/doc/unpublished/internals_slides/Mig/slides.tex).
+
+
+# Roots
+
+Mig is an implementation of a subset of the Matchmaker **language**.
+
+"Matchmaker is a language for specifying and automating the generation of
+multilingual interprocess communication interfaces. MIG is an interim
+implementation of a subset of the Matchmaker language that generates C and C++
+remote procedure call interfaces for interprocess communication between Mach
+tasks."
+
+Richard P. Draves, Michael B. Jones, Mary R. Thompson, *MIG - THE MACH
+INTERFACE GENERATOR*.
+[ps](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/unpublished/mig.ps),
+[doc](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/unpublished/mig.doc).
+November 1989. Department of Computer Science, Carnegie-Mellon University.
+
+
+# Related Work
+
+See the citations about [Mach and matchmaker: kernel and language support for
+objectoriented distributed
+systems](http://citeseer.ist.psu.edu/context/93073/0). "M. B. Jones and
+R. F. Rashid, *Mach and matchmaker: kernel and language support for
+objectoriented distributed systems*, Proceedings of the Conference on
+Object-Oriented Programming Systems, Languages, and Applications, October 1986,
+pp. 67--77."
+
+
+# Further Relevant Documentation
+
+ * The [GNU Mach Reference
+ Manual](http://www.gnu.org/software/hurd/docs.html#manuals), espacially
+ [Chapter 4, Inter Process
+ Communication](http://www.gnu.org/software/hurd/gnumach-doc/Inter-Process-Communication.html),
+ which, for example, explains how the <a name="dealloc">`dealloc` flag</a>
+ works in [Chapter 4.2.4,
+ Memory](http://www.gnu.org/software/hurd/gnumach-doc/Memory.html)
+
+ * MIG *in action*: [[hurd/io_path]].
diff --git a/microkernel/mach/mig/logo.png b/microkernel/mach/mig/logo.png
new file mode 100644
index 00000000..cdfec179
--- /dev/null
+++ b/microkernel/mach/mig/logo.png
Binary files differ
diff --git a/microkernel/mach/mig/open_issues.mdwn b/microkernel/mach/mig/open_issues.mdwn
new file mode 100644
index 00000000..2d870695
--- /dev/null
+++ b/microkernel/mach/mig/open_issues.mdwn
@@ -0,0 +1,19 @@
+[[meta copyright="Copyright © 2008 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]]."]]"""]]
+
+[[meta title="Open Issues"]]
+
+This is a dumping ground for open issues for GNU MIG.
+
+[[inline
+pages="microkernel/mach/mig/open_issues/* and !*/discussion"
+show=0
+actions=yes
+rootpage="microkernel/mach/mig/open_issues" postformtext="Add a new item titled:"]]
diff --git a/microkernel/mach/mig/open_issues/duplicate_inclusion_guards.mdwn b/microkernel/mach/mig/open_issues/duplicate_inclusion_guards.mdwn
new file mode 100644
index 00000000..93347759
--- /dev/null
+++ b/microkernel/mach/mig/open_issues/duplicate_inclusion_guards.mdwn
@@ -0,0 +1,14 @@
+[[meta copyright="Copyright © 2008 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]]."]]"""]]
+
+E.g., both `/usr/include/hurd/process.h` and
+`/usr/include/hurd/process_request.h` use `_process_user_` as an inclusion
+guard. This leads to problems when both are needed, as is the case in
+[[GDB]]'s `gdb/gnu-nat.c`.
diff --git a/microkernel/mach/port.mdwn b/microkernel/mach/port.mdwn
new file mode 100644
index 00000000..77b1372f
--- /dev/null
+++ b/microkernel/mach/port.mdwn
@@ -0,0 +1,41 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+Mach ports are [[capabilities|capability]].
+
+A Mach port is a kernel queue. Each port has associated with
+it a receive right and one or more send and send-once rights.
+A queue can hold a number of messages. Once the queue is full,
+the send blocks until their is space to enqueue the message
+(this is interruptible via a timeout mechanism).
+
+A receive right designates a queue and authorizes the holder to
+dequeue messages from the queue, and to create send and send-once
+rights.
+
+Send and send-once rights designate a queue and authorize the
+hold to enqueue messages (in the case of a send-once right,
+a single message). Enqueuing a message is equivalent to
+[[invoke|invoking]] a capability.
+
+Send and receive rights are named using local names. Each
+task has associated with it a port [[address_space]]. A ports
+are addressed via this table. Each task thus has its own
+private [[naming_context]] for ports.
+
+Ports can be [[delegate]]d in an [[IPC]] message. When the
+receiver dequeues the message, the right is made available
+to it.
+
+A [[thread]] can only block receiving on a single port. To work
+around this, the concept of a port set was introduced. A receive
+right can be added to (at most) one port set. When a thread
+receives from a port set, it dequeues from any of the ports that
+has a message available.
diff --git a/microkernel/mach/rpc.mdwn b/microkernel/mach/rpc.mdwn
new file mode 100644
index 00000000..ecef86ee
--- /dev/null
+++ b/microkernel/mach/rpc.mdwn
@@ -0,0 +1,15 @@
+[[meta copyright="Copyright © 2007, 2008 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]]."]]"""]]
+
+[[General_information|/rpc]] about RPC.
+
+Uses Mach's [[IPC]] [[mechanism]].
+
+Stub code generated by [[MIG]].