The TUNES i386 Subproject

NOTE: existing code and corresponding technical comments lie in directory src/LLL/i386 of the source distribution.

Goals

Implement the Tunes project on "industry standard" computers equipped with an Intel 80386 or compatible 32-bit CPU.

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

Use of the MMU

Run most code in ring 0 to reduce all the I/O and ring switching overhead. This is safe because we use safe code. If some features of paging (write-protect) in code 0 is not possible (386 computers), use ring 1 with IO rights (IOPL).

Use segments only as a way to achieve quick pointer arithmetics for large objects worth the descriptor table mangling and all the overhead resulting from different memory management.

Emulation boxes and other unsecure programs of course use ring 3.

Small programs (most of them) don't need a full personal address space and share their MMU pagetables with their calling program. If a program grows large, migration can still make a full task for it.

Programs that we know will be large and little interacting with other (or not be trusted) will be given an address space for them alone. There must be some way to share code whatsoever. The first thing an experienced user may want to do is create a task for him alone.

paging can be used to use wired service address valid both in PL0 as well as other levels.

DOS emulation

Run DOS in real low memory, even if using vm86 mode, so DOS programs can use DMA and such. Perhaps even run in true real-mode.

Here are a few trick to free as much DOS memory as possible:

Difficulties

The Bootstrap Sequence

Only the very first steps of the boot sequence have already been implemented, and the initial kernel is still to be completed.

Here are the first steps of the boot sequence:

Modules

Implemented Modules

Here is a list of implemented i386-specific modules:

Modules still to implement

Here is a list of i386-specific modules to implement:

Bibliography

See the OS page of the Wiki, particularly the Code section.

To Do