Skip to content

Configure and Build TLVC

Helge Skrivervik edited this page Dec 6, 2023 · 7 revisions

Download the source code

TBD

Configuring the system

Kernel configuration

The foundation of configuring a TLVC kernel and system is the menuconfig tool. Run the setup-script first to get the shell environment right (cd to the root directory of the installation and run . ../env.sh?). Then run make menuconfig which starts the configuration program. If you're new to the system, just go through the various menus to become familiar with the options and comfortable around the menu structure.

You can and should use the more info option to learn more about some of the options, but unfortunately not all options are explained and quite a few of the explanations are outdated. The following chapters will introduce you to some (eventually most) of the contents and terms you'll meet in menuconfig.

Adapting to your hardware

Setting hardware parameters in the source code

Runtime Configuration: Using bootopts

Everything about bootopts

Making boot-floppies

Setting up a hard disk

XMS Support

TLVC includes limited support for XMS, also known as Extended Memory (as opposed to Expanded Memory (EMS) which is a completely different technology and concept, although with some of the same benefits - check the Technical Concepts Wiki for more about EMS and TLVC).

XMS is RAM with addresses above 1 Megabyte, unreachable for the earliest PCs running the 8086 and 8088 processors (caveat: see the chapter on HMA, High Memory Area, in the Technical Concepts Wiki). In order to use XMS, you need a system with a 80286 or newer processor. Typically - for vintage systems - XMS memory must come from the system manufacturer. There were no standards for such additional memory at the time, so while the actual memory chips may be mounted on so called SIMMs, small cards with memory chips to be put in sockets on some motherboard, the actual motherboard is usually system specific. (SIMM - Single In Line Memory Module).

This means, if you have a system with say 2MB, 10MB or even 30MB RAM (that was a lot back in the day), some or all of that RAM may be used by TLVC. For now, the usage is limited to IO buffers, later other uses - such as RAM-disk and swapping - may become available.

Using more of the RAM in the system may seem like an easy feat. It isn't. TLVC - to be compatible with even the earliest PCs - runs in so called 'Real Mode': The processor - regardless of age, is forced to act like the original 8086/8088 processors. Backwards compatibility is guaranteed, including limited resources such as the memory above 1MB becoming invisible and effectively useless. For TLVC just like for DOS.

However, and again just like DOS, there are some tricks to play, which may (depending on your system) enable access to more memory. TLVC is using two of these tricks to make more memory available. One is called INT15/1f - which means that the vendor has included some software in the system BIOS to access extra (sometimes called 'virtual mode') resources. The other trick is known as 'Unreal Mode', which means using undocumented instructions in the processor to get to those resources. Look up these mechanism on the net if you're interested in the details.

Using XMS buffers

TLVC's XMS buffer configuration allows you to choose either or both of these options. If you choose 'unreal mode', the kernel will emit a warning if your system has a pre-386 processor, and just ignore the request. If you choose INT15, which is required on some systems, specifically from Compaq, the system may hang early in the boot process. This will also happen if you choose 'unreal mode' and run on of those 286 or 386 Compaqs. The good thing about INT15 though, is that it opens up the extra memory even to 286 based systems - such as the Compaq Portable III. As of this writing I know of no other 286 based system that do that.

Newer 386 based systems, such as the HS-3000/4M SBC, run fine with the unreal mode option. The initial part of boot messages from that type of system may look like this:

Direct console, scan kbd 80x25 emulating ANSI (3 virtual consoles)
ttyS0 at 0x3f8, irq 4 is a 16550A
ttyS1 at 0x2f8, irq 3 is a 16550A
ttyS2 at 0x3e8, irq 7 is a 16550A
ttyS3 at 0x2e8, irq 10 is a 16550A
xms: A20 was off now on, using unreal mode, 1024 xms buffers, 1048576 ram
eth: ne0 at 0x300, irq 9, (ne2k) MAC 00:80:29:ef:d9:51, flags 0x80
...

A piece of practical advice: If you have a 286 or higher processor and XMS memory, try unreal mode first, then INT15. It may or may not work, and you don't know until you've tried. By the way, QEMU supports both, so it doesn't matter.

How many buffers to configure? Max is 2500, but there is a price to pay: Buffer headers take up RAM space in conventional memory, leaving less RAM for processes and applications. Also, if you have lots of buffers and you system crashes, you may loose a lot of data or work, even if you set your bootopts SYNC option to synchronize frequently. And finally, depending on the speed of your storage peripherals and CPU, syncing lots and lots of buffers takes time. It may be better (less noticeable) to sync 250 buffers often than 2500 buffers less often.

Debugging

Please refer to the Up and Running with TLVC Wiki page.

MORE to come