Navigate L4/x86 Section:
Site Navigation:
(* = offsite link)
Quick links:
|
L4/x86 FAQ
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. :-)
(96/07/26)
-
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
(ala ELF).
(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. ;-)
(96/07/26)
-
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.
(96/10/18)
-
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:
(98/03/09)
-
I want to play with L4. Do I need a DOS
assembler?
- 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.
(96/10/18)
-
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
stable/binary-i386/devel/aout-*),
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
os.inf.tu-dresden.de:/pub/l4/debian-a.out-tools/.
(Remember: Debian packages can be installed using the following
command: dpkg --install package.deb)
(sr1 97/04/10)
-
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
file systems.
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.)
(96/08/12)
-
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.
kernel= (hd0,2)/foo/bar/grubboot.img
(hd0,2) means Linux' /dev/hda3 or
/dev/sda3 .
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.
(96/08/12)
-
Does L4 run on the i386, i486, Pentium and Pentium Pro
processors?
- 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).
(98/03/09)
-
The kernel seems to be really tiny. Is
it small enough to reside in the CPU's 8k internal instruction
cache?
- 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.
(96/08/23)
-
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.
(96/08/23)
-
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
IPC primitives.
(96/08/23)
-
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:
You must:
- Initialize and configure the SIO (usually a 16550 chip):
- a)
- Write the divisor value (= 115200/bps) to
DLLO/DLHI registers.
- b)
- Configure number of start and stop bits as well as
parity in LCR (Line Control Registers).
- c)
- Reset the SIO by reading IIR, LSR, IIR, RBR, IIR, MSR,
IIR registers subsequently.
- d)
- Disable the SIO interrupts by configuring IER
(Interrupt Enable Register).
- e)
- Maybe you have to set DTR and RTS in MCR
(Modem Control Register). This step can usually
be omitted.
All registers lie in the port address space of the
PC. COM1 usually uses 8 subsequent addresses starting at
0x03f8, COM2 starting at 0x02f8.
- Send and/or receive data via polling.
- a)
- 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!
- b)
- 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:
You must:
- 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
0x21).
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.
(rb 97/01/07)
-
How do I boot L4 + servers over the network using a
bootp/tftp server?
-
- 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
kernel=(nd)/boot/jw5/rmgr
module=(nd)/boot/jw5/grubboot.img boothack nowait
module=(nd)/boot/jw5/hello
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
|