Navigate L4/x86 Section:
(* = offsite link)
Questions answered in this FAQ
Questions and Answers
Why have you switched to Linux on L4 when Lites
on L3 was underway already?
- We dropped the Lites on L3 project in favor of the Linux on L4
project for a couple of reasons. These are my favorites:
- Porting a Mach server to a different microkernel turned out
to be a unnecessarily complex task: We never got quite
beyond resolving the Mach dependencies by emulating Mach
facilities. We wrote
a report on this (in English).
- In the future, we want to base our designs on the L4 microkernel.
That's why, we need a decent operating and development environment
running on L4. Also, this project is a good way to debug the L4
microkernel as it is still pretty green.
- We switched from a BSD-based system to a Linux-based one
because more people in our group have experience with
Linux than with BSD, and because the
port of Linux to
OSF Mach provided a good model on how to do it.
So far, the switch seems to work out well, and it generally looks like
it was a good idea. :-)
I am puzzled by the build environment for the L4
microkernel: Phar Lap in DOS-emul under Linux? Please explain the
logic, it escapes me.
- The L4 kernel has been written for an assembler which is only
available under DOS, but we don't want to switch to a DOS machine
every time we need to build the kernel.
We're still looking for a good, free, well-documented,
Intel-syntax-capable assembler running under Unix which supports at
least some of the more advanced/ obscure features of usual DOS
assemblers, like symbolic structures and bit fields, a macro and
conditional compilation facility which groks some assembler semantics
(e.g. structure sizes), support of both real-addressing and protected
mode, and linking code into user-defined executable segments
(I already went searching for one, so you might want to
save yourself the time looking for one yourself and just go ahead
and write one. ;-)
I want to build the L4 kernel. Do I need a DOS
assembler? Should I purchase the Phar Lap assembler?
- Do you really need to rebuild the L4 kernel? If you just want
to play with it, you don't have to - see the answers to the
next two questions.
Otherwise you will need a DOS assembler. The current (and older)
source snapshots want the Phar Lap assembler, but future snapshots
will use the Microsoft assembler MASM, so you probably shouldn't
buy the Phar Lap assembler.
How do I boot the ``hello world'' server provided
with the L4 development environment package?
- Here's a roadmap for building a boot floppy on a Linux machine:
I want to play with L4. Do I need a DOS
- No, you don't need a DOS assembler for playing: The
source/binary L4 microkernel package
we distribute contains all the binaries which need to be built
using DOS tools.
See also the answer to the previous question.
Where can I get an a.out compiler toolset for Debian Linux?
- You don't need them any longer for L4 -- the L4 development
environment now supports ELF. (98/03/09)
Original answer: Debian already contains the a.out tools (see
but they are somewhat broken and nobody works on fixing them.
Instead you should use even older a.out development tools
packaged for Debian. They are available from
(Remember: Debian packages can be installed using the following
dpkg --install package.deb)
Do I really need to boot with GRUB? I already have [insert
your favourite boot loader here].
- The nice thing about GRUB
is that it can load several images into
memory before launching one of them. This way, we can load L4 kernel
+ a boot server into the memory before running L4; so L4 doesn't need
any device drivers to load its boot server (and we don't have to
piggyback the boot server on the L4 kernel).
There are a few other benefits as well, as its capability to interpret
If you don't want to use GRUB, you'll end up writing your own boot
mechanism, which is what we wanted to avoid.
GRUB can emulate many things other bootloaders normally do. It should
be possible to replace e.g. LILO with GRUB and use a config file to
selectively boot either Linux or L4. (GRUB has a nice
boot-selector-like user interface.)
Can I boot L4 + servers from harddisk?
- Yes, that's possible: GRUB can boot from hard disk partitions as well
provided they have some supported filesystem (BSD FFS or Linux Ext2fs)
and they're accessible using the BIOS (i.e. within the BIOS translation
for sector/head/cylinder). Just modify the GRUB config file to use
files from the hard disk, e.g.
(hd0,2) means Linux'
You can boot GRUB from a floppy and have its config file point to
files on hard disk, or (if you're brave) you can even install GRUB on
hard disk; follow the
GRUB instructions on how to do this.
Does L4 run on the i386, i486, Pentium and Pentium Pro
- There are two versions of the L4 microkernel: an i486 version
and a Pentium version.
The i486 version (the one we distribute) doesn't run on the
i386, but it does run on Pentium and Pentium Pro CPUs.
There is also Pentium-optimized version of the kernel
(but that one currently isn't freely available).
The kernel seems to be really tiny. Is
it small enough to reside in the CPU's 8k internal instruction
- No, the whole kernel won't fit into the first-level cache, but those
critical parts of it used most often (mainly IPC) do. The kernel is
linked together in a special manner so that those critical parts end
up in adjacent memory regions to make them more cacheable.
Is the Linux single server running on L4 binary
compatible to Linux/i386?
- The Linux server is mostly binary compatible with Linux/i386 at the
application level (you can run it on any standard Linux distribution's
base system; we use Debian 1.1). Things which don't (and probably
never will) work are V86 mode (affecting DOSEmu and WINE) and kernel
modules compiled for a standard i386 kernel.
Can Linux applications running under the Linux/L4 single
server invoke L4 system calls (like the IPC primitives) directly,
or are they run in some protected environment?
- Linux applications can use all L4 system calls directly, including the
How do I access the serial ports under L4?
- You can do it the simple or the hard way. The simple way is to
renounce interrupts and to receive and send data via
polling. The hard way incorporates the usage of interrupts.
I. Access to serial ports without interrupts:
- Initialize and configure the SIO (usually a 16550 chip):
All registers lie in the port address space of the
PC. COM1 usually uses 8 subsequent addresses starting at
0x03f8, COM2 starting at 0x02f8.
- Write the divisor value (= 115200/bps) to
- Configure number of start and stop bits as well as
parity in LCR (Line Control Registers).
- Reset the SIO by reading IIR, LSR, IIR, RBR, IIR, MSR,
IIR registers subsequently.
- Disable the SIO interrupts by configuring IER
(Interrupt Enable Register).
- Maybe you have to set DTR and RTS in MCR
(Modem Control Register). This step can usually
- Send and/or receive data via polling.
- You have to test a bit in the LSR (line status
register). The bit and its desired state differ
for the transmit and receive case. Remember, to
have a timeout mechanism is always a good idea!
- If the bit has the desired state you are allowed
to transmit your data byte to THR (transmitter
holding register) in the transmit case or to read
a data byte from RBR (Receiver Buffer Register)
in the receive case.
II. Access to serial ports with interrupts:
- Create a thread which attaches to the wanted
interrupt. The thread eventually suspends itself with
an receive syscall and is activated everytime the
desired interrupt occurs.
- Initialize and configure the SIO as under I.1. Step d)
is different from I.1, because (Surprise!) the appropriate
interrupts (Receive and/or Transmit) have to be enabled.
- Enable the necessary IRQ (in most cases, COM1 uses IRQ4
and COM2 uses IRQ3) by programming the PIC (port address
You should find a detailed description of SIO and PIC in most
good PC hardware books.
Example code for most of the functionality mentioned above
is stored under lib/libl4dbg/src within the L4 source tree.
How do I boot L4 + servers over the network using a
- Ask your Administrator to create a directory
/boot/$LOGNAME on your bootp/tftp server.
- Create a /boot/$LOGNAME/menu.lst. It should contain
references to the images you want to boot. You can
either copy the images to /boot/$LOGNAME or create links
under /boot/$LOGNAME pointing to your images. A simple
menu.lst could look like follows:
title = hello world
module=(nd)/boot/jw5/grubboot.img boothack nowait
But remember: In order to be able
to boot files using tftp all files have to be readable
by 'other'. If you are using links to some files in your
home directory all directories in the path have to be
executable by 'other'.
- Take an empty floppy disk and insert it into your Linux
workstation. If your machine is a local node at the
Institute of Operating Systems simply invoke
~jw5/outgoing/grubinst <user name>
[<config file name>]. The script will
install a precompiled grub with support for ne2000 and
adjust the boot configuration using the supplied
parameters. Otherwise download the precompiled
grub, adjust the script and invoke it locally.
- Insert the disk into your test machine and boot it.
Last modified: Thu Jun 21 19:11:15 2001