The implementation should be faithful to the LLL specifications,
and device drivers should be provided to allow basic memory management,
human interaction, and access to mass storage.
Implementation Ideas
To allow DOS emulation with as much DOS memory as possible:
- Tunes installs as high as possible in real and extended
memory
- We intercept all interrupts, with the real-mode IDT being in
extended memory; real-mode interrupts jump to the same
physical code portion that just jumps into
protected mode for PM interrupt management;
interrupts are differentiated by the segment number
with which the code portion was reached: 5F21 for int 21,
5F33 for int 33, etc.
i386 Difficulties
See LLL difficulties...
Having some efficient code, but limit hardware dependence to the least
possible.
Supporting all the various kinds of existing hardware on PC
compatible stuff
Perhaps supporting that DOS runs below TUNES.
We need some standard object encoding for our modules.
See GOOSE subproject.
The Bootstrap Sequence
Only the very first steps of the boot sequence have already been implemented,
and the initial kernel is still to complete.
Here are the first steps of the boot sequence:
- The ROM-based BIOS, or some boot multiplexer
(e.g. LILO the LInux LOader, or OS/2's boot manager)
loads our 512-byte long boot sector at 0:7C00,
and jumps into it.
- The boot sector just chains into the ~2K boot loader that
it read from disk according to information written in
the boot sector during the TUNES installation.
It also installs a BIOS extension to allow reading floppies
over formatted as compared to the normal standard, using
fdformat, or Linux utilities.
- A boot loader that tests the CPU type, the amount of available
memory, and retrieves a small kernel from disk (or a LILO
boot sequence), then jumps into it.
- Alternatively, LILO or LOADLIN (from DOS prompt) loaded the kernel,
that was faking a Linux kernel, and jumped into the boot
loader. The boot loader is able to detect it and will load
the small kernel from memory rather than disk.
- A simple initial kernel, as loaded by the loader, is run.
It manages:
- real-mode<->protected-mode switching
- interrupt interception by TUNES rather than the BIOS
- calling the BIOS from protected mode
- A simple implementation of a 32-bit stack machine
- A video output module using the BIOS
- A keyboard input module using the BIOS
- A disk I/O module using the BIOS
- real-memory/extended-memory dynamic linking
- loading of the remaining of TUNES according to modules
that were concatenated to the initial kernel.
- When the initial kernel finished installing itself,
it consecutively installs all the modules that were
concatenated to it during system installation, and loaded
after it by the boot loader. The last one will presumably
load ever more modules until all wanted modules are installed,
and the system is ready to begin or resume actual work.
Some of these modules will be i386 specific; others may be
architecture-independent.
Modules to implement
Here is a list of i386 specific modules to implement:
Memory management
- An interface to the i386 MMU
- An interface to the i386 segmenting
- Interrupt sharing manager
i386 specializations of more generic modules
- An i386-optimized instance of the generational garbage collector
that checkpoints objects for persistency.
- support for chunks i386 executable binary
- full support for GOOSE modules.
Raw drivers for console interface
- A simple parametrizable raw keyboard manager
- Some keyboard cooking to obtain national keyboard mapping
- A simple interface to text-mode video
I/O drivers:
- Generic and specific disk drivers, that may be using the BIOS,
or directly talking to the adapter, using a SCSI interface,
etc. Perhaps stealing it from Linux.
- Drivers for serial ports
- Drivers for parallel ports
- Drivers for ethernet adapters
- Sound drivers
- Graphic card drivers
To Do on this page
set up standard memory segmenting and mapping
set up GC implementation
set up calling conventions
study how all the above can be done independently
from the underlying system, be it direct hardware, BIOS, DOS, Linux, etc.
write the BIOS-extender
write the i386 stuff as a Linux kernel module
Back to the
TunesLLL subproject.
Page Maintainer:
Faré
-- rideau@clipper.ens.fr